sgarifool 发表于 2024-1-12 11:59:56

如何使用RK3328-PC和EC20 CE FHLG 4G模块上网

在使用EC20 CE FHLG 4G模块时, 由于该模块Linux免驱, 没有进行额外操作, 但是在配置好联通物联网卡的ANP之后, 一张连不上网


使用
cat /var/log/syslog | grep NetworkManager查看日志Jan 12 02:30:48 firefly NetworkManager: <info> device (usb0): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed')Jan 12 02:30:48 firefly NetworkManager: <info> manager: NetworkManager state is now DISCONNECTINGJan 12 02:30:48 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'disabled' --> 'enabling' (reason: user preference)Jan 12 02:30:48 firefly NetworkManager: <info> manager: (ttyUSB2): new Broadband device (/org/freedesktop/NetworkManager/Devices/7)Jan 12 02:30:48 firefly NetworkManager: <info> device (ttyUSB2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')Jan 12 02:30:48 firefly NetworkManager: <info> device (ttyUSB2): modem state 'enabling'Jan 12 02:30:48 firefly NetworkManager: <info> device (usb0): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed')Jan 12 02:30:48 firefly NetworkManager: <info> dhcp4 (usb0): canceled DHCP transaction, DHCP client pid 1086Jan 12 02:30:48 firefly NetworkManager: <info> dhcp4 (usb0): state changed bound -> doneJan 12 02:30:48 firefly NetworkManager: <info> manager: NetworkManager state is now DISCONNECTEDJan 12 02:30:48 firefly NetworkManager: <info> device (ttyUSB2): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')Jan 12 02:30:48 firefly dbus-daemon: Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.7' (uid=0 pid=588 comm="/usr/sbin/NetworkManager --no-daemon ")Jan 12 02:30:49 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'enabling' --> 'enabled' (reason: user-requested)Jan 12 02:30:49 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'enabled' --> 'registered' (reason: unknown)Jan 12 02:30:51 firefly NetworkManager: <info> device (ttyUSB2): Activation: starting connection 'China Unicom Default 1' (29679bda-c354-4c38-9790-e86b28375229)Jan 12 02:30:51 firefly NetworkManager: <info> audit: op="connection-activate" uuid="29679bda-c354-4c38-9790-e86b28375229" name="China Unicom Default 1" pid=811 uid=1000 result="success"Jan 12 02:30:51 firefly NetworkManager: <info> device (ttyUSB2): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')Jan 12 02:30:51 firefly NetworkManager: <info> manager: NetworkManager state is now CONNECTINGJan 12 02:30:51 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)Jan 12 02:30:51 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'connecting' --> 'connected' (reason: user-requested)Jan 12 02:30:51 firefly NetworkManager: <warn> device (ttyUSB2): ip-ifname: set ifname 'ttyUSB2', unknown ifindexJan 12 02:30:51 firefly NetworkManager: <info> device (ttyUSB2): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')Jan 12 02:30:51 firefly NetworkManager: <info> device (ttyUSB2): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')Jan 12 02:30:51 firefly NetworkManager: <warn> device (ttyUSB2): interface ttyUSB2 not up for IP configurationJan 12 02:30:51 firefly NetworkManager: <info> modem["ttyUSB2"]: using modem-specified IP timeout: 20 secondsJan 12 02:30:51 firefly NetworkManager: <info> loaded PPP plugin /usr/lib/aarch64-linux-gnu/NetworkManager/libnm-ppp-plugin.soJan 12 02:30:51 firefly NetworkManager: <error> modprobe: '/sbin/modprobe ppp_generic' exited with error 256 (modprobe: FATAL: Module ppp_generic not found in directory /lib/modules/4.4.194+)Jan 12 02:30:51 firefly NetworkManager: <info> ppp-manager: starting PPP connectionJan 12 02:30:51 firefly NetworkManager: <info> ppp-manager: pppd started with pid 1207Jan 12 02:30:51 firefly NetworkManager: Plugin /usr/lib/pppd/2.4.7/nm-pppd-plugin.so loaded.Jan 12 02:30:51 firefly NetworkManager: Couldn't open the /dev/ppp device: No such file or directoryJan 12 02:30:51 firefly NetworkManager: /usr/sbin/pppd: You need to create the /dev/ppp device node byJan 12 02:30:51 firefly NetworkManager: executing the following command as root:Jan 12 02:30:51 firefly NetworkManager: #011mknod /dev/ppp c 108 0Jan 12 02:30:51 firefly NetworkManager: <warn> ppp-manager: pppd pid 1207 exited with error 4: No ppp module errorJan 12 02:31:21 firefly NetworkManager: <info> modem["ttyUSB2"]: modem state changed, 'connected' --> 'registered' (reason: user-requested)Jan 12 02:31:21 firefly NetworkManager: <info> device (ttyUSB2): state change: ip-config -> failed (reason 'modem-no-carrier', sys-iface-state: 'managed')Jan 12 02:31:21 firefly NetworkManager: <info> manager: NetworkManager state is now DISCONNECTEDJan 12 02:31:21 firefly NetworkManager: <warn> device (ttyUSB2): Activation: failed for connection 'China Unicom Default 1'Jan 12 02:31:21 firefly NetworkManager: <info> device (ttyUSB2): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')

Lihokfung 发表于 2024-1-12 14:45:35

没有模组输出的结果,判断不了原因。最好用minicom或者sscom之类的串口工具先试一下,调试好了之后设置成自动拨号模式,下位机去做dhcp获取IP就行了

sgarifool 发表于 2024-1-12 15:16:32

Lihokfung 发表于 2024-1-12 14:45
没有模组输出的结果,判断不了原因。最好用minicom或者sscom之类的串口工具先试一下,调试好了之后设置成自 ...

你好, 能具体说一下如何操作吗, 比如如何获取模组输出, 或者如何使用串口工具测试吗, 给个参考链接就行, 感激不尽(这方面真没啥经验)

sgarifool 发表于 2024-1-12 16:18:43

我把log放到gpt里, 它说可能是:
与 ppp 模块相关。在你的系统上,ppp 模块似乎没有正确安装或加载。以下是一些步骤,你可以尝试解决这个问题:
(之后它让我重新安装ppp模块)

我使用: sudo apt-get install ppp 系统显示ppp已经是最新的版本
但是sudo modprobe ppp_generic 的时候会报错modprobe: FATAL: Module ppp_generic not found in directory /lib/modules/4.4.194+的错误

Lihokfung 发表于 2024-1-15 10:23:59

sgarifool 发表于 2024-1-12 15:16
你好, 能具体说一下如何操作吗, 比如如何获取模组输出, 或者如何使用串口工具测试吗, 给个参考链接就行,...

先执行ls /dev/ttyUSB*看看能不能识别到端口,如果可以的话就用echo、minicom进行调试;不行的话看一下lsusb或者usb-serial里面能不能识别到,还有一个是PIDVID的添加。我没有仔细看log,但log打印的应该是全局内容,不一定与模组相关,你也可以更新一下apt的源再进行apt-get update、grade
页: [1]
查看完整版本: 如何使用RK3328-PC和EC20 CE FHLG 4G模块上网