Sim800 a liitle help

Hi I am using a D1 mini to control a SIM800. I am getting really confused about the need for newline \n and carriage return \r.

For starters when I enter AT with newline enabled it works fine and returns AT Ok. If I take off the new line and type AT I get no reply. If I take off the newline and then type AT\n I get no reply?

However the real problem is using the code.

In my code I have

Serial.println("AT+CMGF=1\r");
Serial.println("AT+CMGR=1,0\r");

Whatever combination I try the command appears on the serial monitor but the SIM800 just seems to ignore it. I am expecting it to print the first message stored as it does using the serial monitor and a TTL board.

I know I am missing something easy perhaps someone kind could help.

Thanks in advance

Tim

I m not sure what you are missing, but WE are missing an exact description of your circuit and the code you use….

➜ do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation for your ask).

It would help if you posted your code.

Printing something to the Serial Monitor (Serial.print statements) is not the same as typing something into the Serial Monitor - they are sending information in opposite directions. You also can't type escape characters ("\") into the Serial Monitor and expect them to be interpreted.

using an Arduino Mega with a SIM800L if I use statements such as

Serial1.println("AT+CGMM");
Serial1.println("AT+CGMR");
Serial1.println("AT+CGMI");

I get a response

AT+CGMM
SIMCOM_SIM800L
OK

AT+CGMR
Revision:1418B05SIM800L24
OK


AT+CGMI
SIMCOM_Ltd
OK

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.