Can't get DHCP lease with ME910C1-WW

Everything is set up according to the Sixfab guides, but when I try to get a DHCP lease, it gets stuck on “sending discover”:

pi@raspberrypi:~ $ sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='m2m64.com.attz',ip-type=4" --client-no-release-cid
[/dev/cdc-wdm0] Network started
        Packet data handle: '2254410080'
[/dev/cdc-wdm0] Client ID not released:
        Service: 'wds'
            CID: '4'
pi@raspberrypi:~ $ sudo udhcpc -q -f -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
...

I contacted AT&T and they said everything looks good on their end and it should be working, and to check the device configuration. I’m not sure what else to try here.

Debug below:

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux
pi@raspberrypi:~ $ lsusb
Bus 001 Device 007: ID 1bc7:1101 Telit Wireless Solutions ME910C1
Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M
            |__ Port 3: Dev 7, If 0, Class=Vendor Specific Class, Driver=option, 480M
            |__ Port 3: Dev 7, If 1, Class=Vendor Specific Class, Driver=option, 480M
            |__ Port 3: Dev 7, If 2, Class=Vendor Specific Class, Driver=option, 480M
            |__ Port 3: Dev 7, If 3, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
pi@raspberrypi:~ $ dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=55bc152a-02 rootfstype=ext4 fsck.repair=yes rootwait
[    0.001183] printk: console [tty1] enabled
[    3.153654] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    5.517919] systemd[1]: Created slice system-getty.slice.
[    9.633534] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB0
[    9.634425] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB1
[    9.639615] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB2
[ 1683.190282] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1683.191120] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1683.191729] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 1688.999055] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 1689.000546] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 1689.001991] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB2
[59341.816450] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[59341.816967] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[59341.817447] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[59347.624339] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB0
[59347.625960] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB1
[59347.627476] usb 1-1.1.3: GSM modem (1-port) converter now attached to ttyUSB2
pi@raspberrypi:~ $ ls -l /sys/bus/usb-serial/devices
total 0
lrwxrwxrwx 1 root root 0 Jun 30 11:21 ttyUSB0 -> ../../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0
lrwxrwxrwx 1 root root 0 Jun 30 11:21 ttyUSB1 -> ../../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.1/ttyUSB1
lrwxrwxrwx 1 root root 0 Jun 30 11:21 ttyUSB2 -> ../../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.2/ttyUSB2
pi@raspberrypi:~ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Jun 30 11:03 usb-Telit_Telit_ME910_5a7ca621-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Jun 30 11:03 usb-Telit_Telit_ME910_5a7ca621-if01-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Jun 30 11:03 usb-Telit_Telit_ME910_5a7ca621-if02-port0 -> ../../ttyUSB2

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT
AT
OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom ATI
ATI
332

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CGMR
AT+CGMR
M0B.800005

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CPIN?
AT+CPIN?
+CPIN: READY

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CPAS
AT+CPAS
+CPAS: 0

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CFUN?
AT+CFUN?
+CFUN: 1

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+COPS?
AT+COPS?
+COPS: 0,0,"AT&T",8

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT#USBCFG?
AT#USBCFG?
#USBCFG: 0

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT#BND?
AT#BND?
#BND: 5,0,168695967

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CREG?
AT+CREG?
+CREG: 0,1

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CGDCONT?
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 4,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 5,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 6,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CSQ
AT+CSQ
+CSQ: 24,4

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CGATT?
AT+CGATT?
+CGATT: 1

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+GMM
AT+GMM
ME910C1-WW

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT#SWPKGV
AT#SWPKGV
30.01.800-P0B.800100
M0B.800005
P0B.800100
A0B.800000

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT#FWSWITCH?
AT#FWSWITCH?
#FWSWITCH: 2

OK

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT#CGREG?
AT#CGREG?
ERROR

pi@raspberrypi:~ $ /home/pi/.local/bin/atcom AT+CGREG?
AT+CGREG?
+CGREG: 0,1

OK

Any help is appreciated… thanks

Hi,

Thank you for the detailed explanation.

Can you try to connect again after setting APN with AT+CGDCONT=1,"IP","m2m64.com.attz" command?

Hi ensar,

Thanks… I tried this but unfortunately it still gets stuck with “udhcpc: sending discover” forever.

Tried with this…

AT+CGDCONT?
+CGDCONT: 1,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 4,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 5,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 6,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK

and…

AT+CGDCONT?
+CGDCONT: 1,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 2,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 3,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 4,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 5,"IP","m2m64.com.attz","",0,0,0,0
+CGDCONT: 6,"IP","m2m64.com.attz","",0,0,0,0

OK

Here’s more data. It thinks it’s connected, as does the AT&T portal. Both show the SIM is connected. However, just can’t get an IP…

edit: the IP shown here is actually the IP AT&T thinks it should have. So it does have an IP I guess, but not through udhcpc? How is that working and why isn’t it getting assigned to the interface?

pi@raspberrypi:~ $ sudo qmicli -p -d /dev/cdc-wdm0 --wds-get-packet-service-status
[/dev/cdc-wdm0] Connection status: 'connected'
pi@raspberrypi:~ $ sudo qmicli -p -d /dev/cdc-wdm0 --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
           IP Family: IPv4
        IPv4 address: 10.213.238.225
    IPv4 subnet mask: 255.255.255.252
IPv4 gateway address: 10.213.238.226
    IPv4 primary DNS: 100.123.11.10
  IPv4 secondary DNS: 100.122.11.10
                 MTU: 1430
             Domains: none

Once “Network started” is displayed, a DHCP request can be sent on the network interface.

AT+CGDCONT=1,"IPV4V6","m2m64.com.attz" After setting it to IPv4, you need to configure the IP address and default route with udhcpc:

sudo udhcpc -q -f -i wwan0

That’s where the original error happens:

pi@raspberrypi:~ $ sudo udhcpc -q -f -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: sending discover

This just goes on forever, it never gets a response. Not sure why it has to discover when it already has a lease, apparently, according to wds-get-current-settings

@ensar , any more thoughts on this? Still stuck unfortunately. Is the guide here the best to use? Can’t get the IP set to the interface. udhcpc tries sending discovery (I guess for DHCP lease?) but according to the modem we already have an IP.

1 Like

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.

Sorry for the delay, got caught up with other things… is there a guide to get the Sixfab HAT working, from a clean image of raspbian? I’ve tried this guide (Setting up a data connection over QMI interface using libqmi) multiple times from a fresh Raspberry Pi OS and get various issues including the one described in this thread. I’ve tried with the ME910C1, and trying with the LE910C4 now, but still have issues.

/usr/share/udhcpc/default.script does not exist, as no step in that guide creates it. Should I be creating that manually?

1 Like

I have exactly the same problem. Have you found a way to solve it? Thanks a lot!

Yes - avoid the Sixfab guides :smiley:

I don’t remember the specifics at this point, but I have these two URLs bookmarked that in the end got me to what I needed:

https://techship.com/faq/how-to-automatically-set-up-and-maintain-the-cellular-data-connection-in-headless-raspberry-pi-os-raspbian-systems/
https://www.jeffgeerling.com/blog/2022/using-4g-lte-wireless-modems-on-raspberry-pi

Play around with the information you learn at those links. There was enough to get me working very reliably.

Thank you so much for the info!

I am leaving another helpful link here:
libqmi official wiki