How to send a text message in Polish, e.g. with the following text "Cześć", where the characters are from outside the GSM alphabet? I have a TTGO T-Call board that has a SIM800L module from SIMCOM. I have tried using various AT commands, but nothing works. Has anyone encountered a similar problem? Thank you very much for your help!
How to send an SMS in a language other than English with module SIM800L?
793 Views Asked by Dawid Irzyk At
2
There are 2 best solutions below
0
On
This is the working code for TTGO T-CALL 1.3/1.4 SIM800L
#define SIM800L_RX 27
#define SIM800L_TX 26
#define SIM800L_PWRKEY 4
#define SIM800L_RST 5
#define SIM800L_POWER 23
void Send_AT(String command) {
Serial.println("AT: " + command);
Serial2.println(command);
long timer = millis();
while (timer + 3000 > millis()) {
while (Serial2.available()) {
Serial.write(Serial2.read());
}
}
Serial.println();
}
void setup() {
pinMode(SIM800L_POWER, OUTPUT);
digitalWrite(SIM800L_POWER, HIGH);
Serial.begin(115200);
Serial2.begin(9600, SERIAL_8N1, SIM800L_TX, SIM800L_RX);
delay(1000);
Serial.println("--- Loading Firmware ---\n");
delay(5000);
Serial.println("--- (C) 2022 by Dawid Irzyk ---");
Serial.println("");
while (Serial2.available()) {
Serial.write(Serial2.read());
}
}
void SendMessage()
{
Serial2.print("ATZ\r\n");
delay(2000);
Serial2.print("AT+CSCS=\"HEX\"\r\n");
delay(2000);
Serial2.print("AT+CSMP=17,168,0,8\r\n");
delay(2000);
Serial2.print("AT+CMGF=1\r\n");
delay(2000);
Serial2.print("AT+CMGS=\"+48123123123\"\r\n");
delay(2000);
Serial2.print("0043007a0065015b0107");
delay(2000);
Serial2.println((char)26);
}
void loop() {
SendMessage();
while (true) {
delay(1000);
}
}
According to the GSM specification 3GP TS 127.007, the magic command to declare that you want to send UCS2 characters (16 bits unicode) is:
From that point you must send the hex values of the unicode characters. The example says that to send
Abcyou actually send 004100620063. So to sendCześćit would be0043007a0065015b0107