vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.93k stars 715 forks source link

Check if SIM-card is available? #402

Closed Elmi77 closed 4 years ago

Elmi77 commented 4 years ago

[ ] I have read the Troubleshooting section of the ReadMe

What type of issues is this?

[ ] Request to support a new module

[ ] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [X] Question or request for help

What are you working with?

Modem: SIM7000G Main processor board: LilyGO SIM7000G TinyGSM version: 0.10.5 via ArduinoIDE Code:

Is there a way/function to recognise if a SIM-card is inserted? Restarting/initialising of modem takes quite a long time before it fails when there is no SIM card available, so I'd prefer to check for this first.

SRGDamia1 commented 4 years ago

Try the getSimStatus() function. 1=ready.

Elmi77 commented 4 years ago

Works - Thanks!