SIM800l connection check

Hi there
I am working with Arduino and Sim800l module
I want to check whether Sim800l is connected to the network right now or no? If the connection is established and OK at the moment, I want to send a message and if the connection is off, I want to print something.
How can I do this?
(For example, is there any method to return a Boolean for connection checking? (If connected, True or ...))
I will be more appreciated if your help contains a code example.

try AT+COPS? command, e.g. using a QUECTEL E£C21 modem connected

at+cgmi
Quectel
OK
at+cgmm
EC21
OK
at+csq
+CSQ: 13,99
OK
at+cops?
+COPS: 0,0,"EE Tele2 IoT",7
OK

using a SIM880L not connected

AT+CGMI
SIMCOM_Ltd
OK
AT+CGMM
SIMCOM_SIM800L
OK
AT+COPS?
+COPS: 0
OK

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.