Changed operator, dongle stuck in 'GSM not registered' state...

447 views
Skip to first unread message

Marco Gaiarin

unread,
Mar 8, 2021, 4:10:05 PM3/8/21
to chan_...@googlegroups.com

Here in Italy i've changed operator, and some weekes after the change
the dongle start to get stuck in 'GSM not registered' state.

Detail:

vpbxlpb1*CLI> dongle show device state dongle0
-------------- Status -------------
Device : dongle0
State : GSM not registered
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB2
Voice : Yes
SMS : Yes
Manufacturer : huawei
Model : K3765
Firmware : 11.126.03.06.00
IMEI : XXX
IMSI : XXX
GSM Registration Status : Not registered, but searching
RSSI : 99, unknown or unmeasurable
Mode : No Service
Submode : No service
Provider Name : NONE
Location area code :
Cell ID :
Subscriber Number : Unknown
SMS Service Center : +393534000099
Use UCS-2 encoding : No
Tasks in queue : 0
Commands in queue : 0
Call Waiting : Disabled
Current device state : start
Desired device state : start
When change state : now
Calls/Channels : 0
Active : 0
Held : 0
Dialing : 0
Alerting : 0
Incoming : 0
Waiting : 0
Releasing : 0
Initializing : 0


dongle stuck was a common trouble in the past, and so i've setup a
script that reset the dongle:

root@vpbxlpb1:~# cat /etc/cron.hourly/asterisk-dongle-reset
#!/bin/bash

DONGLE="dongle0"
STATE=$(asterisk -U asterisk -rx "dongle show device state ${DONGLE}" | tr -d ' ' | grep ^State: | cut -d ':' -f 2)

if [ "${STATE}" == "GSMnotregistered" ] || [ "${STATE}" == "Notinitialized" ]; then
echo "Dongle ${DONGLE} in state ${STATE}, resetting..."
asterisk -U asterisk -rx "dongle reset ${DONGLE}" > /dev/null
fi

exit 0

but the script typically run 1-2 times a year, not every hour...



Someone have some hint? Thanks.

--
Marco ``Gaio'' Gaiarin | Pordenone Linux User Group (https://www.pnlug.it/)
P.zza S. Tommaso, 20 | Lilliput BBS (http://bbs.lilliput.linux.it)
Cimpello di Fiume Veneto | Azione Cattolica - Concordia-Pordenone
33080 Pordenone (Italia) | (https://www.acconcordiapn.it/)
Tel. +39-0434-56-1305 | Mastodon:@marcogaio@sociale.network ga...@linux.it

Marco Gaiarin

unread,
Apr 5, 2021, 3:04:35 PM4/5/21
to chan_...@googlegroups.com

I reply to myself.

> dongle stuck was a common trouble in the past, and so i've setup a
> script that reset the dongle:
> root@vpbxlpb1:~# cat /etc/cron.hourly/asterisk-dongle-reset

I don't know if this depend on other things, but i've simply reduced
the check from 'one a hour' to 'once a day', and now the dongle does
not stalls anymore.

Probably my operator here have a weak signal, and the dongle took too
much time su settle up. Boh.

Roni López

unread,
Aug 3, 2021, 3:34:52 PM8/3/21
to dongle
Hi, can you share the script?

Regards

Roni

Roni López

unread,
Aug 3, 2021, 3:39:12 PM8/3/21
to dongle
How can the script be for multiple modems? Example, i have Dongle0 to Dongle20, how can i setup the script to run for all modems?

Regards.

Roni

Marco Gaiarin

unread,
Aug 8, 2021, 5:30:15 PM8/8/21
to chan_...@googlegroups.com
Mandi! Roni López
In chel di` si favelave...

> Hi, can you share the script?

Oh, a simple:

#!/bin/bash

DONGLE="dongle0"
STATE=$(asterisk -U asterisk -rx "dongle show device state ${DONGLE}" | tr -d ' ' | grep ^State: | cut -d ':' -f 2)

if [ "${STATE}" == "GSMnotregistered" ] || [ "${STATE}" == "Notinitialized" ]; then
echo "Dongle ${DONGLE} in state ${STATE}:"
asterisk -U asterisk -rx "dongle show device state ${DONGLE}"
echo "Resetting..."
asterisk -U asterisk -rx "dongle reset ${DONGLE}" > /dev/null
fi

exit 0

Roni López

unread,
Aug 8, 2021, 5:36:30 PM8/8/21
to chan_...@googlegroups.com
Thanks! How can it be for múltiple dongles run this???

Thanks 

--
You received this message because you are subscribed to the Google Groups "dongle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chan_dongle...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chan_dongle/20210808212634.GB2910%40lilliput.linux.it.
Reply all
Reply to author
Forward
0 new messages