I am using SIM800L module the module. I am new to GSM modules, so I've searched for the basic to use the GSM with the Arduino. this is my code.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
when I send any AT commands to the GSM I didn't find any respond, so I changed the baud rate of mySrial and try different rates to get any respond, but I didn't get anything.
The wiring of the circuit is:
- The 5V of the GSM connected to 5V of a power supply (the maximum current of it is 3A).
- The GND of the GSM to the GND of the power supply.
- TX of the GSM to pin 2 of the Arduino.
- RX of the GSM to pin 3 of the Arduino.
- GND to to GND of the Arduino.
The module has two LEDs:
- the first one D6 NET blanking every second.
- the second one D2 RING blanking every (7, 6, 8 or 9) times of the first one.
transmit on modem channel
, so it should be connected to the Arduino TX pin ... the SIM800L module may have pins labeled same as a modem