NR7101 - New Install of OpenWrt - Problem with 5G Modem

Hi all,

Apologies if this is a stupid question. I was having issues with ZyXEL firmware on my NR7101 so I installed OpenWRT on unit. The install seems to be working fine. I am however having issues getting OpenWRT to recognise the GSM modem. I have tried updating the modem firmware to no avail. Is there a way with OpenWRT to check if the modem is actually working.

Any assistance would be greatly appreciated

did you install any additional packages, providing support for the modem ?

Thank you for responding. I have not installed any additional packages. Is there any recommended packages. I have not found any references online to particular packages for the GSM modem.

what kind of modem is it ?
what does lsusb and lspci say about it ?

Please correct the title: "GSM Model" --> "5G Modem"
According to the OpenWrt documentation https://openwrt.org/toh/zyxel/nr7101 you have Quectel RG502Q in QMI mode by default, so you need to follow
https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle

1 Like

Hi there,

Thank you for responding

I have installed the following packages

  • usb-modeswitch
  • kmod-mii
  • kmod-usb-net
  • kmod-usb-wdm
  • kmod-usb-net-qmi-wwan
  • uqmi

I have also installed SOCAT to input AT commands to allow me to update the module firmware.

When I run any AT commands through SOCAT I don't get any response. I have run through is of the USB ports (0 to 3) but still not response

`Preformatted text`root@OpenWrt:~# dmesg | grep usb
[    5.700196] usbcore: registered new interface driver usbfs
[    5.711312] usbcore: registered new interface driver hub
[    5.722068] usbcore: registered new device driver usb
[    5.757942] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regu                                                lator
[    5.893824] usb usb2: We don't know the algorithms for LPM for this host, dis                                                abling LPM.
[    6.287899] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-mtk
[   14.772091] usbcore: registered new interface driver cdc_wdm
[   14.860541] usbcore: registered new interface driver usbserial_generic
[   14.873745] usbserial: USB Serial support registered for generic
[   14.888519] usbcore: registered new interface driver cdc_ether
[   14.908796] usbcore: registered new interface driver cdc_ncm
[   16.545005] qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-1e1c0000.xhci-                                                1, WWAN/QMI device, ea:a7:02:01:0a:ea
[   16.566229] usbcore: registered new interface driver qmi_wwan
[   16.583033] usbcore: registered new interface driver cdc_mbim
[   16.601419] usbcore: registered new interface driver option
[   16.612838] usbserial: USB Serial support registered for GSM modem (1-port)
[   16.639885] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[   16.666909] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[   16.693851] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[   16.720701] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3

Apologies if I am missing something obvious. I am pretty new to OpenWrt and AT commands.

Any assistance is much appreciated.

You do not need usb-modeswitch and kmod-mii, but you need kmod-usb-serial-option
Please install it along with picocom and show the output of cat /sys/kernel/debug/usb/devices

Hi there,

kmod-usb-serial option and picocom have been installed. Please find below the output.

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.10
S:  Manufacturer=Linux 5.10.161 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 5.10
S:  Manufacturer=Linux 5.10.161 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev= 4.14
S:  Manufacturer=Quectel
S:  Product=RG502Q-EA
S:  SerialNumber=99db6242
C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

Thanks

1 Like

/dev/ttyUSB0 is your diag port, use it for the local firmware upgrade (not FOTA), directly or through socat
/dev/ttyUSB2 is your AT command port, you can access it as follows:
picocom /dev/ttyUSB2

Thanks I accessed as adviced. I get the following

picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready

Unfortunately the prompt appears to freeze and I cannot insert any AT commands.

When I try to access it again I get the following prompt.

root@Zyxel:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no


FATAL: cannot lock /dev/ttyUSB2: Resource temporarily unavailable

Make sure the ports are still there:
ls -l /dev/ttyUSB*
and you don't have other applications like socat trying to access the ports.
You can also add no<l>ock option to picocom:
picocom --l /dev/ttyUSB2
Finally, you can also try using ttyUSB3 instead.

Thanks. I will give it another go. Your assistance is greatly appreciated.

OK. I have got into /dev/ttyUSB2. Apologies again for my ignorance but I cannot find the Picocom command that allows me to send AT commands. I get the list of commands using Ctrl + a & h but it not clear which command to select

I am looking to run a 'at+qfotadl=. . . .' command to install the module but I cannot see a Picocom command that corresponds to this. I hoping this will make the modem visible in the interfaces tab in the OpenWRT

You don't need to select any command in picocom, once you're there you can enter any AT command you want.
'at+qfotadl=. . . .' command is used to initiate the firmware upgrade of the module and not to "install the module". It will also not "make the modem visible".
If you have luci-proto-qmi installed you need to go to Network → Interfaces → Add new interface… → Protocol : QMI, Interface: cdc-wdm0
Then enter APN, IP type (v4/v6) and in Advanced Settings: tick "Use default gateway" and "Use DNS servers advertised by peer"
Assign the right firewall zone - WAN

Thank you. Apologies for the incorrect referencing. I have created a new interface for the modem but this interface shows no data flow. I have checked the sim card and this works fine. This is what has led me to think it is an issue with the modem firmware.

It is always a good idea to start from the modem upgrade or at least check the current version (with ATI command).

Does it mean that the modem is registered to the carrier and connection is established?
Please show the error message (if any) from the Network Interfaces screen and also post the relevant part of the system log.
For the sanity check it will be good to see the interface configuration from /etc/config/network