You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GSMSim Library for Arduino (for SimCom Modules like SIM800L, SIM900 etc)
This library for Arduino to use SimCom GSM Modules. This library tested on Sim800L (5V Module). Some functions may not work other SimCom Modules like FM Radio functions. This library may work other gsm shields or modules. But some AT Commands only work SimCom modules. So some functions may not work on other gsm shield or module (etc A6 Ai-Thinker)
This library use SoftwareSerial library. So please dont forget this library's limits. Dont use this library on Arduino's hardware serial ports 0 and 1!
Connection & Pinouts
Arduino Uno
Sim800L
Notes
+5v
(3.8v)~(4.4v)!
Power supply input
7 RX_PIN
TX
8 TX_PIN
RX
2 RESET_PIN
RST
Reset Pin
GND
GND
How I use this library?
Firstly inport this library on your Arduino IDE. Then you can use this:
Only works on simcom modules. returns NOT_CONNECTED if not connected!
phoneStatus()
integer
Phone activity status 0-ready, 2-unknown, 3-ringing, 4-call in progress, 99-unkonown
echoOff()
true or false
Echo mode off (for module)
echoOn()
true or false
Echo mode on (for module)
moduleManufacturer()
String
moduleModel()
String
moduleRevision()
String
moduleIMEI()
String
moduleIMSI()
String
moduleICCID()
String
ringerVolume()
integer
setRingerVolume(uint8_t level)
true or false
level must between 0-100
speakerVolume()
integer
setSpeakerVolume(uint8_t level)
true or false
level must between 0-100
moduleDebug()
String
print verbose
Call functions
Name
Return
Notes
call(char* phone_number)
true or false
If colp active, it always return true.
callAnswer()
true or false
callHangoff()
true of false
callStatus()
integer
Return codes as same as phoneStatus function
callSetCOLP(bool active)
true or false
If active is true, when call status change, module send call details to SoftwareSerial
callIsCOLPActive
true or false
True COLP is active else passive
callActivateListCurrent(bool active)
true or false
say the caller :)
callReadCurrentCall(String serialRaw)
String
Return call status and number like STATUS:xxx|NUMBER:xxx - This only read when you give raw serial data to this function. It not fetch the raw serial data!
SMS functions
Name
Return
Notes
smsTextMode(bool textModeON)
true or false
TEXT mode or PDU mode.
smsSend(char* number, char* message)
true or false
Message must be in 160 characters and in text mode only use ascii characters.
smsListUnread()
String
If no message found it returns NO_SMS else returns SMSIndexNo:x,y,z. If you have a lot of un read messages, return only SMSIndexNo:
smsRead(uint8_t index)
String
If not message on given index, it return INDEX_NO_ERROR else a string about message.
smsRead(uint8_t index, bool markRead)
String
This function can mark message read or unread when opened.