0

I am trying to send some data using the sim800l module.

I am using the SoftwareSerial library and connected the RX and TX pins to Digital pins 10 and 11. I have also tried pins 2 and 3.

The module is connected to a 5v power supply and the only pins connected to the Arduino board are RX and TX. The module is connected to the network. this is the code I am using:

#include <SoftwareSerial.h>
SoftwareSerial myGsm(10,11);

void setup()
{
 myGsm.begin(9600);  
 Serial.begin(9600);  
 delay(500);
 
 myGsm.println("AT+CGATT=1");
 delay(200);
 printSerialData();
 
 myGsm.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");//setting the SAPBR,connection type is GPRS
 delay(1000);
 printSerialData();
 
 myGsm.println("AT+SAPBR=3,1,\"APN\",\"\"");//setting the APN,2nd parameter empty works for all networks 
 delay(5000);
 printSerialData();

The problem is that nothing gets printed in the serial monitor.

I used the module to send sms messages using the FONA library and it worked.

Please help!

  • Hello I have experience with SIM800. I want to help you. But the way you ask questions is not enough to answer. You haven't shared all of the code or the part that will help us understand it. printSerialData (); What exactly does the function do? However, the code found here (https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/) may give an idea. – omfaer Sep 07 '20 at 08:53

1 Answers1

0

I think the problem is, To print something on the serial monitor, you need to use the Serial.println(); The softwareSerial println only sends data to the devices connected to that pins.

Vishnu Vinod
  • 603
  • 4
  • 15