4006 NEO CAT1 EN:修订间差异

来自Mcuzone Wiki
 
(未显示2个用户的30个中间版本)
第5行: 第5行:


== '''I. Introduction''' ==
== '''I. Introduction''' ==
NEO CAT1 is a 4G LTE product which we designed based on the FriendlyElec NanoPi series featuring the H3 CPU motherboard (including models such as NEO, NEO CORE, and NEO AIR). The 4G module is a USB device that utilizes the USB IO pins on the NEO development board for communication and power supply, thereby providing 4G network connectivity to the NEO series boards.
NEO CAT1 is a 4G LTE product which we designed based on the FriendlyElec NanoPi series featuring the H3 CPU motherboard (including NEO, NEO Core and NEO Air). The 4G module is a USB device that utilizes the USB IO pins on the NEO development board for communication and power supply, thereby providing 4G network connectivity to the NEO series boards.


4G Cat1 is a high-cost-performance module aimed at low-speed IoT applications with speeds around 10Mbps. The rates of 10Mbps downlink and 5Mbps uplink can meet the majority of connectivity and transmission requirements.
4G Cat1 is a high-cost-performance module aimed at low-speed IoT applications with speeds around 10Mbps. The rates of 10Mbps downlink and 5Mbps uplink can meet the majority of connectivity and transmission requirements.


NEO CAT1, in conjunction with NEO series, enables the creation of a low-cost IoT device. The 4G module is driver-free, on FriendlyElec's official Ubuntu and Debian systems, the device is automatically recognized, requiring no additional driver installation.
NEO CAT1, in conjunction with NEO series, enables the creation of a low-cost IoT device. The 4G module is driver-free, on FriendlyElec's Ubuntu and Debian systems, the device is automatically recognized, requiring no additional driver installation.


== '''II. Hardware Spec''' ==
== '''II. Hardware Spec''' ==
1. One USB 2.0 port, used for powering and communication with the 4G module. The module comes in two packaging options: one is a female header connector, designed for connecting to the NEO development board. The other is a 1.25mm-4P interface, intended for connecting to other development boards that are not NEO Core, NEO, or NEO Air. You may choose to use one of the two packaging interfaces.
1. One USB 2.0 port, used for powering and communication with the 4G module. The module comes in two packaging options: one is a female header connector, designed for connecting to the NEO development board. The other is a 1.25mm-4P interface, intended for connecting to other development boards that are not NEO Core, NEO, or NEO Air. You may choose one of the two interfaces.


2. One 4G CAT1 LTE.
2. One 4G CAT1 LTE.
第18行: 第18行:
3. One IPEX Gen 1 antenna port.
3. One IPEX Gen 1 antenna port.


4. Dual SIM Paths: One path is a Nano SIM card slot, the other path is an eSIM chip with a 5x6mm package (which needs to be procured and soldered by the user). The two SIM paths are used alternatively, with the Nano SIM being the default option.
4. One Nano SIM slot.


5. Three LEDs: STS, MODE, and NET.
5. Three LEDs: STS, MODE, and NET.
第24行: 第24行:
6. Two M2.5 mounting holes.
6. Two M2.5 mounting holes.


7. Size: The maximum size is 40x30mm.
7. Size: The maximum size is 39x30mm.


8. PCB board: Two-layer board, with gold plating process, lead-free production; the material is UL and RoHS certified, with a fire rating of 94V-0.
8. PCB board: 2-layer, with gold plating process, lead-free production; the material is UL and RoHS certified, with a fire rating of 94V-0.


== '''III. Operations for NEO with CAT1''' ==
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_58.jpg


<!--=== 3.1 基于FriendlyWrt系统 ===
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_59.jpg
测试基于友善官方烧写包版本:h3-sd-friendlywrt-4.14-armhf-20210512.img.gz


用网线将NanoPi NEO连接到上级路由器,插系统卡和手机SIM卡,接好天线,上电,启动系统。
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_69.jpg


==== 3.1.1 配置系统 ====
{| class="wikitable"
待系统启动完毕,在同一局域网内的PC上,使用浏览器打开下面的网址:
|+
!model
!CAT1
!CAT1-EU
|-
| rowspan="2" |Band
|FDD:B1/B3/B5/B8
|FDD:B1/B3/B5/B7/B8/B20/28(A/B)
|-
|TDD:B34/B38/B39/B40/B41
|TDD:B38/B40/B41
|-
|DATA
| colspan="2" |FDD: Max 10Mbps(DL)/Max 5Mbps(UL)
TDD:Max 8Mbps(DL)/Max 2Mbps(UL)


http://friendlywrt/
Max 6Mbps(DL)/Max 4Mbps(UL)
|}


即为FriendlyWrt系统的管理页面,按正常方式登录即可(用户名<code>root</code>,密码<code>password</code>)。
== '''III. Operations for NEO with CAT1''' ==
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_63.jpg
第一次登录时有提示修改密码,请在'''登录后'''转至修改密码页面,重新修改密码(可以与原来的一样):
=== 3.1 Work with Debian OS ===
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_09.jpg
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_10.jpg
 
点击 ”网络 - 接口“,在界面上点击wan和wan6后面的“删除”:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_11.jpg
 
然后点击“添加新接口”,按下图设置,添加一个LAN接口:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_12.jpg
 
“常规设置”中,按下图填写自定义的IPv4地址信息(本例中填写的是192.168.2.1,不能与局域网内其它地址冲突,IPv4网关和广播'''都留空'''):
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_13.jpg
 
“防火墙设置”中,将防火墙区域指定为lan:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_14.jpg
 
“DHCP服务器”中,点击“配置DHCP服务器”:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_15.jpg
 
无需修改默认的DHCP服务器配置,直接按“保存”:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_16.jpg
 
保存后回到上一页面,按“保存并应用”:
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_17.jpg
 
这样,就把原生网口从WAN口调整为LAN口了。
 
将原生网口与PC的网口直连,重启系统,PC网口就会获得192.168.2.x这样的地址,启动完毕后,在PC上使用浏览器访问192.168.2.1,即可登录FriendlyWrt系统的管理页面。
 
==== 3.1.2 配置和测试4G模组 ====
接上节,将原生网口修改为LAN口后,用一根网线连接原生网口和PC网口,等PC获取IP地址后,在浏览器中打开原生网口的地址(按上节配置就是192.168.2.1),登录FriendlyWrt系统的管理页面。
 
点击“服务 - ttyd”,进入终端窗口,无需输入用户名和密码,进入即是root登录状态:
 
20
 
执行ifconfig -a,查看网络状态,其中eth0为原生网口,erspan0为4G CAT1:
 
21
 
因为4G CAT1尚未配置为WAN口,所以目前还没有获取IP。
 
点击“网络 - 接口”:
 
22
 
点击“添加新接口”,按下图进行配置(名称可以自定义),配置完毕后点击“创建新接口”:
 
23
 
点击“防火墙设置”,将“创建/分配防火墙区域”设置为wan,然后点击“保存”:
 
24
 
点击“保存并应用”:
 
25
 
==== 3.1.2 Adblock和带宽监控 ====
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_18.jpg
 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_19.jpg
-->
=== 3.1 Based on Debian system ===
Flash the Debian system (command-line version, without a GUI) to the TF card.
Flash the Debian system (command-line version, without a GUI) to the TF card.


The version of the official FriendlyElec system we tested: h3-sd-debian-bookworm-core-4.14-armhf-20240818.img.gz
The version of the FriendlyElec system we tested: h3-sd-debian-bookworm-core-4.14-armhf-20240818.img.gz


NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.
NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.


==== 3.1.1 Operate through TTL serial connection to PC ====
==== 3.1.1 Operate through TTL serial connection to PC ====
Insert the SIM card and the TF card with the system. The Debug interface of NEO, located next to the USB-A port, is a TTL serial port. The pinout from top to bottom is as follows: GND, 5V, TXD, RXD. Connect the USB-to-TTL serial module to it (connect TXD to RXD, RXD to TXD, and GND to GND; the 5V pin is not used), and connect the USB port of the USB-to-TTL serial module to the PC, as shown in the figure below:
Insert the SIM card and the TF card with the system. And connect the USB port of the USB-to-TTL serial module to the PC, as shown in the figure below:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_28.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_64.jpg


Then download and install the terminal software MobaXterm on your PC. The download link for MobaXterm is:
Then download and install the terminal software MobaXterm on your PC. The download link for MobaXterm is:
第134行: 第76行:
'''''Note: Use a baud rate of 115200.'''''
'''''Note: Use a baud rate of 115200.'''''


http://www.mcuzone.com/wiki/4003_FriendlyElec_NanoPi_NEO3/4003_FriendlyElec_NanoPi_NEO3_74.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_70.jpg


Then open this serial port and log in to the Debian system (username: <code>root</code>, password: <code>fa</code>):
Then open this serial port and log in to the Debian system (username: <code>root</code>, password: <code>fa</code>):
第144行: 第86行:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_37.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_37.jpg


eth0 is the NEO's own Ethernet port, which does not have an IP address since it is not connected to a network cable. eth1 is the 4G CAT1 module, which has correctly obtained an IP address. We performed a ping test, and the results are as follows:
eth0 is the NEO's own Ethernet port, which does not have an IP address since it is not connected to a network cable.  
 
eth1 is the 4G CAT1, which has correctly obtained an IP address. We performed a ping test, and the results are as follows:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_38.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_38.jpg
第168行: 第112行:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_39.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_39.jpg


However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses. Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:
However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses.  
 
Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:


<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
第209行: 第155行:
Confirms successful internet access via both wired and 4G networks.
Confirms successful internet access via both wired and 4G networks.


=== 3.2 Based on Ubuntu system ===
=== 3.2 Work with Ubuntu OS ===
Flash the Ubuntu system (command-line version, without a GUI) to the TF card.
Flash the Ubuntu system (command-line version, without a GUI) to the TF card.


The version of the official FriendlyElec system we tested: h3-sd-ubuntu-noble-core-20240823.img.gz
The version of the FriendlyElec system we tested: h3-sd-ubuntu-noble-core-20240823.img.gz


NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.
NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.
第293行: 第239行:


== '''IV. Operations for NEO Core with CAT1''' ==
== '''IV. Operations for NEO Core with CAT1''' ==
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_61.jpg


=== 4.1 Based on Debian system ===
=== 4.1 Work with Debian OS ===
The system for NEO Core is flashed into the eMMC storage.
The system for NEO Core is flashed into the eMMC storage.


The version of the official FriendlyElec system we tested: h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz
The version of the FriendlyElec system we tested: h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz


Connection Method: Connect the NEO Core to the computer using a USB-to-TTL serial module, as shown in the figure below:
Connection Method: Connect the NEO Core to the computer using a USB-to-TTL serial module, as shown in the figure below:


 
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_62.jpg
 


Open MobaXterm and configure the TTL serial port as shown in the figure below:
Open MobaXterm and configure the TTL serial port as shown in the figure below:
第316行: 第262行:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_56.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_56.jpg


Note: eth1 (the 4G CAT1 module) has correctly obtained an IP address. '''''If it has not obtained an IP address, please execute <code>dhclient eth1</code>.'''''
Note: eth1 (the 4G CAT1 module) has correctly obtained an IP address.
 
'''''If it has not obtained an IP address, please execute <code>dhclient eth1</code>.'''''


Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:
Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:
第322行: 第270行:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_57.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_57.jpg


=== 4.2 基于Ubuntu系统 ===
=== 4.2 Work with Ubuntu OS ===
NEO Core默认内置Ubuntu系统(位于eMMC上);
NEO Core comes with Ubuntu system pre-installed on the eMMC by default.


按与Debian系统同样的方法设置好TTL串口,然后打开这个串口,默认系统是登录pi这个账号,输入:
Configure the TTL serial port in the same manner as with the Debian OS, then open this serial port. By default, the system logs in with the user account pi.


<code>sudo su</code>
Execute <code>sudo su</code>to switch to the root account (password: <code>pi</code>).


切换到sudo账号。
Excecute <code>ifconfig -a</code> to view the following network parameters:


执行<code>ifconfig -a</code>,查看网络参数如下:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_53.jpg


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_53.jpg
Note: eth1 (the 4G CAT1 module) has correctly obtained an IP address.


可见eth0(4G CAT1模块)已经正确获得了ip地址。'''''如果没有获取IP地址,请运行<code>dhclient eth1</code>'''''
'''''If it has not obtained an IP address, please execute <code>dhclient eth1</code>.'''''


ping IP和ping域名都能通,说明4G模块工作正常:
Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_54.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_54.jpg


== '''五、 NEO Air配CAT1的操作''' ==
== '''V. Operations for NEO Air with CAT1''' ==
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_65.jpg


=== 5.1 基于Debian系统 ===
=== 5.1 Work with Debian OS ===
NEO Air的系统是烧写在eMMC中的,本节所用系统为友善官方系统:h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz
The system for NEO Air is flashed into the eMMC storage.


硬件连接是用USB转TTL串口模块将NEO Air与PC相连,如下图所示:
The version of the FriendlyElec system we tested: h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz


Connection Method: Connect the NEO Air to the computer using a USB-to-TTL serial module, as shown in the figure below:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_66.jpg


打开MobaXterm,按下图设置好TTL串口:
Open MobaXterm and configure the TTL serial port as shown in the figure below:


'''''注意:波特率使用115200'''''
'''''Note: Use a baud rate of 115200.'''''


http://www.mcuzone.com/wiki/4003_FriendlyElec_NanoPi_NEO3/4003_FriendlyElec_NanoPi_NEO3_74.jpg
http://www.mcuzone.com/wiki/4003_FriendlyElec_NanoPi_NEO3/4003_FriendlyElec_NanoPi_NEO3_74.jpg


然后打开这个串口,登录Debian系统(用户名<code>root</code>,密码<code>fa</code>)。
Then open this serial port and log in to the Debian system (username: <code>root</code>, password: <code>fa</code>).


执行<code>ifconfig -a</code>,查看网络参数如下:
Excecute <code>ifconfig -a</code> to view the following network parameters:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_49.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_49.jpg


可见eth0(4G CAT1模块)已经正确获得了ip地址。'''''如果没有获取IP地址,请运行<code>dhclient eth0</code>'''''
Note: eth0 (the 4G CAT1 module) has correctly obtained an IP address.
 
'''''If it has not obtained an IP address, please execute <code>dhclient eth0</code>.'''''


ping IP能通,但ping域名报错,说明此时DNS地址有问题,需要设置正确的DNS地址:
Pinging the IP address succeeds, but pinging a domain name results in an error, indicating that the system needs to have its DNS addresses configured:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_50.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_50.jpg


设置方法如下:
The setup method is as follows:


修改resolv.conf文件:
Edit the resolv.conf file:


<code>sudo nano /etc/resolv.conf</code>
<code>sudo nano /etc/resolv.conf</code>


添加下图红框中的通用DNS地址(如所示的114.114.114.114,或者其它的通用DNS地址):
Add the address in the red box in the image below to a general DNS server address (such as 114.114.114.114, or any other general DNS address):


<code>nameserver 114.114.114.114</code>
<code>nameserver 114.114.114.114</code>
第380行: 第333行:
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_51.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_51.jpg


保存并退出。此时再ping域名和ping IP,都正常:
Save and exit.
 
At this point, pinging the domain name and pinging the IP address both succeed:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_52.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_52.jpg


不过,这种修改方式在系统重启后,resolv.conf文件内的DNS会被修改到默认地址,所以如果需要开机自动启动4G上网,还需要修改resolv.conf文件的权限,因为/etc/resolv.conf实际上是个软链接,所以需要重新生成resolv.conf文件才能修改权限,方法如下:
However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses. Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:


<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
第390行: 第345行:
<code>sudo nano /etc/resolv.conf</code>
<code>sudo nano /etc/resolv.conf</code>


这样就重新建立了resolv.conf文件,在这个新建的文件中输入:
This recreates the resolv.conf file. In this newly created file, enter the following:


<code>nameserver 114.114.114.114</code>
<code>nameserver 114.114.114.114</code>


保存退出,然后执行:
Save and exit, then execute:


<code>sudo chattr +i /etc/resolv.conf</code>
<code>sudo chattr +i /etc/resolv.conf</code>


做完上述步骤后,重启系统,resolv.conf文件的内容也不会变化了。
After completing the above steps, restart the system, and the contents of the resolv.conf file will remain unchanged.


=== 5.2 基于Ubuntu系统 ===
=== 5.2 Work with Ubuntu OS ===
NEO Air默认内置Ubuntu系统(位于eMMC上)
Configure the TTL serial port in the same manner as with the Debian OS, then open this serial port. By default, the system logs in with the user account pi.


按与Debian系统同样的方法设置好TTL串口,然后打开这个串口,登录Ubuntu系统,默认系统是登录pi这个账号,输入:
Execute <code>sudo su</code>to switch to the root account (password: <code>pi</code>).


<code>sudo su</code>
Excecute <code>ifconfig -a</code> to view the following network parameters:
 
切换到sudo账号(密码输入pi)。
 
执行<code>ifconfig -a</code>,查看网络参数如下:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_55.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_55.jpg


可见enx2089846a96ab(4G CAT1模块)已经正确获得了ip地址(注:enx后面的数字是4G模组的mac地址,每个模组都不一样,请以实际为准)。'''''如果没有获取IP地址,请运行<code>dhclient enx2089846a96ab</code>。'''''
Note: enx2089846a96ab (the 4G CAT1 module) has correctly obtained an IP address. (Note: The numbers following 'enx' represent the MAC address of the 4G module, which is unique for each module. Please refer to the actual device.) '''''If it has not obtained an IP address, please execute <code>dhclient enx2089846a96ab</code>。'''''


ping IP和ping域名都能通,说明4G模块工作正常:
Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_48.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_48.jpg


== '''六、4G模组相关操作''' ==
== '''VI. 4G Operations''' ==


=== 6.1 网络优先级的修改 ===
=== 6.1 Modification of Network Priority ===
NEO的Debian系统和Ubuntu系统在4G网络和有线网络共存的情况下,默认优先通过4G网络上网;
For Ubuntu and Debian OS, when both the network port (Ethernet) and 4G are available on the Neo board, the default behavior is to prioritize the 4G connection.


NEO Air的Debian系统和Ubuntu系统在4G网络和无线网络共存的情况下,默认也是优先通过4G网络上网。
When both the wireless and 4G are available on the Neo Air board, the default behavior is to prioritize the 4G connection.


如果要优先使用有线网络/无线网络上网的话,可以运行命令:
If you want to prioritize the wired or wireless network for internet access, you can execute the following command:


<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>
<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>


这两条命令(以“&&”分隔)的解释:
Explanation of these two commands (separated by '&&'):


<code>sudo ip route del default</code>:删除路由表中的默认路由;
<code>sudo ip route del default</code>: Remove the default route from the routing table.


<code>sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>:添加有线网络/无线网络的网关为新的默认路由(网关地址以实际为准)。
<code>sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>: Add the gateway of the wired or wireless network as a new default route (ensure to use the actual gateway address).


执行完毕后,再执行<code>route</code>,查看路由表,目前的默认路由为有线网络/无线网络的网关:
After completing the execution, execute the <code>route</code> command to view the routing table. The current default route is the gateway of the wired or wireless network:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_27.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_27.jpg


这样网络就默认走有线网络/无线网络了,如果需要改回默认走4G网络,请运行:
This way, the network will default to using the wired or wireless connection. If you need to switch back to defaulting to the 4G network, please execute the following command:


<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.10.1</code>
<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.10.1</code>


或者重启系统即可。
Or, you can restart the system.


其中192.168.10.1为4G模组的默认网关,请以实际为准。
Note that 192.168.10.1 is the default gateway for the 4G module; please refer to the actual configuration.


'''''注意,重启后路由表还是会恢复原状,所以如果重启后要网络继续默认走有线网络/无线网络,需要再执行一次<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>'''''
'''''Note: After a reboot, the routing table resets. To ensure the network continues to use the wired or wireless connection as the default route post-restart, you'll need to execute  <code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code> again.'''''


=== 6.2 AT命令操作 ===
=== 6.2 AT command operation ===
适用于NEO/NEO Core/NEO Air
Applicable to NEO/NEO Core/NEO Air.


如果无法执行<code>lsusb</code>,请先安装usbutils:
If the <code>lsusb</code> command is not available, please install the <code>usbutils</code> package first:


<code>sudo apt install usbutils</code>
<code>sudo apt install usbutils</code>


使用<code>lsusb</code>查看USB设备,红框处即为4G模组:
Use the <code>lsusb</code> command to list all connected USB devices, the entry marked in the red box indicates the 4G module:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_06.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_06.jpg


然后安装串口软件minicom:
Then install the serial port software <code>minicom</code>:


<code>apt install minicom</code>
<code>apt install minicom</code>


然后执行:
Execute:


<code>ls /dev</code>
<code>ls /dev</code>


此时应该能看到dev设备下有ttyACM0-2三个设备:
You should now see three devices, <code>ttyACM0</code> to <code>ttyACM2</code>, under <code>/dev</code>:


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_07.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_07.jpg


通过minicom打开AT命令串口:
Open the AT command serial port using minicom:


<code>minicom -D /dev/ttyACM0</code>
<code>minicom -D /dev/ttyACM0</code>


如果需要查看回显,请键入命令:<code>ate1</code>,然后回车,继续键入其它命令,回车可以看到结果。
If you need to view echo responses, type the command: <code>ATE1</code>, then press Enter. You can continue to type other commands, and after pressing Enter, you will see the results.


http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_08.jpg
http://www.mcuzone.com/wiki/4006_FriendlyElec_NanoPi_NEO_CAT1/4006_FriendlyElec_NanoPi_NEO_CAT1_08.jpg


常用AT命令:
Common AT commands:


1. 检查SIM卡是否识别到:
1) Check if the SIM card is detected:


<code>at+cpin?</code>
<code>at+cpin?</code>


返回ready表示卡已识别,返回error要检查硬件
Return ready to indicate the card has been recognized, if return error, you need to check the hardware.


2. 检查天线信号质量:
2) Check antenna signal quality:


<code>at+csq</code>
<code>at+csq</code>


返回值在26-31表示信号OK,信号满格31;返回值在20-25表示信号勉勉强强;返回值在20以下表示信号比较糟糕或者天线没接
eturn values between 26 and 31 indicate a good signal, with 31 representing a full signal strength; return values between 20 and 25 indicate a barely acceptable signal; return values below 20 indicate a poor signal or that the antenna might not be connected.


3. 检查注网情况:
3) Check network registration status:


<code>at+cops?</code>
<code>at+cops?</code>


正常应该返回运营商代码和7,7代表4G。
Normally, it should return the network supporter's code: 7, where 7 represents 4G.


注意,以上命令只有<code>at+csq</code>不要加问号,另外两条命令需要加问号。
Note: The above command <code>at+csq</code> should not include a question mark, while the other two commands require a question mark.


4. 查看4G模块的IMEI码:
4) View the SIM card's IMEI code:


<code>at+cgsn</code>
<code>at+cgsn</code>


5. 重启4G模块(有时候如果重插SIM卡,热插拔不一定管用,可以用这个reset命令来复位模块):
5) Reset 4G module (Sometimes, if you reinsert the SIM card, hot swapping may not work; in such cases, you can use this reset command to reset the module.):


<code>at+reset</code>
<code>at+reset</code>


6. 关闭射频:
6) Disable radio frequency:


<code>at+cfun=0</code>
<code>at+cfun=0</code>


开启射频:
Enable radio frequency:


<code>at+cfun=1</code>
<code>at+cfun=1</code>


上述两条命令成对使用,可以在不重启4G模组的情况下让模组重新注网。
The two commands mentioned above can be used in pairs to allow the module to re-register with the network without restarting the 4G module.


=== 6.3 修改4G模组的IP地址 ===
=== 6.3 Modify the IP address of the 4G module ===
适用于NEO/NEO Core/NEO Air
Applicable to NEO/NEO Core/NEO Air.


执行AT命令:
Execute the AT command:


<code>AT+ROUTEIP=<newip></code>
<code>AT+ROUTEIP=<newip></code>


注意,只支持192.168.x.2这样格式的地址,设置完毕后需断电重启系统。
Note: Only addresses in the format of 192.168.x.2 are supported. After completing the settings, you need to power off and restart the system.


查询当前IP:<code>AT+ROUTEIP?</code>
Check the current IP: <code>AT+ROUTEIP?</code>


测试IP是否生效:<code>AT+ROUTEIP=?</code>
Verify whether the IP address is active: <code>AT+ROUTEIP=?</code>


== '''七、总结''' ==
== '''VII. Summary''' ==
此处我们只是基于CAT1的使用操作,不涉及到NanoPi开发板自身的操作及软件系统,关于NanoPi NEO/NEO Core/NEO Air开发板资料,请前往友善官网查阅:
We only introduce the usage and operations based on CAT1, without covering the operations and software system specific to the NanoPi development board itself. For information about the NanoPi NEO/NEO Core/NEO Air development boards, please visit the FriendlyElec official website:


https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO/zh
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO/zh
第543行: 第494行:
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO_Air/zh
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO_Air/zh


{{联系我们_图标}}
{{Contact_Us_icon}}
 
[http://wiki.mcuzone.com/index.php?title=4006_NEO_CAT1_(EN) T]

2024年12月26日 (四) 15:38的最新版本

切换语言为中文

Keywords

FriendlyElec NanoPi, NEO, NEO Air, NEO Core, Allwinner H3, Cortex-A7, NEO CAT1, 4G LTE, Ubuntu, Debian, IoT

I. Introduction

NEO CAT1 is a 4G LTE product which we designed based on the FriendlyElec NanoPi series featuring the H3 CPU motherboard (including NEO, NEO Core and NEO Air). The 4G module is a USB device that utilizes the USB IO pins on the NEO development board for communication and power supply, thereby providing 4G network connectivity to the NEO series boards.

4G Cat1 is a high-cost-performance module aimed at low-speed IoT applications with speeds around 10Mbps. The rates of 10Mbps downlink and 5Mbps uplink can meet the majority of connectivity and transmission requirements.

NEO CAT1, in conjunction with NEO series, enables the creation of a low-cost IoT device. The 4G module is driver-free, on FriendlyElec's Ubuntu and Debian systems, the device is automatically recognized, requiring no additional driver installation.

II. Hardware Spec

1. One USB 2.0 port, used for powering and communication with the 4G module. The module comes in two packaging options: one is a female header connector, designed for connecting to the NEO development board. The other is a 1.25mm-4P interface, intended for connecting to other development boards that are not NEO Core, NEO, or NEO Air. You may choose one of the two interfaces.

2. One 4G CAT1 LTE.

3. One IPEX Gen 1 antenna port.

4. One Nano SIM slot.

5. Three LEDs: STS, MODE, and NET.

6. Two M2.5 mounting holes.

7. Size: The maximum size is 39x30mm.

8. PCB board: 2-layer, with gold plating process, lead-free production; the material is UL and RoHS certified, with a fire rating of 94V-0.

4006_FriendlyElec_NanoPi_NEO_CAT1_58.jpg

4006_FriendlyElec_NanoPi_NEO_CAT1_59.jpg

4006_FriendlyElec_NanoPi_NEO_CAT1_69.jpg

model CAT1 CAT1-EU
Band FDD:B1/B3/B5/B8 FDD:B1/B3/B5/B7/B8/B20/28(A/B)
TDD:B34/B38/B39/B40/B41 TDD:B38/B40/B41
DATA FDD: Max 10Mbps(DL)/Max 5Mbps(UL)

TDD:Max 8Mbps(DL)/Max 2Mbps(UL)

Max 6Mbps(DL)/Max 4Mbps(UL)

III. Operations for NEO with CAT1

4006_FriendlyElec_NanoPi_NEO_CAT1_63.jpg

3.1 Work with Debian OS

Flash the Debian system (command-line version, without a GUI) to the TF card.

The version of the FriendlyElec system we tested: h3-sd-debian-bookworm-core-4.14-armhf-20240818.img.gz

NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.

3.1.1 Operate through TTL serial connection to PC

Insert the SIM card and the TF card with the system. And connect the USB port of the USB-to-TTL serial module to the PC, as shown in the figure below:

4006_FriendlyElec_NanoPi_NEO_CAT1_64.jpg

Then download and install the terminal software MobaXterm on your PC. The download link for MobaXterm is:

https://mobaxterm.mobatek.net/download-home-edition.html

Open MobaXterm and configure the TTL serial port as shown in the figure below:

Note: Use a baud rate of 115200.

4006_FriendlyElec_NanoPi_NEO_CAT1_70.jpg

Then open this serial port and log in to the Debian system (username: root, password: fa):

4006_FriendlyElec_NanoPi_NEO_CAT1_29.jpg

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_37.jpg

eth0 is the NEO's own Ethernet port, which does not have an IP address since it is not connected to a network cable.

eth1 is the 4G CAT1, which has correctly obtained an IP address. We performed a ping test, and the results are as follows:

4006_FriendlyElec_NanoPi_NEO_CAT1_38.jpg

Pinging the IP address succeeds, but pinging a domain name results in an error, indicating that the system needs to have its DNS addresses configured. The setup method is as follows:

Edit the resolv.conf file:

sudo nano /etc/resolv.conf

Change the address in the red box in the image below to a general DNS server address (such as 114.114.114.114, or any other general DNS address):

4006_FriendlyElec_NanoPi_NEO_CAT1_26.jpg

If the DNS addresses are not set in the file, please enter:

nameserver 114.114.114.114

Save and exit.

At this point, pinging the domain name and pinging the IP address both succeed:

4006_FriendlyElec_NanoPi_NEO_CAT1_39.jpg

However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses.

Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:

sudo mv /etc/resolv.conf /etc/resolv.conf.link

sudo nano /etc/resolv.conf

This recreates the resolv.conf file. In this newly created file, enter the following:

nameserver 114.114.114.114

Save and exit, then execute:

sudo chattr +i /etc/resolv.conf

After completing the above steps, restart the system, and the contents of the resolv.conf file will remain unchanged.

3.1.2 Operate through SSH over Ethernet

Connect NEO's Ethernet port to the upstream router using an Ethernet cable, then connect the PC to the same upstream router. Insert the SIM card and the TF card with the system. After the system starts, check NEO's IP address through the router's backend. In this document, the address obtained by the system is: 192.168.8.110.

Then use MobaXterm to connect to the system via SSH (username: root, password: fa):

4006_FriendlyElec_NanoPi_NEO_CAT1_35.jpg

4006_FriendlyElec_NanoPi_NEO_CAT1_02.jpg

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_03.jpg

eth0 is the NEO's own Ethernet port, and eth1 is the 4G CAT1 module; both have correctly obtained IP addresses.

In the previous section, we have already set up a general DNS address. Now, we will perform ping tests separately through eth0 and eth1:

ping www.mcuzone.com -I eth0

ping www.mcuzone.com -I eth1

4006_FriendlyElec_NanoPi_NEO_CAT1_05.jpg

Confirms successful internet access via both wired and 4G networks.

3.2 Work with Ubuntu OS

Flash the Ubuntu system (command-line version, without a GUI) to the TF card.

The version of the FriendlyElec system we tested: h3-sd-ubuntu-noble-core-20240823.img.gz

NEO has an Ethernet port, so there are two methods for operation: one is to connect to a computer via a USB-to-TTL serial module, and the other is to connect to a router using the Ethernet port and access it through SSH.

3.2.1 Operate through TTL serial connection to PC

The operations for connecting to the computer via a TTL serial port are the same under Debian, please refer to Section 3.1.1.

Open this serial port and log in to the Ubuntu system (username: root, password: fa):

4006_FriendlyElec_NanoPi_NEO_CAT1_30.jpg

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_40.jpg

eth0 is the NEO's own Ethernet port, which does not have an IP address since it is not connected to a network cable. eth1 is the 4G CAT1 module, which has correctly obtained an IP address. We performed a ping test, and the results are as follows:

4006_FriendlyElec_NanoPi_NEO_CAT1_41.jpg

Pinging the IP address succeeds, but pinging a domain name results in an error, indicating that the system needs to have its DNS addresses configured. The setup method is as follows:

Edit the resolv.conf file:

sudo vi /etc/resolv.conf

Change the address in the red box in the image below to a general DNS server address (such as 114.114.114.114, or any other general DNS address):

4006_FriendlyElec_NanoPi_NEO_CAT1_42.jpg

If the DNS addresses are not set in the file, please enter:

nameserver 114.114.114.114

Save and exit.

At this point, pinging the domain name and pinging the IP address both succeed:

4006_FriendlyElec_NanoPi_NEO_CAT1_43.jpg

However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses. Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:

sudo mv /etc/resolv.conf /etc/resolv.conf.link

sudo vi /etc/resolv.conf

This recreates the resolv.conf file. In this newly created file, enter the following:

nameserver 114.114.114.114

Save and exit, then execute:

sudo chattr +i /etc/resolv.conf

After completing the above steps, restart the system, and the contents of the resolv.conf file will remain unchanged.

3.2.2 Operate through SSH over Ethernet

Connect NEO's Ethernet port to the upstream router using an Ethernet cable, then connect the PC to the same upstream router. Insert the SIM card and the TF card with the system. After the system starts, check NEO's IP address through the router's backend. In this document, the address obtained by the system is: 192.168.8.77.

Then use MobaXterm to connect to the system via SSH (username: root, password: fa):

4006_FriendlyElec_NanoPi_NEO_CAT1_34.jpg

4006_FriendlyElec_NanoPi_NEO_CAT1_36.jpg

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_31.jpg

eth0 is the NEO's own Ethernet port, and eth1 is the 4G CAT1 module; both have correctly obtained IP addresses.

In the previous section, we have already set up a general DNS address. Now, we will perform ping tests separately through eth0 and eth1:

ping www.mcuzone.com -I eth0

ping www.mcuzone.com -I eth1

4006_FriendlyElec_NanoPi_NEO_CAT1_33.jpg

Confirms successful internet access via both wired and 4G networks.

IV. Operations for NEO Core with CAT1

4006_FriendlyElec_NanoPi_NEO_CAT1_61.jpg

4.1 Work with Debian OS

The system for NEO Core is flashed into the eMMC storage.

The version of the FriendlyElec system we tested: h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz

Connection Method: Connect the NEO Core to the computer using a USB-to-TTL serial module, as shown in the figure below:

4006_FriendlyElec_NanoPi_NEO_CAT1_62.jpg

Open MobaXterm and configure the TTL serial port as shown in the figure below:

Note: Use a baud rate of 115200.

4003_FriendlyElec_NanoPi_NEO3_74.jpg

Then open this serial port and log in to the Debian system (username: root, password: fa).

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_56.jpg

Note: eth1 (the 4G CAT1 module) has correctly obtained an IP address.

If it has not obtained an IP address, please execute dhclient eth1.

Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:

4006_FriendlyElec_NanoPi_NEO_CAT1_57.jpg

4.2 Work with Ubuntu OS

NEO Core comes with Ubuntu system pre-installed on the eMMC by default.

Configure the TTL serial port in the same manner as with the Debian OS, then open this serial port. By default, the system logs in with the user account pi.

Execute sudo suto switch to the root account (password: pi).

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_53.jpg

Note: eth1 (the 4G CAT1 module) has correctly obtained an IP address.

If it has not obtained an IP address, please execute dhclient eth1.

Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:

4006_FriendlyElec_NanoPi_NEO_CAT1_54.jpg

V. Operations for NEO Air with CAT1

4006_FriendlyElec_NanoPi_NEO_CAT1_65.jpg

5.1 Work with Debian OS

The system for NEO Air is flashed into the eMMC storage.

The version of the FriendlyElec system we tested: h3-eflasher-debian-bookworm-core-4.14-armhf-20240818.img.gz

Connection Method: Connect the NEO Air to the computer using a USB-to-TTL serial module, as shown in the figure below:

4006_FriendlyElec_NanoPi_NEO_CAT1_66.jpg

Open MobaXterm and configure the TTL serial port as shown in the figure below:

Note: Use a baud rate of 115200.

4003_FriendlyElec_NanoPi_NEO3_74.jpg

Then open this serial port and log in to the Debian system (username: root, password: fa).

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_49.jpg

Note: eth0 (the 4G CAT1 module) has correctly obtained an IP address.

If it has not obtained an IP address, please execute dhclient eth0.

Pinging the IP address succeeds, but pinging a domain name results in an error, indicating that the system needs to have its DNS addresses configured:

4006_FriendlyElec_NanoPi_NEO_CAT1_50.jpg

The setup method is as follows:

Edit the resolv.conf file:

sudo nano /etc/resolv.conf

Add the address in the red box in the image below to a general DNS server address (such as 114.114.114.114, or any other general DNS address):

nameserver 114.114.114.114

4006_FriendlyElec_NanoPi_NEO_CAT1_51.jpg

Save and exit.

At this point, pinging the domain name and pinging the IP address both succeed:

4006_FriendlyElec_NanoPi_NEO_CAT1_52.jpg

However, after making these changes, if the system restarts, the DNS entries in the resolv.conf file will be reset to their default addresses. Therefore, if you need the 4G internet connection to start automatically upon boot, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a symbolic link, you need to regenerate the resolv.conf file in order to modify its permissions. The method to do so is as follows:

sudo mv /etc/resolv.conf /etc/resolv.conf.link

sudo nano /etc/resolv.conf

This recreates the resolv.conf file. In this newly created file, enter the following:

nameserver 114.114.114.114

Save and exit, then execute:

sudo chattr +i /etc/resolv.conf

After completing the above steps, restart the system, and the contents of the resolv.conf file will remain unchanged.

5.2 Work with Ubuntu OS

Configure the TTL serial port in the same manner as with the Debian OS, then open this serial port. By default, the system logs in with the user account pi.

Execute sudo suto switch to the root account (password: pi).

Excecute ifconfig -a to view the following network parameters:

4006_FriendlyElec_NanoPi_NEO_CAT1_55.jpg

Note: enx2089846a96ab (the 4G CAT1 module) has correctly obtained an IP address. (Note: The numbers following 'enx' represent the MAC address of the 4G module, which is unique for each module. Please refer to the actual device.) If it has not obtained an IP address, please execute dhclient enx2089846a96ab

Both pinging the IP address and pinging the domain name succeed, indicating that the 4G module is functioning properly:

4006_FriendlyElec_NanoPi_NEO_CAT1_48.jpg

VI. 4G Operations

6.1 Modification of Network Priority

For Ubuntu and Debian OS, when both the network port (Ethernet) and 4G are available on the Neo board, the default behavior is to prioritize the 4G connection.

When both the wireless and 4G are available on the Neo Air board, the default behavior is to prioritize the 4G connection.

If you want to prioritize the wired or wireless network for internet access, you can execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1

Explanation of these two commands (separated by '&&'):

sudo ip route del default: Remove the default route from the routing table.

sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1: Add the gateway of the wired or wireless network as a new default route (ensure to use the actual gateway address).

After completing the execution, execute the route command to view the routing table. The current default route is the gateway of the wired or wireless network:

4006_FriendlyElec_NanoPi_NEO_CAT1_27.jpg

This way, the network will default to using the wired or wireless connection. If you need to switch back to defaulting to the 4G network, please execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.10.1

Or, you can restart the system.

Note that 192.168.10.1 is the default gateway for the 4G module; please refer to the actual configuration.

Note: After a reboot, the routing table resets. To ensure the network continues to use the wired or wireless connection as the default route post-restart, you'll need to execute sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1 again.

6.2 AT command operation

Applicable to NEO/NEO Core/NEO Air.

If the lsusb command is not available, please install the usbutils package first:

sudo apt install usbutils

Use the lsusb command to list all connected USB devices, the entry marked in the red box indicates the 4G module:

4006_FriendlyElec_NanoPi_NEO_CAT1_06.jpg

Then install the serial port software minicom:

apt install minicom

Execute:

ls /dev

You should now see three devices, ttyACM0 to ttyACM2, under /dev:

4006_FriendlyElec_NanoPi_NEO_CAT1_07.jpg

Open the AT command serial port using minicom:

minicom -D /dev/ttyACM0

If you need to view echo responses, type the command: ATE1, then press Enter. You can continue to type other commands, and after pressing Enter, you will see the results.

4006_FriendlyElec_NanoPi_NEO_CAT1_08.jpg

Common AT commands:

1) Check if the SIM card is detected:

at+cpin?

Return ready to indicate the card has been recognized, if return error, you need to check the hardware.

2) Check antenna signal quality:

at+csq

eturn values between 26 and 31 indicate a good signal, with 31 representing a full signal strength; return values between 20 and 25 indicate a barely acceptable signal; return values below 20 indicate a poor signal or that the antenna might not be connected.

3) Check network registration status:

at+cops?

Normally, it should return the network supporter's code: 7, where 7 represents 4G.

Note: The above command at+csq should not include a question mark, while the other two commands require a question mark.

4) View the SIM card's IMEI code:

at+cgsn

5) Reset 4G module (Sometimes, if you reinsert the SIM card, hot swapping may not work; in such cases, you can use this reset command to reset the module.):

at+reset

6) Disable radio frequency:

at+cfun=0

Enable radio frequency:

at+cfun=1

The two commands mentioned above can be used in pairs to allow the module to re-register with the network without restarting the 4G module.

6.3 Modify the IP address of the 4G module

Applicable to NEO/NEO Core/NEO Air.

Execute the AT command:

AT+ROUTEIP=<newip>

Note: Only addresses in the format of 192.168.x.2 are supported. After completing the settings, you need to power off and restart the system.

Check the current IP: AT+ROUTEIP?

Verify whether the IP address is active: AT+ROUTEIP=?

VII. Summary

We only introduce the usage and operations based on CAT1, without covering the operations and software system specific to the NanoPi development board itself. For information about the NanoPi NEO/NEO Core/NEO Air development boards, please visit the FriendlyElec official website:

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO/zh

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO_Core/zh

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO_Air/zh

Contact Us

0001_x.jpg 0002_fb.jpg 0004_ytb.jpg 0003_bb.jpg 0005_qq.jpg QQ:8204136

Email: mcuzone@vip.qq.com

Tel: +86(0)13957118045

If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!

Copyright 2004-2025 Wildchip

T