Bonezegei GSM: A Simple and Reliable Arduino Library for AT Command Based GSM Modules
Batutay, Jofel ยท 2023/10/27

Bonezegei GSM is an Arduino library that allows users to interface with GSM modules that support AT commands, such as the SIM800 and SIM900. The library allows Arduino devices to send SMS messages without the need for complex setups or third-party libraries. The library is simple to install and use if you follow the instructions on Bonezegei website Arduino Library installation.

Disclaimer

The code and libraries provided by Bonezegei is intended for informational and educational purposes only. Bonezegei does not own or manufacture the hardware associated with the code. The code is provided "as is" without any warranty, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall Bonezegei be liable for any claim, damages, or other liability arising from the use of the code or the hardware. Users are solely responsible for ensuring that their use of the code complies with all applicable laws and regulations.


1. Send Message

Send Message to specific number, replace "00000000" with the mobile number of the recipient

/*
  Simple send Message
  Author: Bonezegei (Jofel Batutay)
  Date: August 2023 
*/

#include <Bonezegei_GSM.h>
Bonezegei_GSM gsm(Serial);

void setup() {
  gsm.begin(9600);

  //param 1 mobile number in string form
  //param 2 message
  gsm.sendMessage("00000000" , "Hello SMS" );
}

void loop() {
  // put your main code here, to run repeatedly:
}

1. Debug AT Commands

Debug the GSM module via Serial Port

/*
  Simple send Message with Debug for AT commands
  Author: Bonezegei (Jofel Batutay)
  Date: August 2023 

  Serial0 will provide the output for debugging
  While serial1 will control the GSM
*/


#include <Bonezegei_GSM.h>
Bonezegei_GSM gsm(Serial1);

void setup() {
  gsm.begin(9600);

  Serial.begin(9600);

  //param 1 mobile number in string form
  //param 2 message
  gsm.sendMessage("00000000" , "Hello SMS" );
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial1.available()) {
    Serial.write(Serial1.read());
  }

   if (Serial.available()) {
    Serial1.write(Serial.read());
  }
}

References

  • Batutay, Jofel. (2023). Arduino Library Installation. Bonezegei. https://bonezegei.com/?c=resources/tutorial&&d=resources/tutorial/libraries/install&&nav=1

Cite this

  • Batutay, Jofel. (2023). Bonezegei GSM: A Simple and Reliable Arduino Library for AT Command Based GSM Modules. ResearchGate. https://doi.org/10.13140/RG.2.2.13359.10400.