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:
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.
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
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'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.
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
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?