# Quectel 5G-Modem doesn't work at all

Source: https://forum.modalai.com/topic/3787/quectel-5g-modem-doesn-t-work-at-all
Category: ESCs, Sensors and Accessories (https://forum.modalai.com/category/15/escs-sensors-and-accessories)
Tags: cellular
Posted: 2024-09-08 07:51:19 UTC by Jerry Lin
Replies: 23 · Views: 7339

## Jerry Lin · 2024-09-08 07:51:19 UTC

Hi, I followed [5G Modem User Guide](https://docs.modalai.com/5G-Modem-user-guide)
```
voxl2:/$ voxl-configure-modem
Starting interactive mode
 
What type of modem are you using?

1) v2	      3) dtc	    5) quectel
2) microhard  4) doodle	    6) em9191
#? 5
 
Are you attempting to connect to ModalLink? (not common)
1) yes
2) no
#? 2
 
Which APN is correct for your SIM card?

AT&T - IoT device - APN: m2m.com.attz
AT&T - Laptop or Tablet - APN: broadband
AT&T - Smartphone - APN: phone
T-Mobile - APN: fast.t-mobile.com
Verizon - APN: vzwinternet
Google Fi - APN: h2g2

1) m2m.com.attz	      4) fast.t-mobile.com  7) Custom
2) broadband	      5) vzwinternet
3) phone	      6) googlefi
#? 7
Please enter a custom APN
nxtgenphone
 
Select modem region:
1) Americas
2) Europe/Middle-East/Asia
#? 1

qrb5165 based device detected
reloading systemd services
enabling voxl-modem systemd service
starting voxl-modem systemd service
DONE configuring voxl-modem
```
and it always failed with:
```
voxl2:/$ systemctl status -l voxl-modem
● voxl-modem.service - Modem Initialization
   Loaded: loaded (/etc/systemd/system/voxl-modem.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2024-09-08 07:03:55 UTC; 14s ago
  Process: 3019 ExecStartPre=/bin/sleep 2 (code=exited, status=0/SUCCESS)
 Main PID: 3020 (voxl-modem-star)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/voxl-modem.service
           └─3020 /bin/bash /usr/bin/voxl-modem-start

Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:955] qmidevice_detect failed
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:956] Quectel_QConnectManager_Linux_V1.6.0.24
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:957] network interface '' or qmidev '' is not exist
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:957] qmidevice_detect failed
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:961] Quectel_QConnectManager_Linux_V1.6.0.24
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:961] network interface '' or qmidev '' is not exist
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:961] qmidevice_detect failed
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:963] Quectel_QConnectManager_Linux_V1.6.0.24
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:963] network interface '' or qmidev '' is not exist
Sep 08 07:03:56 m0054 voxl-modem-start[3020]: [09-08_07:03:56:963] qmidevice_detect failed
```
I checked this forum and tried the following command
```
$ quectel-CM -s nxtgenphone
[09-08_07:06:58:832] Quectel_QConnectManager_Linux_V1.6.0.24
[09-08_07:06:58:832] network interface '' or qmidev '' is not exist
[09-08_07:06:58:832] qmidevice_detect failed
[09-08_07:06:58:833] qmidevice_detect failed
```
The result was still the same.

I tried [the latest voxl-modem](http://voxl-packages.modalai.com/dists/qrb5165/sdk-1.3/binary-arm64/voxl-modem_1.1.3_arm64.deb) and still no luck.

I purchased [Sentinel with 5G LTE modem](https://www.modalai.com/products/sentinel-development-drone?variant=47564491227440) without touching anything. I double checked the Quectel modem after inserting the SIM and confirmed it is secured as before.
 
Can anybody help resolve this issue?

## Reply by tom (ModalAI staff) · 2024-09-09 17:15:06 UTC

@Jerry-Lin What do you see with `lsusb` and `lsusb -t`?

## Reply by Jerry Lin · 2024-09-09 20:03:50 UTC (in reply to tom)

Hi @tom, here are the outputs:
```
voxl2:/$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
voxl2:/$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
```

## Reply by Jerry Lin · 2024-09-09 20:21:15 UTC

The weird thing is every time I insert the SIM card, my WiFi will be gone without even the blue flash light from the WiFi module.

Then, it took me long to get WiFi back by reconnecting the wire, touching around Quectel module, restarting `dhcpcd` and disabling `voxl-modem`, anything I can think of related to `wlan0`.

After having WiFi, `lsusb` would output:
```
Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0424:2740 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0bda:0811 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 0424:2744 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```

While having more USB devices, I tried `voxl-configure-modem` without the SIM card, I still got 
```
$ quectel-CM -s nxtgenphone
[09-08_07:06:58:832] Quectel_QConnectManager_Linux_V1.6.0.24
[09-08_07:06:58:832] network interface '' or qmidev '' is not exist
[09-08_07:06:58:832] qmidevice_detect failed
[09-08_07:06:58:833] qmidevice_detect failed
```

## Reply by tom (ModalAI staff) · 2024-09-09 20:49:13 UTC (in reply to Jerry Lin)

@Jerry-Lin Yeah it doesn't seem as though the quectel modem is being detected at all. Can you post a picture of your setup as a sanity check?

## Reply by Jerry Lin · 2024-09-09 21:15:59 UTC

Sure,
![IMG_4521a.jpg](https://forum.modalai.com/assets/uploads/files/1725916357441-img_4521a-resized.jpg)![IMG_4520.jpeg](https://forum.modalai.com/assets/uploads/files/1725916453689-img_4520-resized.jpeg) ![IMG_4525.jpeg](https://forum.modalai.com/assets/uploads/files/1725916850971-img_4525-resized.jpeg) 

I didn't touch anything except for opening the cover, unscrewing the nuts and inserting the SIM card.

## Reply by tom (ModalAI staff) · 2024-09-09 22:18:37 UTC (in reply to Jerry Lin)

@Jerry-Lin Are you sure that the add-on board is fully seated onto the VOXL 2? There are two connectors that need to be fully seated

## Reply by Jerry Lin · 2024-09-09 22:58:54 UTC (in reply to tom)

Hi @tom I am not sure and don't know how. 

Can you show me some pictures so I can have the clue which modules are needed take apart for checking and making sure.

## Reply by tom (ModalAI staff) · 2024-09-09 23:13:01 UTC (in reply to Jerry Lin)

@Jerry-Lin If you  looks at the diagram here: https://docs.modalai.com/5G-Modem-datasheet/#block-diagrams
both J4 and J2 need to fully inserted into J5 and J3 of VOXL 2, seen here: https://docs.modalai.com/voxl2-connectors/#connector-callouts

## Reply by Jerry Lin · 2024-09-10 02:22:16 UTC

Super cool, after all unscrewed and the modem taken out, I saw the connectors. Knowing how they connect, I pressed hard to make sure fully seated and the `qmidevice_detect failed` went away with the WiFi working!!!

The output of `lsusb` looks more devices now:
```
voxl2:~$ lsusb
Bus 002 Device 003: ID 2c7c:0800
Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0424:2740 Standard Microsystems Corp.
Bus 001 Device 003: ID 0bda:0811 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 0424:2744 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```

The output of `quectel-CM` is now totally different:
```
voxl2:~$ quectel-CM -s nxtgenphone
[09-10_01:27:54:793] Quectel_QConnectManager_Linux_V1.6.0.24
[09-10_01:27:54:795] Find /sys/bus/usb/devices/2-1.1 idVendor=0x2c7c idProduct=0x800, bus=0x002, dev=0x003
[09-10_01:27:54:795] Auto find qmichannel = /dev/cdc-wdm0
[09-10_01:27:54:795] Auto find usbnet_adapter = wwan0
[09-10_01:27:54:795] netcard driver = qmi_wwan, driver version = 22-Aug-2005
[09-10_01:27:54:796] Modem works in QMI mode
[09-10_01:27:54:828] /proc/3149/fd/7 -> /dev/cdc-wdm0
[09-10_01:27:54:828] /proc/3149/exe -> /usr/bin/quectel-CM
[09-10_01:27:56:830] cdc_wdm_fd = 7
[09-10_01:27:56:905] Get clientWDS = 1
[09-10_01:28:26:908] QmiWwanGetClientID message timeout
[09-10_01:28:26:921] Get clientNAS = 4
[09-10_01:28:26:953] Get clientUIM = 1
[09-10_01:28:26:985] Get clientWDA = 1
[09-10_01:28:26:985] QMIType 2 has no clientID
[09-10_01:28:26:985] requestBaseBandVersion err = -19
[09-10_01:28:41:321] QmiWwanThread read=-1 errno: 2 (No such file or directory)
[09-10_01:28:56:987] requestSetEthMode message timeout
[09-10_01:28:56:987] requestSetEthMode err = 110
[09-10_01:29:26:989] requestGetSIMStatus message timeout
[09-10_01:29:26:990] requestGetSIMStatus err = 110
[09-10_01:29:26:990] requestSetProfile[1] nxtgenphone///0
[09-10_01:29:27:081] QmiWwanThread read=-1 errno: 2 (No such file or directory)
[09-10_01:29:57:051] requestGetProfile message timeout
[09-10_01:29:57:051] requestGetProfile err = 110
[09-10_01:29:57:064] QmiWwanThread read=-1 errno: 2 (No such file or directory)
[09-10_01:30:27:054] requestRegistrationState2 message timeout
[09-10_01:30:27:055] requestRegistrationState2 err = 110
[09-10_01:30:57:056] requestQueryDataCall message timeout
[09-10_01:30:57:057] requestQueryDataCall err = 110
[09-10_01:30:57:057] ifconfig wwan0 0.0.0.0
[09-10_01:30:57:083] ifconfig wwan0 down
[09-10_01:30:57:129] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
[09-10_01:32:57:130] requestSetupDataCall message timeout
[09-10_01:32:57:130] requestSetupDataCall err = 110
[09-10_01:32:57:130] try to requestSetupDataCall 5 second later
[09-10_01:35:02:132] requestSetupDataCall message timeout
[09-10_01:35:02:133] requestSetupDataCall err = 110
[09-10_01:35:02:133] try to requestSetupDataCall 10 second later
[09-10_01:35:12:170] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:35:12:170] try to requestSetupDataCall 20 second later
[09-10_01:35:32:200] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:35:32:200] try to requestSetupDataCall 40 second later
[09-10_01:38:12:226] requestSetupDataCall message timeout
[09-10_01:38:12:228] requestSetupDataCall err = 110
[09-10_01:38:12:228] try to requestSetupDataCall 60 second later
[09-10_01:41:12:274] requestSetupDataCall message timeout
[09-10_01:41:12:277] requestSetupDataCall err = 110
[09-10_01:41:12:277] try to requestSetupDataCall 60 second later
[09-10_01:44:12:304] requestSetupDataCall message timeout
[09-10_01:44:12:304] requestSetupDataCall err = 110
[09-10_01:44:12:304] try to requestSetupDataCall 60 second later
[09-10_01:45:12:357] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:45:12:357] try to requestSetupDataCall 60 second later
[09-10_01:46:12:424] QmiWwanThread read=-1 errno: 2 (No such file or directory)
[09-10_01:48:12:391] requestSetupDataCall message timeout
[09-10_01:48:12:391] requestSetupDataCall err = 110
[09-10_01:48:12:392] try to requestSetupDataCall 60 second later
[09-10_01:49:12:454] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:49:12:454] try to requestSetupDataCall 60 second later
[09-10_01:52:12:486] requestSetupDataCall message timeout
[09-10_01:52:12:486] requestSetupDataCall err = 110
[09-10_01:52:12:486] try to requestSetupDataCall 60 second later
[09-10_01:55:12:530] requestSetupDataCall message timeout
[09-10_01:55:12:533] requestSetupDataCall err = 110
[09-10_01:55:12:533] try to requestSetupDataCall 60 second later
[09-10_01:56:12:582] QmiWwanThread read=-1 errno: 2 (No such file or directory)
[09-10_01:58:12:576] requestSetupDataCall message timeout
[09-10_01:58:12:576] requestSetupDataCall err = 110
[09-10_01:58:12:576] try to requestSetupDataCall 60 second later
[09-10_01:59:12:615] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:59:12:615] try to requestSetupDataCall 60 second later
```
However, it takes forever to finish. I googled around my [AT&T APN](https://www.att.com/support/article/wireless/KM1062162), it looks right using `nxtgenphone`:
> If you have an:
> LTE device: Set your settings to NXTGENPHONE
> Data device: Set your settings to Broadband
> 5G Smartphone: Set your settings to ENHANCEDPHONE

Not sure what is going wrong this time.

## Reply by Vinny (ModalAI staff) · 2024-09-10 14:58:36 UTC (in reply to Jerry Lin)

Hi @Jerry-Lin 
Glad Tom was able to help you and you are making progress.
For future note, please re-install the nut hardware on these screws or the boards can become separated again leading to more failures.
![26444f95-d369-4be9-82a7-78e56262609e-image.png](https://forum.modalai.com/assets/uploads/files/1725980274326-26444f95-d369-4be9-82a7-78e56262609e-image.png) 
Please be careful to ensure they do not contact any of the circuit components on the PCB.
Thanks!

## Reply by tom (ModalAI staff) · 2024-09-10 17:15:21 UTC (in reply to Jerry Lin)

@Jerry-Lin Awesome seems as though the hardware is working as expected now. I can't tell you what the correct APN is for your network, it very much depends on your plan, provider, etc. It's possible you need a SIM card specifically for IOT devices from your carrier

## Reply by Jerry Lin · 2024-09-10 18:02:38 UTC

Sure, will do. 

Sorry that I was trying to insert the SIM card and realized unable to do it unless lifting the modem module. After inserting the SIM card, I didn't push hard worrying breaking anything because the drone is super expensive. 

Thanks to Tom for helping me understand how the modules are connected. I think inserting the SIM card is a very frequent activity and it would be nice to make it very accessible by a hole like others on the side. It took me hours to figure out how to access the SIM card socket. Anyway, now I learned how to secure the connections and not a problem for me anymore.

BTW, any idea about my last "timeout and trying forever" issue? I have tried two SIM cards without a success.

## Reply by Jerry Lin · 2024-09-10 22:52:50 UTC

@tom said in [Quectel 5G\-Modem doesn't work at all](/post/18955):
> It's possible you need a SIM card specifically for IOT devices from your carrier

So, did you mean normal phone SIM cards are not compatible with the Quectel modem and the "5G LTE" is not the same protocol our phones use as advertised "Connectivity: 4G/5G"?

Then, what are requirements should I provide to my carrier (located in Pennsylvania, USA) for this kind of SIM card to get the drone Internet access?

## Reply by tom (ModalAI staff) · 2024-09-10 23:24:25 UTC (in reply to Jerry Lin)

@Jerry-Lin They can be, it just depends on the carrier. We always test here with Google Fi IoT SIM cards, they're super easy to setup and cheap

## Reply by Jerry Lin · 2024-09-10 23:42:45 UTC

Cool, my carriers are **AT&T** and **Xfinity Mobile**. What I should I mention to them for my application? Just `IoT` or any specs that you know about?

So, the log:
```
voxl2:~$ quectel-CM -s nxtgenphone
[09-10_01:27:54:793] Quectel_QConnectManager_Linux_V1.6.0.24
[09-10_01:27:54:795] Find /sys/bus/usb/devices/2-1.1 idVendor=0x2c7c idProduct=0x800, bus=0x002, dev=0x003
[09-10_01:27:54:795] Auto find qmichannel = /dev/cdc-wdm0
[09-10_01:27:54:795] Auto find usbnet_adapter = wwan0
...
[09-10_01:58:12:576] requestSetupDataCall message timeout
[09-10_01:58:12:576] requestSetupDataCall err = 110
[09-10_01:58:12:576] try to requestSetupDataCall 60 second later
[09-10_01:59:12:615] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0x1a
[09-10_01:59:12:615] try to requestSetupDataCall 60 second later
```
looks a SIM card issue to you? Or what else (e.g. commands or wiring) can I try to get 5G connected?

## Reply by tom (ModalAI staff) · 2024-09-11 16:43:07 UTC (in reply to Jerry Lin)

@Jerry-Lin I would mention IOT as well as the modem you're using "Quectel RM502Q-AE". I know when I was first working with this modem that some carriers didn't yet support but that was a long time ago so I'm guessing that has changed

## Reply by Jerry Lin · 2024-09-11 17:28:38 UTC

OK, will get to carries to see if I can move forward with the existing SIM cards. If not, will try Google Fi IoT SIM cards.

Thanks for the advice!!!

## Reply by Jerry Lin · 2024-09-27 20:03:24 UTC

I
- checked with an AT&T store and they provide SIM card for **phone** only. 
- then googled around and found several attempts using Quectel MODEM with AT&T SIM card and AT commands were used for debugging. 
- searched in ModalAI Forum and found some AT commands for the model.
- tried but got  only `ERROR` 
  > voxl2:~$ echo -ne "AT+QNWPREFCFG="mode_pref",LTE:NR5G\r" | busybox microcom /dev/ttyUSB2
  > AT+QNWPREFCFG=mode_pref,LTE:NR5G
  > ERROR
- did `voxl-configure-modem` again to see if AT commands can be used and found the same command:
  > Sep 25 02:41:22 m0054 voxl-modem-start[8392]: qrb5165 based hardware detected...
  > Sep 25 02:41:22 m0054 voxl-modem-start[8392]: \Setting mode preference to LTE / 5G
  > Sep 25 02:41:22 m0054 voxl-modem-start[8392]: **AT+QNWPREFCFG="mode_pref",LTE:NR5G**
  > Sep 25 02:41:22 m0054 voxl-modem-start[8392]: OK
  > Sep 25 02:41:23 m0054 voxl-modem-start[8392]: Initalizing cellular connection...
- After 7 minutes I saw: `no lease, failing`. Well, at least, it tried to lease.
  > Sep 25 02:48:49 m0054 voxl-modem-start[8392]: udhcpc: started, v1.27.2
Sep 25 02:48:49 m0054 voxl-modem-start[8392]: No resolv.conf for interface wwan0.udhcpc
Sep 25 02:48:49 m0054 voxl-modem-start[8392]: udhcpc: sending discover
Sep 25 02:48:52 m0054 voxl-modem-start[8392]: udhcpc: sending discover
Sep 25 02:48:55 m0054 voxl-modem-start[8392]: udhcpc: sending discover
Sep 25 02:48:58 m0054 voxl-modem-start[8392]: udhcpc: sending discover
Sep 25 02:49:01 m0054 voxl-modem-start[8392]: udhcpc: sending discover
Sep 25 02:49:04 m0054 udhcpc[10399]: wwan0: configuration failed: leasefail:
Sep 25 02:49:04 m0054 voxl-modem-start[8392]: udhcpc: **no lease, failing**
- All of sudden, I saw lease obtained with an IP provided:
  > Sep 25 02:49:04 m0054 voxl-modem-start[8392]: udhcpc: started, v1.27.2
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: No resolv.conf for interface wwan0.udhcpc
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: udhcpc: sending discover
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: udhcpc: sending select for 10.194.135.84
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: udhcpc: lease of 10.194.135.84 obtained, lease time 7200
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: Too few arguments.
  > Sep 25 02:49:05 m0054 voxl-modem-start[8392]: Too few arguments.
- I was not sure about the impact of `Too few arguments` error, though. 

Well, with an IP address, I tried to:
- ping
- ssh

Unfortunately only responded with timeout messages.
Wondering if I really have the Internet access, I did `ifconfig wlan0 down` and the `ping google.com` from `voxl`. It was still responded !!!

Hmm, how about continue [Connecting to QGC over 5G](https://docs.modalai.com/5G-Modem-user-guide/#connecting-to-qgc-over-5g) instructions?
- With Tailscale VPN installed, I was able to ssh to the drone using the VPN IP address!!!
- With QGroundControl setup, I was able to see the drone statuses and statistics using the VPN IP address!!!

That means I can control the drone even it is hundreds of miles away!!!

Millions of thanks for great help @tom and @Vinny !!!!!!!!!!!

Still with `Too few arguments` error, I am not sure how good the 4G/5G connection would be. Will experiment more to figure out. However, if you guys know anything can be improved, please let me know.

## Reply by tom (ModalAI staff) · 2024-09-27 20:44:16 UTC (in reply to Jerry Lin)

@Jerry-Lin You can ignore the "Too few arguments" message, that comes from lower down in the quectel driver, it shouldn't cause any issues.

Glad to hear things are working! It may take some routing changes in order for both wifi and 5g to work at the same time.

## Reply by Jerry Lin · 2024-09-27 21:48:30 UTC

:ok_hand: :sweat_smile:  :+1: :exclamation: :exclamation: :exclamation:

## Reply by Jerry Lin · 2024-09-27 22:06:30 UTC

BTW, what are the **routing changes** suggested? Do I need to execute any commands? Or, do they happen automatically by some code or scripts?

## Reply by tom (ModalAI staff) · 2024-09-30 16:29:50 UTC (in reply to Jerry Lin)

@Jerry-Lin Not something I can provide too much data on as I don't have a ton of linux network routing experience. But from what I understand you can use `ip route` to see how your network traffic is being routed for each network interface.

You can also change the default route via something like `sudo ip route change default .....` (don't know the exact command format) might take some research.

## Reply by Jerry Lin · 2024-10-01 01:52:02 UTC

OK, cool :+1: thanks:exclamation:  

Will try.
