mongoose-os-libs / pppos

PPPoS / cellullar modem support
Other
27 stars 23 forks source link

PPPoS Library cannot handle a controller reset #1

Closed DrBomb closed 7 years ago

DrBomb commented 7 years ago

The PPPoS library cannot handle a controller reset, it connects the first time correctly.

I'm using the Adafruit Fona 3G Modem. Link.

Here's a log of the connection: Link.

The process was the following:

Surely the ESP32 will need to issue the "+++" escape command if the first AT command fails

rojer commented 7 years ago

Surely the ESP32 will need to issue the "+++" escape command if the first AT command fails

and that's exactly what it does, here.

Fona 3G is based on SIM5320A, i tested with SIM5320E but i don't think that is a significant difference. i observed that sometimes it takes more than one attempt to get the modem from data and into command mode, so - what if you just wait for a while? it may eventually work. please set debug.level=3 and pppos.hexdump_enable=true, this will log all the data sent and received in the serial interface. this may help us troubleshoot.

DrBomb commented 7 years ago

The only issue I see then is that here, the "+++" sequence is sent with a "\r\n" in the end. While the SIM5320A requires <1SecPause>+++<1SecPause> with no other characters in order to escape PPPoS.

rojer commented 7 years ago

i had a special check at first that wouldn't send \r\n after +++, but then tested without it and it worked. but let me double-check.

rojer commented 7 years ago

ok, i sent a change that reliably takes the device out of existing PPP session. it will be published soon and attached to this issue.

rojer commented 7 years ago

there, it's been published. @DrBomb , please try and let me know if it works for you.

DrBomb commented 7 years ago

It works! Thank you

alvarowolfx commented 7 years ago

Worked for me too, I'm using the SIM800L modem and now when I reset the device it also successfully reconnect to the modem. :+1: