RPi 4 w/ 3G/4G Base HAT QMI does not gain lease

Hello,

I recently purchased the 3G/4G&LTE Base HAT and ran through the Tutorial to connect to my RPi 4b (skipping steps 4-7 as stated) but the ./quectel-CM script stalls at “udhcpc: no lease, failing”.

The modem is connected and I can see the wwan0 interface in “ifconfig”

I am using an AT&T sim card and the cmd “sudo ./quectel-CM -s NXTGENPHONE”

below are the outputs of the script and “dmesg | grep tty*”

[06-17_12:52:07:265] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[06-17_12:52:07:265] ./quectel-CM profile[1] = NXTGENPHONE///0, pincode = (null)
[06-17_12:52:07:266] Find /sys/bus/usb/devices/1-1.1 idVendor=2c7c idProduct=0125
[06-17_12:52:07:266] Find /sys/bus/usb/devices/1-1.1:1.4/net/wwan0
[06-17_12:52:07:266] Find usbnet_adapter = wwan0
[06-17_12:52:07:267] Find /sys/bus/usb/devices/1-1.1:1.4/usbmisc/cdc-wdm0
[06-17_12:52:07:267] Find qmichannel = /dev/cdc-wdm0
[06-17_12:52:07:287] cdc_wdm_fd = 8
[06-17_12:52:07:386] Get clientWDS = 19
[06-17_12:52:07:417] Get clientDMS = 1
[06-17_12:52:07:450] Get clientNAS = 3
[06-17_12:52:07:482] Get clientUIM = 1
[06-17_12:52:07:514] Get clientWDA = 1
[06-17_12:52:07:546] requestBaseBandVersion EC25AFAR05A04M4G
[06-17_12:52:07:674] requestGetSIMStatus SIMStatus: SIM_READY
[06-17_12:52:07:674] requestSetProfile[1] NXTGENPHONE///0
[06-17_12:52:07:737] requestGetProfile[1] NXTGENPHONE///0
[06-17_12:52:07:770] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
[06-17_12:52:07:802] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[06-17_12:52:07:866] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
[06-17_12:52:07:897] requestSetupDataCall WdsConnectionIPv4Handle: 0x8722c080
[06-17_12:52:07:961] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
[06-17_12:52:07:993] ifconfig wwan0 up
[06-17_12:52:08:003] busybox udhcpc -f -n -q -t 5 -i wwan0
[06-17_14:52:39:607] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.30.1
cat: /run/resolvconf/lock/pid: No such file or directory
/usr/sbin/resolvconf: 733: kill: Illegal number: 
clearing stale lock pid 
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
[06-17_12:53:42:196] requestDeactivateDefaultPDP err = 0
[06-17_12:53:42:196] ifconfig wwan0 down
[06-17_12:53:42:215] ifconfig wwan0 0.0.0.0
[06-17_12:53:42:411] QmiWwanThread exit
[06-17_12:53:42:412] main exit

dmesg

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:0B:E7:34 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
[    0.000708] console [tty1] enabled
[    0.002937] Setting up static identity map for 0x200000 - 0x20003c
[    0.050015] raspberrypi-firmware soc:firmware: Attached to firmware from 2020-02-12 12:36, variant start
[    0.520370] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[    0.528405] console [ttyS0] disabled
[    0.531123] fe215040.serial: ttyS0 at MMIO 0x0 (irq = 37, base_baud = 62500000) is a 16550
[    2.273992] console [ttyS0] enabled
[   18.613394] systemd[1]: Created slice system-getty.slice.
[  147.348649] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[  147.349157] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[  147.349507] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[  147.349864] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
[  562.554938] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  562.555996] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  562.556693] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  562.557541] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 2563.620371] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[ 2563.622253] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[ 2563.622911] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[ 2563.623543] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3

uname -a

Linux pisdr 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

Any help with getting this connected to the internet would be greatly appreciated!

1 Like

Had the same problem, I ran the installer after deleting the files folder containing the QMI files etc and that solved the issue for me.

Hi @dillonsisneros

These errors relate to the configuration of DNS servers in your resolv.conf file.
Also, the modem fails to get IP address from network. You could check the network status before establish wwan0.

AT+CGREG?
AT+COPS?
AT+CGDCONT?
AT+CGPADDR

Same issue here…

pi@4gmodem:~/files/quectel-CM $ sudo ./quectel-CM -s internet
[07-25_15:28:43:078] Quectel_QConnectManager_Linux_V1.5.9
[07-25_15:28:43:080] Find /sys/bus/usb/devices/1-1.1 idVendor=0x2c7c idProduct=0x125, bus=0x001, dev=0x003
[07-25_15:28:43:080] Auto find qmichannel = /dev/cdc-wdm0
[07-25_15:28:43:080] Auto find usbnet_adapter = wwan0
[07-25_15:28:43:080] netcard driver = qmi_wwan, driver version = 22-Aug-2005
[07-25_15:28:43:081] Modem works in QMI mode
[07-25_15:28:43:091] /proc/617/fd/7 -> /dev/cdc-wdm0
[07-25_15:28:43:092] /proc/617/exe -> /home/pi/files/quectel-CM/quectel-CM
[07-25_15:28:45:093] cdc_wdm_fd = 7
[07-25_15:28:45:190] Get clientWDS = 20
[07-25_15:28:45:222] Get clientDMS = 1
[07-25_15:28:45:254] Get clientNAS = 4
[07-25_15:28:45:286] Get clientUIM = 1
[07-25_15:28:45:318] Get clientWDA = 1
[07-25_15:28:45:350] requestBaseBandVersion EC25EFAR06A04M4G
[07-25_15:28:45:479] requestGetSIMStatus SIMStatus: SIM_READY
[07-25_15:28:45:479] requestSetProfile[1] internet///0
[07-25_15:28:45:543] requestGetProfile[1] internet///0
[07-25_15:28:45:575] requestRegistrationState2 MCC: 228, MNC: 3, PS: Attached, DataCap: LTE
[07-25_15:28:45:606] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[07-25_15:28:45:606] ifconfig wwan0 down
[07-25_15:28:45:625] ifconfig wwan0 0.0.0.0
[07-25_15:28:45:671] requestSetupDataCall WdsConnectionIPv4Handle: 0x871c12d0
[07-25_15:28:45:799] ifconfig wwan0 up
[07-25_15:28:45:807] 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
[07-25_15:29:01:431] requestDeactivateDefaultPDP WdsConnectionIPv4Handle
[07-25_15:29:01:449] ifconfig wwan0 down
[07-25_15:29:01:461] ifconfig wwan0 0.0.0.0
[07-25_15:29:01:641] QmiWwanThread exit
[07-25_15:29:01:642] qmi_main exit
pi@4gmodem:~/files/quectel-CM $

WWAN0 is up with an autoconfiguration address:

pi@4gmodem:~/files/quectel-CM $ ifconfig wwan0
wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.241.163 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::dc37:ba44:e7f6:cbca prefixlen 64 scopeid 0x20
ether 86:9a:21:69:4e:61 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 158 bytes 26637 (26.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

The AT-Command queries shows:

AT+CGREG?
+CGREG: 0,1
OK

AT+COPS?
+COPS: 0,0,“Salt Salt”,7
OK

AT+CGDCONT?
+CGDCONT: 1,“IP”,“internet”,“0.0.0.0”,0,0,0,0
OK

AT+CGPADDR
+CGPADDR: 1,“10.152.233.209”
OK

Any hints?

Problem solved…
The dhcpcd service was running and interfered with udhcpc

So, are we supposed to have udhcpc startup on boot, instead of dhcpcd? How did you resolve your issue?

Just disable dhcpcd, udhcpc will start automatically when the QMI is launched.