How to get connectivity to my PC after registering the network using AT commands?

Hi all

I’m using a Quectel RM500Q-AE. I’m trying to use it to provide connectivity to my laptop (running Ubuntu 20) to a 5G SA . I’ve used the AT commands COPS to get registered in the network, CGDCONT to set up the PDU session and CGACT to activate the PDU session. After that, I’ve tested that I’m able to get an IP and reach Internet, by using the commands CGPADDR and QPING.

My problem here is that, although I’m registered into the 5G SA network and even I have connectivity to Internet, I’m not able to route the traffic through the dongle. I tried to set up the network interface corresponding to the dongle, which is named wwan0. Then I tried to get an IP through DHCP using dhclient, with no result.

I’ve configured the PDN session to get an IP through DHCP (AT+CGDCONT=1,“IP”,“internet”,0,0,1. My doubt here is that I understood is that by setting the IPv4_addr_alloc to 1 the network should not provide an IP address after the PDU session stablishment, but wait to the DHCP request of the laptop to provide it. The dongle should then act as a proxy and forward the DHCP response from the network to the laptop, so it sets the IP address to the corresponding network interface (wwan0). However, in this case I should not get an IP until running dhclient on the laptop, but I get it after the PDU activation and, as I said, I can even reach Internet ussing AT commands.

What should I do to “link” the wwan0 to the modem, so I can connect my laptop to the Internet? I can’t use Modem Manager, as I’m having some issues with this software in my laptop. I believe that I’m only missing a few commands, so it would be great to know these exact commands instead of relying on external software.

I’d first try this from the shell:

sudo dhclient -r;sudo dhclient -nw wwan0

Otherwise there are specific ip commands we can use.

Another alternative is to try running the modem in ECM mode, where it acts as a hostless modem.

What mode are you in now? The AT+QCFG="usbnet" command will tell us.

ECM mode is set with AT+QCFG="usbnet",1 (followed by a hard reset).

Hi @snowgum

Thank you for your answer.

I set the interface up and run the dhclient commands, but I do not get a response, so the interface does not get an ip address.

My modem was in MBIM mode (AT+QCFG=“usbnet” returned 2). I changed to ECM mode and hard reseted the dongle. Now, my laptop has a new interface called enx0…, instead of the wwan0. What happens in this mode is that the command AT+CGACT returns an error (without error number), although AT+CGPADDR returns me a valid IP address. However, in this mode I cannot ping with AT commands, AT+QPING returns error 569, which apparently means that I did not receive a response before the timeout. In the laptop, I receive a 192.168.255.X/24 IP in the enx0…, but I do not have any connectivity either.

I also tested usbnet 0 mode (PPP & QMI mode), but results are similar to MBIM mode: I can reach Internet with AT commands, but I can’t get an IP on my laptop.

Where can I download quectel-cm to install the most adequate drivers in my machine? In the dongle web there is a tool named QMulti_DL_CMD that is available for download, but it is only compatible with Windows. Searching for quectel-cm, I found a Github repository from kmilo17pet, but seems like a port, not the official project.

I run my Quectels in ECM mode. I know that ECM mode doesn’t work on all Quectels or with all SIMs. I bought two EM06-E modems together and one works in ECM mode and the other doesn’t.

My “daily” modem is now an RM500Q-AE in ECM mode. With the APN set correctly I only need to plug it into my Fedora Linux PC and I’ve got Internet connectivity. I use no AT commands or shell commands to help facilitate this, and I long ago uninstalled ModemManager.

When I run in MBIM mode, I run these shell commands:

mbim-network /dev/cdc-wdm0 start
ip addr add $MYIP dev wwan0
ip link set wwan0 up
ip route add default dev wwan0

I was guided by the output from the ifconfig command when setting this up. I’m running with the modem in a router at the moment, but I can go back to directly-connected MBIM mode if you need me to check something specific.

The RM500Q also runs in ECM mode in the router, but that router is running the ROOter fork of OpenWRT: ROOter by Of Modems and Men

I’m experiencing issues with BG95M3 with ECM mode (no IP assigned to PC so browsing is failing). I’m fearing that my SIM (multiImsi one in a roaming scenario) can make the difference here.
I read you mention that “I know that ECM mode doesn’t work on all Quectels or with all SIMs”. Can you please go deeper on that? Being in roaming could be triggering the issue?