Reputation: 1
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!
Upvotes: 0
Views: 303
Reputation: 765
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.
Upvotes: 0