Can't get SIM800L to work - can't connect over UART

Hi everyone.

I have been trying to implement the SIM800L module with my ESPHome setup, but regardless what I try, it won’t work.
I tried with 8 (yes, literally) different 800L modules, a couple of the new “EVB” version, while the others were the old, regular version.

I have more than enough power, I’m using a 5A power supply, only for the module (ESP is, while I test it, powered with USB).
The power supply is set to 4.3V, which is the lowest it can go (even though I’m waiting for some DC-DC converters to be delivered).
While 4.3 is not ideal, maximum voltage it should be able to handle (considering this is the classic, red version of the module) is 4.4, so I’m within tolerance.
[side note, a few hours after writing the post I received the DC-DC converters, and powered the module with exactly 4V, no result]
I’m also using a 1000 uF 16V capacitor in parallel with the module, as suggested by some websites online.

The module boots and connects successfully to the network (indicated by the led blinking every three seconds), but no matter what I try, I can’t get it to communicate with the board.
The SIM card works (I tested it on my phone), and the carrier confirmed that the 2G network is still active, and that the SIM card I’m using is compatible with it.

I tried with an Arduino uno and the last minute engineers tutorial. I used the level shifter, but could only get garbled serial out (even though the baud rate and wiring are correct):

I also tried, obviously, with ESPHome, with a test board (an ESP32 with 38 pins):

  • First I tried TX 16 and RX 17, nothing, TX 17 and RX 16, nothing
  • I tried to disable USB logging and connect to ESP’s TX and RX pins (as showed on ESPHome’s documentation), nothing
  • I tried to enable again USB logging, but on UART1, while keeping the module connected to TX and RX, nothing

It won’t log anything. It should log something when it’s sending AT commands to the board, but it doesn’t show a thing (even with log level verbose).
It should log AT commands sent, and the response.

  • Tried a different board, nothing
  • Tried completely removing the configuration, and creating it again, nothing
  • Tried different baud rates, nothing

The configuration is as follows:

# Enable logging
logger:
  hardware_uart: UART1
  level: VERBOSE

# Enable Home Assistant API
api:
  encryption:
    key: "[don't look here]"
  services:
    - service: test_sms
      then:
        - sim800l.send_sms:
            recipient: '+39[my phone number]'
            message: Test

captive_portal:

web_server:
    
uart:
  baud_rate: 9600
  tx_pin: TX
  rx_pin: RX

sim800l:
  on_sms_received:
    - logger.log:
        format: "Received '%s' from %s"
        args: [ 'message.c_str()', 'sender.c_str()' ]

sensor:
  - platform: sim800l
    rssi:
      name: "Sim800L RSSI"

binary_sensor:
  - platform: status
    name: "NTB1 Status"
  - platform: sim800l
    registered:
      name: "Sim800L Registered"

The RSSI sensor indicates NA, the Registered sensor indicates OFF.

After a million tries, rebooting the module and the ESP, the ESP logged an AT attempt, but it looks like the module didn’t reply:

[12:01:30][C][logger:439]: Logger:
[12:01:30][C][logger:440]:   Level: VERBOSE
[12:01:30][C][logger:441]:   Log Baud Rate: 115200
[12:01:30][C][logger:443]:   Hardware UART: UART1
[12:01:30][C][uart.arduino_esp32:137]: UART Bus 0:
[12:01:30][C][uart.arduino_esp32:138]:   TX Pin: GPIO1
[12:01:30][C][uart.arduino_esp32:139]:   RX Pin: GPIO3
[12:01:30][C][uart.arduino_esp32:141]:   RX Buffer Size: 256
[12:01:30][C][uart.arduino_esp32:143]:   Baud Rate: 9600 baud
[12:01:30][C][uart.arduino_esp32:144]:   Data Bits: 8
[12:01:30][C][uart.arduino_esp32:145]:   Parity: NONE
[12:01:30][C][uart.arduino_esp32:146]:   Stop bits: 1
[12:01:30][C][sim800l:465]: SIM800L:
[12:01:30][C][sim800l:467]:   Registered 'Sim800L Registered'
[12:01:30][C][sim800l:467]:     Device Class: 'connectivity'
[12:01:30][C][sim800l:470]:   Rssi 'Sim800L RSSI'
[12:01:30][C][sim800l:470]:     Device Class: 'signal_strength'
[12:01:30][C][sim800l:470]:     State Class: 'measurement'
[12:01:30][C][sim800l:470]:     Unit of Measurement: 'dBm'
[12:01:30][C][sim800l:470]:     Accuracy Decimals: 0
[12:01:30][C][status:034]: Status Binary Sensor 'NTB1 Status'
[12:01:30][C][status:034]:   Device Class: 'connectivity'
[12:01:30][C][captive_portal:088]: Captive Portal:
[12:01:30][C][web_server:168]: Web Server:
[12:01:30][C][web_server:169]:   Address: 192.168.1.93:80
[12:01:30][C][mdns:115]: mDNS:
[12:01:30][C][mdns:116]:   Hostname: ntb1
[12:01:30][V][mdns:117]:   Services:
[12:01:30][V][mdns:119]:   - _esphomelib, _tcp, 6053
[12:01:30][V][mdns:121]:     TXT: friendly_name = NTB1
[12:01:30][V][mdns:121]:     TXT: version = 2023.12.9
[12:01:30][V][mdns:121]:     TXT: mac = a0b7656c8a08
[12:01:30][V][mdns:121]:     TXT: platform = ESP32
[12:01:30][V][mdns:121]:     TXT: board = esp32dev
[12:01:30][V][mdns:121]:     TXT: network = wifi
[12:01:30][V][mdns:121]:     TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[12:01:30][V][mdns:119]:   - _http, _tcp, 80
[12:01:30][C][ota:097]: Over-The-Air Updates:
[12:01:30][C][ota:098]:   Address: 192.168.1.93:3232
[12:01:30][C][ota:101]:   Using Password.
[12:01:30][W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts
[12:01:30][C][api:139]: API Server:
[12:01:30][C][api:140]:   Address: 192.168.1.93:6053
[12:01:30][C][api:142]:   Using noise encryption: YES
[12:01:31][V][sim800l:062]: S: AT - 1
[12:01:48][D][api:102]: Accepted 192.168.1.67
[12:01:49][V][api.connection:1103]: Hello from client: 'Home Assistant 2024.1.5' | 192.168.1.67 | API Version 1.9
[12:01:49][D][api.connection:1121]: Home Assistant 2024.1.5 (192.168.1.67): Connected successfully

Any advice will be helpful because I tried literally everything I could think of.

Thanks in advance

Where are you located? I had issues, tried three different network SIMs for me in the UK only EE worked, tried O2 and Vodafone.

If you have a usb to serial uart you can issue the AT commands from putty or similar and see if it registers with the network. From my experience it was almost impossible to issue commands as it was always trying to connect and failed. From memory think the flashing led was the symptom I got perhaps 3 flashes then a pause.

Worth trying another sim from a different network.

I’m in Italy with Vodafone.
Tried the uart adapter with putty but only got garbled output, similar to the arduino’s one.
I’ll try a different sim, but usually it connects successfully (as indicated by the led flashing every three seconds).

At least from what I see, it doesn’t look like the problem is related to the network, but rather with the serial communication between the module and the board