blog: Bridging to a SIM800L with a Raspberry Pico

Send GSM-AT commands from a computer via serial console > Raspberry Pi Pico > SIM800L in order to phone home.

Pins

SIM800L Raspberry Pi Pico
RX UART1_TX / GP8 / Pin 11
TX UART1_RX / GP9 / Pin 12
GND GND / Pin 38
VCC VBUS

Caution: Voltage is a little above spec this way, but it suffices for tests.

Bridge

#define S2_TX 8
#define S2_RX 9

UART Serial2(S2_TX,S2_RX,0,0);

void setup() {
  Serial.begin(9600);
  Serial2.begin(9600);
}

void loop() {
  while (Serial2.available() > 0) {
    Serial.print(Serial2.readString());
    delay(10);
  }
  while (Serial.available() > 0) {
    Serial2.print(Serial.readString());
    delay(10);
  }
}

Then open a serial console (e.g. inside the Arduino IDE)

Typical interaction

Command Meaning
ATI Get info about the SIM800L board, make sure it’s connected
AT+CSQ Check signal quality, answer: +CSQ: FLOATVAL, everything above 10,0 is OK
AT+COPS? Check net login (e.g. D1)
ATD+49123456789; Call +49 1234 56789 (mind the semicolon)
ATH Hang up
Posted in arduino hacking programming
2023-03-12 16:14 UTC