pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
198 stars 167 forks source link

GPy, G01 #349

Open PiotrSrebrny opened 4 years ago

PiotrSrebrny commented 4 years ago

I am working with G01 and GPy LTE modem. I am trying to attach to the network however the procedure does not complete with lte.isattached == true. I am using Sequans firmware NB1-41019.dup and Pycom MicroPython 1.20.1.r1 [v1.11-3138a13] on 2019-10-08; GPy with ESP32 Pybytes Version: 1.1.3.

The steps I take are following:

from network import LTE lte=LTE() lte.attach(band=20, apn="xxx") lte.send_at_cmd("AT+CEREG?") '\r\n+CEREG: 3,2\r\n\r\nOK\r\n' # looking for network lte.isattached() False lte.send_at_cmd("AT+CEREG?") '\r\n+CEREG: 3,1,"9FC5","011FCC67",9\r\n\r\nOK\r\n' lte.isattached() False

lte.isattached() always indicates that it is not attached.

robert-hh commented 4 years ago

Which firmware version are you using?

robert-hh commented 4 years ago

Looking into the code, it seems to look for '+CEREG: 2,1,' and '+CEREG: 2,5,' but not for '+CEREG: 3,1,', so it misses the confirmation. So the question is, why your card responds with +CEREG: 3,1

PiotrSrebrny commented 4 years ago

Thank you for the answer. Now, I could fix my problem. I set the CEREG value manually via send_at_cmd() to 3 to get more verbose output when registering. This is way it appears in the response. I think that you can safely ignore the first number from CEREG response, as it is not relevant in order to determine attachment state.

wt., 15 paź 2019 o 11:15 robert-hh notifications@github.com napisał(a):

Looking into the code, it seems to look for '+CEREG: 2,1,' and '+CEREG: 2,5,' but not for '+CEREG: 3,1,', so it misses the confirmation. So the question is, why your card responds with +CEREG: 3,1

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pycom/pycom-micropython-sigfox/issues/349?email_source=notifications&email_token=AGKDRIF6OFG6RVNW6XXXDFTQOWCZLA5CNFSM4JAZGDU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBIBFWI#issuecomment-542118617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKDRIDCBD5TGY5IGHCELLDQOWCZLANCNFSM4JAZGDUQ .