Hi SixFab team!
I am still trying to get my IoT project up and running but am facing new issues with the wwan0 interface.
To make it short, I can’t get it to remain stable and, by stable, I mean that either its IP address (assigned by udhcpc
) will get unassigned or the wwan0 interface will not be visible when calling ifconfig
.
When I follow the “QMI Interface Internet Connection Setup Using Sixfab Shield/HAT” guide, this is the outcome:
- Just checking that my EP06 is detected by running
lsusb
:
lsusb
pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 004: ID 2c7c:0306 Quectel Wireless Solutions Co., Ltd. EG06/EP06/EM06 LTE-A modem
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- and
ifconfig
to see what my interfaces are looking like - as you can see, no wwan0 yet, only eth0 and lo:
ifconfig
pi@raspberrypi:~/files/quectel-CM $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.44 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::fbe:5cae:ede7:cae8 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:a3:a7:b0 txqueuelen 1000 (Ethernet)
RX packets 333 bytes 32776 (32.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 215 bytes 27796 (27.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- Now, I run
sudo ./quectel-CM -s <APN>
- which runs also fine and spawns wwan0 and gives it an IP address (10.17.133.107)…
sudo ./quectel-CM -s <APN>
pi@raspberrypi:~/files/quectel-CM $ sudo ./quectel-CM -s <APN>
[08-24_17:38:32:247] Quectel_QConnectManager_Linux_V1.6.0.12
[08-24_17:38:32:250] Find /sys/bus/usb/devices/1-1.1 idVendor=0x2c7c idProduct=0x306, bus=0x001, dev=0x004
[08-24_17:38:32:250] Auto find qmichannel = /dev/cdc-wdm0
[08-24_17:38:32:250] Auto find usbnet_adapter = wwan0
[08-24_17:38:32:250] netcard driver = qmi_wwan, driver version = 5.10.52-v7l+
[08-24_17:38:32:251] ioctl(0x89f3, qmap_settings) failed: Operation not supported, rc=-1
[08-24_17:38:32:251] Modem works in QMI mode
[08-24_17:38:32:267] cdc_wdm_fd = 7
[08-24_17:38:32:461] Get clientWDS = 20
[08-24_17:38:32:525] Get clientDMS = 1
[08-24_17:38:32:589] Get clientNAS = 2
[08-24_17:38:32:652] Get clientUIM = 2
[08-24_17:38:32:717] Get clientWDA = 1
[08-24_17:38:32:780] requestBaseBandVersion EP06ELAR03A06M4G
[08-24_17:38:33:036] requestGetSIMStatus SIMStatus: SIM_READY
[08-24_17:38:33:036] requestSetProfile[1] <APN>///0
[08-24_17:38:33:164] requestGetProfile[1] <APN>///0
[08-24_17:38:33:228] requestRegistrationState2 MCC: 248, MNC: 1, PS: Attached, DataCap: LTE
[08-24_17:38:33:292] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[08-24_17:38:33:293] ifconfig wwan0 down
[08-24_17:38:33:305] ifconfig wwan0 0.0.0.0
[08-24_17:38:33:356] requestSetupDataCall WdsConnectionIPv4Handle: 0x81afda10
[08-24_17:38:33:613] ifconfig wwan0 up
[08-24_17:38:33:626] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
[08-24_17:38:49:251] File:ql_raw_ip_mode_check Line:105 udhcpc fail to get ip address, try next:
[08-24_17:38:49:252] ifconfig wwan0 down
[08-24_17:38:49:268] echo Y > /sys/class/net/wwan0/qmi/raw_ip
[08-24_17:38:49:268] ifconfig wwan0 up
[08-24_17:38:49:281] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending select for 10.17.133.107
udhcpc: lease of 10.17.133.107 obtained, lease time 7200
Too few arguments.
Too few arguments.
ifconfig wwan0
pi@raspberrypi:~ $ ifconfig wwan0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.17.133.107 netmask 255.255.255.248 destination 10.17.133.107
inet6 fe80::9ade:37e9:fa0e:c8f4 prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 2 bytes 612 (612.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29 bytes 4912 (4.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- So, in parallel, I run a
ping
test on the newly spawned wwan0 interface with the command below (the&& ifconfig wwan0
is just to show wwan0 ifconfig data right after the pinging command ends/exits…):
ping -I wwan0 1.1.1.1 && ifconfig wwan0
pi@raspberrypi:~ $ ping -I wwan0 1.1.1.1 && ifconfig wwan0
PING 1.1.1.1 (1.1.1.1) from 10.17.133.107 wwan0: 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=60 time=175 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=60 time=1463 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=60 time=23.6 ms
64 bytes from 1.1.1.1: icmp_seq=6 ttl=60 time=800 ms
64 bytes from 1.1.1.1: icmp_seq=7 ttl=60 time=21.3 ms
64 bytes from 1.1.1.1: icmp_seq=8 ttl=60 time=20.0 ms
64 bytes from 1.1.1.1: icmp_seq=10 ttl=60 time=64.7 ms
64 bytes from 1.1.1.1: icmp_seq=11 ttl=60 time=83.7 ms
64 bytes from 1.1.1.1: icmp_seq=12 ttl=60 time=20.8 ms
64 bytes from 1.1.1.1: icmp_seq=13 ttl=60 time=36.8 ms
64 bytes from 1.1.1.1: icmp_seq=14 ttl=60 time=26.8 ms
- But after a few seconds of pinging, the
quectel-CM
outputs the following log before exiting andifconfig wwan0
shows that wwan0’s IP address is gone:
quectel-CM dies...
[08-24_17:39:56:111] QmiWwanThread poll err/hup/inval
[08-24_17:39:56:111] poll fd = 7, events = 0x0018
[08-24_17:39:56:111] QmiWwanThread exit
[08-24_17:39:56:111] requestQueryDataCall err = 0
[08-24_17:39:56:111] QmiWwanSendQMI cdc_wdm_fd = -1
[08-24_17:39:56:111] requestGetIPAddress err = -19
[08-24_17:39:56:111] requestDeactivateDefaultPDP WdsConnectionIPv4Handle
[08-24_17:39:56:111] QmiWwanSendQMI cdc_wdm_fd = -1
[08-24_17:39:56:111] requestDeactivateDefaultPDP err = -19
[08-24_17:39:56:111] ifconfig wwan0 down
wwan0: ERROR while getting interface flags: No such device
[08-24_17:39:56:142] ifconfig wwan0 0.0.0.0
SIOCSIFADDR: No such device
wwan0: ERROR while getting interface flags: No such device
[08-24_17:39:56:169] QmiWwanSendQMI cdc_wdm_fd = -1
[08-24_17:39:56:169] requestSetupDataCall err = -19
[08-24_17:39:56:169] try to requestSetupDataCall 5 second later
[08-24_17:39:56:169] qmi_main exit
pi@raspberrypi:~/files/quectel-CM $
pinging instance also dies and returns ifconfig wwan0...
pi@raspberrypi:~ $ ping -I wwan0 1.1.1.1 && ifconfig wwan0
PING 1.1.1.1 (1.1.1.1) from 10.1.228.63 wwan0: 56(84) bytes of data.
[...]
64 bytes from 1.1.1.1: icmp_seq=100 ttl=60 time=26.0 ms
64 bytes from 1.1.1.1: icmp_seq=101 ttl=60 time=24.5 ms
64 bytes from 1.1.1.1: icmp_seq=102 ttl=60 time=22.8 ms
64 bytes from 1.1.1.1: icmp_seq=103 ttl=60 time=20.8 ms
64 bytes from 1.1.1.1: icmp_seq=104 ttl=60 time=28.8 ms
64 bytes from 1.1.1.1: icmp_seq=105 ttl=60 time=26.9 ms
64 bytes from 1.1.1.1: icmp_seq=106 ttl=60 time=30.5 ms
64 bytes from 1.1.1.1: icmp_seq=107 ttl=60 time=24.1 ms
64 bytes from 1.1.1.1: icmp_seq=108 ttl=60 time=23.0 ms
64 bytes from 1.1.1.1: icmp_seq=109 ttl=60 time=21.6 ms
ping: sendmsg: No such device
ping: sendmsg: No such device
ping: sendmsg: No such device
ping: sendmsg: No such device
ping: sendmsg: No such device
ping: sendmsg: No such device
^C
--- 1.1.1.1 ping statistics ---
116 packets transmitted, 101 received, 12.931% packet loss, time 894ms
rtt min/avg/max/mdev = 15.919/28.327/174.255/16.122 ms
wwan0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 02:68:e8:df:43:8b txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Any idea as to why this is happening and what to do to fix it?
Thanks in advance.