Udhcpc: no lease, failing

Hello,

I purchased this kit including the Quectel EC25. I followed the instructions from Sixfab, softwarewise, it all works well, but I fail to acquire an IP address using the script quectel-CM.

We have spent many hours on this, please help.


pi@P9:~/files/quectel-CM $ sudo ./quectel-CM -s TM
[08-20_00:12:08:242] Quectel_QConnectManager_Linux_V1.5.9
[08-20_00:12:08:243] Find /sys/bus/usb/devices/1-1.1.2 idVendor=0x2c7c idProduct=0x125, bus=0x001, dev=0x005
[08-20_00:12:08:243] Auto find qmichannel = /dev/cdc-wdm0
[08-20_00:12:08:243] Auto find usbnet_adapter = wwan0
[08-20_00:12:08:244] netcard driver = qmi_wwan, driver version = 22-Aug-2005
[08-20_00:12:08:244] Modem works in QMI mode
[08-20_00:12:08:265] cdc_wdm_fd = 7
[08-20_00:12:08:363] Get clientWDS = 19
[08-20_00:12:08:396] Get clientDMS = 1
[08-20_00:12:08:427] Get clientNAS = 3
[08-20_00:12:08:459] Get clientUIM = 1
[08-20_00:12:08:491] Get clientWDA = 1
[08-20_00:12:08:523] requestBaseBandVersion EC25AFAR05A04M4G
[08-20_00:12:08:651] requestGetSIMStatus SIMStatus: SIM_READY
[08-20_00:12:08:651] requestSetProfile[1] TM///0
[08-20_00:12:08:716] requestGetProfile[1] TM///0
[08-20_00:12:08:747] requestRegistrationState2 MCC: 310, MNC: 260, PS: Attached, DataCap: LTE
[08-20_00:12:08:779] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[08-20_00:12:08:780] ifconfig wwan0 down
[08-20_00:12:08:789] ifconfig wwan0 0.0.0.0
[08-20_00:12:08:843] requestSetupDataCall WdsConnectionIPv4Handle: 0x871e6d60
[08-20_00:12:08:971] ifconfig wwan0 up
[08-20_00:12:08:980] 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


It never returns from this script.

Please tell me what information you might need to help troubleshoot.

Thank you

Dear Bruce,
Thanks for your inquiry in Quectel forum.
Please check the following error information.
image
Please check whether the path of resolv.conf is right, the default is /usr/share/udhcpc/default.script, and confirm you have the right permission to call it. Thanks!

Hello Kyson,

the script /usr/share/udhcpc/default.script has the following line after the opening comments

RESOLV_CONF="/etc/resolv.conf"

so,

pi@P9:/etc $ ls -la resolv.*
-rw-r–r-- 1 root root 155 Aug 19 23:44 resolv.conf
-rw-r–r-- 1 root root 18 Aug 7 17:12 resolv.conf.bak
pi@P9:/etc $ cat resolv.conf

Generated by resolvconf

domain hsd1.ca.comcast.net
nameserver 75.75.75.75
nameserver 75.75.76.76
nameserver 2001:558:feed::1
nameserver 2001:558:feed::2
pi@P9:/etc $

You can try to change the path to /usr/share/udhcpc/default.script in the following code. Thanks!
image

Hello Kyson,

Thanks for the suggestion, but I do not understand. Are you saying to change the RESOLV_CONF to have the path to the actual script “/usr/share/udhcpc/default.script”?

Please clarify. Thanks.

Yes, correct. Please change it to have a try. Thanks!

hello,

i tried changing the path in default.script and nothing changed for me?  any other ideas?

thanks

Kyson,

Changing that path did not change for me. Because it seems that script is not getting executed, unless I disable dhcpcd.service. Then the script, unmodified, runs and I sometimes obtain an IP address from your scripting calling busybox udhcpc.

But this is not a solution, because now my eth0 device has no IP address.

There seems to be some conflict when using both dhcp and udhcp. Someone please help!

Dear Bruce,
If it still cannot solve your issue, it may need to catch debug log to analyze the root reason. And normally you should enable dhcp service after the module dial up.And please email to support@quectel to get the tool to catch module debug log. Thanks!

I am having the exact same issue. I was once able to get an ip address, and confirmed that it was working with ping -I wwan0 to a known working machine, and it worked fine. I had to go, and when I got back, I used the same commands from my history and was not able to reconnect. I had the resolv.conf error in the session that did work, so that doesn’t appear to be an issue.
See session details below.

I am hoping you will make the solution public, because I don’t think it is an individual problem.

Thank you,

Matthew

  • ifconfig wwan0
    wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
    unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 12 bytes 3936 (3.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

  • sleep 1

  • qmicli -d /dev/cdc-wdm0 ‘–wds-start-network=apn=’’‘MY APN,ip-type=4’’’’ --client-no-release-cid
    [/dev/cdc-wdm0] Network started
    Packet data handle: ‘2267820544’
    [/dev/cdc-wdm0] Client ID not released:
    Service: ‘wds’
    CID: ‘18’

  • sleep 1

  • sleep 1

  • qmi-network /dev/cdc-wdm0 status
    Loading profile at /etc/qmi-network.conf…
    APN: MY APN
    APN user: unset
    APN password: unset
    qmi-proxy: no
    Getting status with 'qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status '…
    Status: connected

  • sleep 2

  • udhcpc -q -f -n -i wwan0
    udhcpc: started, v1.30.1
    No resolv.conf for interface wwan0.udhcpc
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: no lease, failing

The session that did work looked like this:

  • qmi-network /dev/cdc-wdm0 status
    Loading profile at /etc/qmi-network.conf…
    APN: MY APN
    APN user: unset
    APN password: unset
    qmi-proxy: no
    Loading previous state from /tmp/qmi-network-state-cdc-wdm0…
    Previous CID: 18
    Previous PDH: 2267385008
    Getting status with 'qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status --client-cid=18 --client-no-release-cid '…
    Status: connected
  • udhcpc -q -f -n -i wwan0
    udhcpc: started, v1.30.1
    No resolv.conf for interface wwan0.udhcpc
    udhcpc: sending discover
    udhcpc: sending select for CORRECT IP
    udhcpc: sending select for CORRECT IP
    udhcpc: sending select for CORRECT IP
    udhcpc: lease of CORRECT IP obtained, lease time 7200
    ip: RTNETLINK answers: File exists
    Too few arguments.

It is better to check whether you have disconnect the previous connection, and whether the SIM card is normal. Thanks!