Carriage return vs newline, GSM/SMS and software serial?

Never thought I would ask this, I know a carriage return really is \r, or character 13, and newline is \n or character 10.

SIM808 GSM specifies that in an SMS command a must be inserted between the phone number and the message text. The message ends with a ctrl-z, character 26, here coded as \x1A.

This works: “AT+CMGS=”+12345678901"**\n**HELLO!\x1A"

This is an error: “AT+CMGS=”+12345678901\”**\r**HELLO!\x1A"

I’m of course happy that \n=newline works in this command, but I’d like to understand why? The strings above are sent to the GSM with a SoftwareSerial.println() command. I double checked by dumping the characters in the string, \n really is char 10, and \r is 13…

Sounds more like an error with the SIM808.

Hmm. This indeed is a newer version of the SIM808, where the command to switch on GPS no longer is “AT+CGPSPWR=1”, but “AT+CGNSPWR=1”. The label on my SIM808 has the line: “P/N: S2-1060C-21F02”

“AT+GSV” gives:


Well, if anyone experiences the same issue, do tell!

Off-topic, but the SIM800 series has an error in the 'UNDER-VOLTAGE WARNNING" and "OVER-VOLTAGE WARNNING" messages. Yes, spelled with double NN. Even in the documentation, so that is good, in a way. At least it's now sort of documented here in the forum, too.

I'm now just checking "'UNDER-VOLTAGE WARN", saving a precious 4 bytes, too.