Fwd: Help in my proget with sim7000e

Marco Salatin marco.salatin at gmail.com
Mon Mar 16 11:07:35 UTC 2020


Hi Aleksander Morgado,
i'm using qmicli with sim7000e and raspberry PI for my gps project.

I can't stay connect to the network because sometimes i receive error
messages like:

error: couldn't start network: QMI protocol error (14): 'CallFailed'
# call end reason (3): generic-no-service

or

# error: couldn't start network: QMI protocol error (14): 'CallFailed'
# call end reason (12): (null)
# verbose call end reason (2,201): [internal] error

Here the schema and code where i try to keep alive the connection.


[image: SchemaGPS.jpg]


def keepAlive(myCounter):

modemStatus = soCmd("qmicli -d /dev/cdc-wdm0
--wds-get-packet-service-status", "", 10, False, False)

if "'connected'" in modemStatus:
#logging.info("WATCHDOG: CONNECTED.")
if not soCmd("ifconfig wwan0 | grep 'inet '", "", 3, False, False):
soCmd("udhcpc -q -f -n -i wwan0", "", 15)
else:
myIps = soCmd("hostname --all-ip-addresses", "", 3, False, False)
logging.info("WATCHDOG: CONNECTED. " + myIps.rstrip("\n\r") + " " + str
(myCounter))
sleep(60)
else:
logging.info("----------------------------- SCAN: " + str(myCounter) + "
-----------------------------")
logging.info(modemStatus)
if "'disconnected'" in modemStatus:
qmiStart(modemStatus)
else:
qmiReset(modemStatus)

def qmiStart(modemStatus):
if config.PIN:
soCmd('qmicli -d /dev/cdc-wdm0 --uim-verify-pin=PIN1,' + config.PIN, "", 3)
sleep(1)

#soCmd("qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength | tr '\"' ' ' |
grep Network | head -1", "", 5, True, False)

# Next line for Stretch OS -- Change APN Name!
cmdlog = soCmd('qmicli -d /dev/cdc-wdm0
--device-open-"net=net-raw-ip|net-no-qos-header" --wds-start-network="apn='
+ config.APN + ',ip-type=4" --client-no-release-cid', "", 20)

# ERRORE 1:
https://lists.freedesktop.org/archives/libqmi-devel/2013-November/000669.html
# error: couldn't start network: QMI protocol error (14): 'CallFailed'
# call end reason (3): generic-no-service
#
# Descrizione:
# The modem simply doesn't think you have access to the LTE network with
your SIM.
# Are you sure your SIM is provisioned with access for the APN you're
using?
# Des the same SIM work on other devices with the APN?
#
# Possibile soluzione
#if "generic-no-service" in cmdlog:
# qmiReset(modemStatus)
# ERRORE 2:
https://lists.freedesktop.org/archives/libqmi-devel/2016-March/001535.html
# error: couldn't start network: QMI protocol error (14): 'CallFailed'
# call end reason (12): (null)
# verbose call end reason (2,201): [internal] error

setWwan0Interface()


def setWwan0Interface():
soCmd("ip link set dev wwan0 down")
# Enable OS Raw IP Mode setting (not persistent)
soCmd("echo Y > /sys/class/net/wwan0/qmi/raw_ip")
soCmd("ip link set dev wwan0 up")
sleep(1)

def qmiReset(modemStatus):
if "cannot access" in soCmd("ls -l /dev/ttyUSB2", "", 3, False, False):
if "cannot access" in soCmd("ls -l /dev/ttyS0", "", 3, False, False):
logging.info("ERRORE: GRAVE")
logging.info(modemStatus)
else:
qmiResetTTY("/dev/ttyS0")
else:
qmiResetTTY("/dev/ttyUSB2")

def qmiResetTTY(port):
logging.info("WATCHDOG: Reset modem " + port)
mySerGPS = serial.Serial(port, baudrate=115200, timeout=1, rtscts=True,
dsrdtr=True)
AT(mySerGPS, 'AT+CFUN=1,1')
mySerGPS.close()
sleep(30)


Can someone help me?

Thanks

Marco Salatin





-- 


*Marco Salatin*T. +39 388 1947558

skype: marco.salatin

marco.salatin at gmail.com
Sito web: www.salatin.eu

Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in
questo messaggio sono riservate ed a uso esclusivo del destinatario.
Qualora il messaggio in parola Le fosse pervenuto per errore, La invito ad
eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandomene gentilmente
comunicazione. Grazie.
Pursuant to Legislative Decree No. 196/2003, you are hereby informed that
this message contains confidential information intended only for the use of
the addressee. If you are not the addressee, and have received this message
by mistake, please delete it and immediately notify us. You may not copy or
disseminate this message to anyone. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20200316/c145f428/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SchemaGPS.jpg
Type: image/jpeg
Size: 67111 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20200316/c145f428/attachment-0001.jpg>


More information about the libqmi-devel mailing list