try this code which I use to connect a UNO to a SIM800 (see comments for wiring)
// SIM800l AltSoftSerial test
#include <AltSoftSerial.h>
#include <SPI.h>
#include <Wire.h>
// Mega SIM800l test
//SIM800L 5V POWER to Mega 5V
//SIM800L GND POWER to Mega GND
//SIM800L TXD to Mega RX pin 48
//SIM800L RXD to Mega TX pin 46
//SIM800L VDD to Mega 5V
//SIM800L UART TTL GND and RST not connected
//SIM800L TXD to UNO RX pin 8
//SIM800L RXD to UNO TX pin 9
// RS232 shield
// RS232 TXD to UNO pin 9
// =[===RS232 RXD to UNO pin 8
AltSoftSerial simSerial;
void setup() {
Serial.begin(115200);
Serial.println("AltSoftSerial test");
//Begin serial communication with Arduino and SIM800L
simSerial.begin(9600);
Serial.println("SIM module intialized");
}
void loop() {
if (Serial.available()) {
char command = Serial.read();
//Serial.println(command);
simSerial.print(command);
}
while (simSerial.available()) {
char reponse = simSerial.read();
Serial.print(reponse);
}
}
a test gives
AT
OK
AT+CGMI
SIMCOM_Ltd
OK
AT+CGMM
SIMCOM_SIM800L
avoid using images to display text - it is difficult read etc
copy the text and upload it
Thank you for your response.
I changed the module TXD to pin 8 and RXD to 9.
With this code, i can now see the AT commands but no response.
Serial monitor:
AltSoftSerial test
SIM module intialized
AT
AT+CGMI
if yoou are using UNO did you try the code of post 4?
did you power it so
//SIM800L 5V POWER to UNO 5V
//SIM800L GND POWER toUNO GND
//SIM800L VDD to UNO 5V
//SIM800L UART TTL GND and RST not connected
//SIM800L TXD to UNO RX pin 8
//SIM800L RXD to UNO TX pin 9
I tried to connect the VDD to 5V and now it won't appear anything except
AltSoftSerial test
SIM module intialized
even if i type AT or something
This is with the post4 code
try taking the RST pin to GND for a couple of seconds which will reset the device
the device may be in autobaud mode - from the sim800l manual When DCE powers on with autobauding enabled, it is recommended to send "AT" or "at" or "aT" or "At" to synchronize the baud rate, until DTE receives the "OK" response, which means DTE and DCE are correctly synchronized.