Oriolg

I'm programing an aplication with GSMShield and one battery. My problem: in case gsm can't connect to accessprovider, it always try to connect, and discharges the battery, how can stop the module in this cases?

davidgoth

For configurate async mode, you must replace the code line gsmAccess.begin(PINNUMBER) with gsmAccess.begin(PINNUMBER, true, false). The third parameter indicates async mode if it is false, and the second parameter indicates if modem restart at the beginning (default is true).

AndersHedberg

I tried a variant of the code above, but it seems gsmAccess.begin(PINNUMBER,true,false) gives me a SIM PIN code error... (yes, I hava a PIN code on the sim defined to 1424, so it is correct)From the start of the debug log:

As the delay(1000) is really needed I suspect there can be severe problems on some network connections, i.e some AT-commands can take much more time than 1 second to respond and how will this work then?

The first time I go into the loop all works well: it connects to the GSM network and it shuts down correctly (Status led goes off). But the 2nd loop it gets stuck with the connection until it times out giving me:

AndersHedberg

Quectel claims in some datasheets that you should at least send three "AT" commands to the module before trying to do anything else...

It might be that it tries to do autobauding, which might looks at the bit-patterns of the AT and then tries to guess the baudrate... but that is just my guess. In that case it should be possible to send the module an AT-command to set it to a fixed baudrate, and then save that setting in the module... otherwise there is another problem. I have seen some strange things when using the slow-clock mode of the modem along with the DTR signal, but that is not really related to this issues I think.