Detected on multi ports quectel modem pool from china (or it can be elsewhere)
In case of problems with messages like:
The modem answer was not OK: +CMS ERROR: 2051
Modem is not registered to the network
first install prog. - socat (I use debian) - a clever program where you can read information from the modem even when smstools is running
read info:
echo AT+CREG? | socat - /dev/ttySOMETHING,crnl
output will be like (on m35 2,1 is ok):
+CREG: 2,1,"0003","ADE9"
trouble codes (for example on m35 - search CREG in m35_at_commnad.pdf): 2,0 2,3 2,2 0,0 1,0
so, if you want to reconnect to the network (restart modem), you can type:
echo AT+QPOWD=1 | socat - /dev/ttySOMETHING,crnl (AT+QPOWD - from manual for m35)
sometimes is better use AT+QPOWD=0
0 Urgent power off ( Do not send out URC "NORMAL POWER DOWN")
1 Normal power off (Send out URC "NORMAL POWER DOWN")
you can set up automatic reconnection to the network with some logic like this:
with AT+CREG check if connected - if no, then stop smstools - reconnect with AT+QPOWD - start smstools
you can try if you have to stop smstools or not
Detected on multi ports quectel modem pool from china (or it can be elsewhere)
In case of problems with messages like:
The modem answer was not OK: +CMS ERROR: 2051
Modem is not registered to the network
first install prog. - socat (I use debian) - a clever program where you can read information from the modem even when smstools is running
read info:
echo AT+CREG? | socat - /dev/ttySOMETHING,crnl
output will be like (on m35 2,1 is ok):
+CREG: 2,1,"0003","ADE9"
trouble codes (for example on m35 - search CREG in m35_at_commnad.pdf): 2,0 2,3 2,2 0,0 1,0
so, if you want to reconnect to the network (restart modem), you can type:
echo AT+QPOWD=1 | socat - /dev/ttySOMETHING,crnl (AT+QPOWD - from manual for m35)
sometimes is better use AT+QPOWD=0
0 Urgent power off ( Do not send out URC "NORMAL POWER DOWN")
1 Normal power off (Send out URC "NORMAL POWER DOWN")
sleep e.g. 5 second
echo AT+CREG=2 | socat - /dev/ttySOMETHING,crnl
you can set up automatic reconnection to the network with some logic like this:
with AT+CREG check if connected - if no, then stop smstools - restart with AT+QPOWD - sleep 5 sec. - AT+CREG=2 - start smstools
you can try if you have to stop smstools or not