Does anyone know if there is a way to verify that the SMS service is available - ideally before trying to send an SMS and getting an error code? Presumably theres an AT command to query the status of the modem, but where do I start looking ?
Basically I want my app to be able to recognise and reject a duff SIM card at start up. I check the initialisation state of the SIM but that always returns OK even with a bad SIM. Presumably that just means that the SIM data has been read out OK.
There is no specific way to check for SMS service.
You can check GSM registration with AT+CREG and/or monitor +CREG: and/or +WIND: unsolicited responses - clearly, you can’t do anything network-realted when you’re not registered to the network!
Thanks again awneil, very helpful as always. The bad SIM I referred to was such that the modem was unable to register on the network and my software didn’t detect that. I got the SIM initialisation status OK, but I think that just means that OpenAT has managed to read the SIM data.
In the end I used the response to the CREG command to determine network status. More useful to my app and not necessarily just to do with the SIM really, could be a variety of reasons.