Zyxel NR7101 modem firmware upgrade process

Looks like there is new modem firmware upgrade available here:

  • RG502QEAAAR11A07M4G-R13A02

There is an excellent writeup on how to upgrade here:

Has anyone engaged in this process before?

Concerning:

  • Stop all processes conflicting with ttyUSBx device access, but leave the modem conneced.

What sort of processes might conflict and how can we check for that?

2 Likes

You can use fuser /dev/ttyUSB0 /dev/ttyUSB1 to check which processes keep the device nodes open right now. This, however, won't catch processes that open and close /dev/ttyUSBx periodically.

You can also use strace to notify you if any process accesses /dev/ttyUSBx:

strace -f `ls -1d /proc/[0-9]* | sed 's@/proc/@ -p @'` -e open,openat -qqq -e signal=none -P /dev/ttyUSB0 -P /dev/ttyUSB1

Ignore all Operation not permitted messages, these are the kernel threads.

But this only prints the process IDs, not process names. But, as your goal is to confirm that nothing opens the device, a combination of fuser and strace should be sufficient.

1 Like

Thanks @patrakov!

@bmork with:

at+qfotadl="https://www.dropbox.com/s/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip?dl=1"

I only see:

+QIND: "FOTA","HTTPSTART"

+QIND: "FOTA","HTTPEND",701

Any clue what I'm missing?

Try http ?

1 Like

How? I need to upload to a server first?

Delete one symbol from the URL?

1 Like

Using:

http://www.dropbox.com/s/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip?dl=1

Same error:

+QIND: "FOTA","HTTPSTART"

+QIND: "FOTA","HTTPEND",701

I see..

701 HTTP/HTTPS* unknown error

Not very informative.

It seems the link doesn't work by dropping the 's'.

But maybe this is why:

root@OpenWrt-1:/tmp# wget http://www.dropbox.com/s/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip?dl=1
Downloading 'http://www.dropbox.com/s/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip?dl=1'
Connecting to 162.125.64.18:80
Redirected to /s/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip?dl=1 on www.dropbox.com
Redirected to /s/dl/wlk2gfg5u59esbd/RG502QEAAAR11A07M4G-RG502QEAACR13A02M4G.zip on www.dropbox.com
Redirected to /cd/0/get/CBN3JOFXasEMZwAB0hWmCVejqFo2Wlhn171rfWNleN5xMoPlzk4KVUTp7xqwjEKb480i5xw5ZJ5_6CZG_xMYoCxvFcMfwhsygfrBxU1gq2CqMbOHttZF2N0a1IEuf4kBgw18Dy5bHYaoiLChgmbglrxc/file?dl=1# on uc6452c6dca35a5cfd505f4a6912.dl.dropboxusercontent.com
HTTP error 400

So I need to upload to http server?

Most likely. Manual says

“*” means the related function of HTTPS server is under development.

Would you be able to host this file by any chance?

Not at the moment, sorry.
But you can probably run the update locally, you'll need to copy zip to modem's flash, for that you will need adb working.

Quectel's example:
AT+QFOTADL="/cache/ufs/update-v13-to-v12.zip"

You will need to use adb push to copy the file from the local filesystem (like /tmp folder on the router) to the modem.
Needless to say you will need adb installed on the router and ADB interface exposed by the modem.

I just tried via http and same error.

@bmork any ideas?

Use local upgrade, this is what I did with MF286D.

I'm pretty sure https is supported. Maybe the url is too long? I know I hit that once. Don't remember the exact limit. But it was pretty low and lower than the docs said.

I've found some files here: http://79.161.156.252

OK I got it to work finally!

root@OpenWrt:~# 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

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

Quectel
RG502Q-EA
Revision: RG502QEAAAR13A02M4G

OK

Things that I think helped:

  • setting ip link wwan0 down

  • manually configuring connection using:

AT+QICSGP=<contextID>[,<context_type>,<APN>[,<username>,<password>)[,<authentication>]]]
  • these links:

https://wiki.teltonika-networks.com/view/Mobile_data_connection_troubleshooting

It seemed necessary to reboot twice after the upgrade for things to work properly.


@bmork during these upgrade processes how important is exclusive access to /dev/ttyUSB2? Even though I stopped the ModemManager service I still saw some ModemManager activity in the logs relating to hotplug handling. Nevertheless I saw the correct exit codes and new firmware reported with 'ati'. Which gave me sufficient confidence to reboot. And all seems well. But I'm still wondering for future reference and the benefit of others.

Also, this experience makes me wonder again if I can ditch ModemManager. Is the issue that there is nothing else that can be used to ensure reconnection on ISP disconnection and update the wwan0 IP? What are others using?