Esp32 sim800l ttgo t call .. not working

Oh come on, straight off the esphome home page

Just received a T-Call as well and experiencing the same here. In both your and my output I do see “RSSI: 0 dB” which might be pointing in the direction of either the antenna being crappy or the wrong pinout is being used to let the ESP communicate with the SIM800L.

I’m more inclined to think it has something to do with the pinout … because I added a better antenna and still have the same issue …
I have the ttgo-t-call and the sim800l connected with d1 mini with a voltage regulator still same problem …

Driving me nuts … :joy::crazy_face:

Must be it. It is trying to send “AT” but never gets a response. I’ve tried a bunch of GPIO ports I found online but so far nothing…

You do realise these devices only do gsm/gprs. basically 2g. There are also specific power requirements including the ability to provide 2A.

This listing is quite specific https://www.trademe.co.nz/a/marketplace/electronics-photography/other-electronics/electronic-components/other/listing/2426429996

worth a read.

To initialize the sim800l, you need to bring some pins to a certain state.
Try it like this:

switch:
  - platform: gpio
    name: "SIM800_PWKEY"
    pin: 4
    restore_mode: ALWAYS_OFF
  - platform: gpio
    name: "SIM800_RST"
    pin: 5
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "SIM800_POWER"
    pin: 23
    restore_mode: ALWAYS_ON

It should be remembered that if the LED blinks frequently, then the module is not connected to the operator. If the LED blinks slowly, the module is connected to the service provider.

4 Likes

Awesome, now we’re getting somewhere! The LED wasn’t blinking before, it is now. It seems to register fine to the network, but it doesn’t appear to be reacting to text messages yet.

The logs are showing this so perhaps the wrong GPIO pins are being used since I assume the AT needs to be acknowledged.

[17:29:32][VV][sim800l:230]: Buffer pos: 3 10
[17:29:32][V][sim800l:048]: R: AT - 2
[17:29:32][W][sim800l:062]: Not ack. 2 AT

Edit. Got it!

This seems to work:

uart:
  baud_rate: 9600
  tx_pin: 27
  rx_pin: 26
3 Likes

i did both ,

but my loogin states

[16:34:29][W][sim800l:062]: Not ack. 2 ???
[16:34:32][D][sim800l:216]: Unhandled: a? - 0
[16:34:40][D][sim800l:216]: Unhandled: ?#??? - 0
[16:34:40][D][sim800l:216]: Unhandled: ? - 0
[16:34:45][I][ota:046]: Boot seems successful, resetting boot loop counter.

working solution here

thank you @reliable @bigstation

Hi, i tried ESPHOME script from @bigstation but it doesn’t work : Loop with “Registration fail”.
I removed pin code and simcard works fine on my phone

Any idea ?

[07:50:38][I][app:100]: ESPHome version 1.14.3 compiled on Feb 12 2020, 19:20:03
[07:50:38][C][wifi:415]: WiFi:
[07:50:38][C][wifi:283]: SSID: [redacted]
[07:50:38][C][wifi:284]: IP Address: 192.168.1.148
[07:50:38][C][wifi:286]: BSSID: [redacted]
[07:50:38][C][wifi:287]: Hostname: ‘gsm_esp32’
[07:50:38][C][wifi:291]: Signal strength: -41 dB ▂▄▆█
[07:50:38][C][wifi:295]: Channel: 1
[07:50:38][C][wifi:296]: Subnet: 255.255.255.0
[07:50:38][C][wifi:297]: Gateway: 192.168.1.1
[07:50:38][C][wifi:298]: DNS1: 192.168.1.1
[07:50:38][C][wifi:299]: DNS2: 0.0.0.0
[07:50:38][C][uart:040]: UART Bus:
[07:50:38][C][uart:042]: TX Pin: GPIO27
[07:50:38][C][uart:045]: RX Pin: GPIO26
[07:50:38][C][uart:047]: Baud Rate: 9600 baud
[07:50:38][C][uart:048]: Stop bits: 1
[07:50:39][C][switch.gpio:042]: GPIO Switch ‘key_pin’
[07:50:39][C][switch.gpio:043]: Pin: GPIO4 (Mode: OUTPUT)
[07:50:39][C][switch.gpio:059]: Restore Mode: Always OFF
[07:50:39][C][switch.gpio:042]: GPIO Switch ‘reset_pin’
[07:50:39][C][switch.gpio:043]: Pin: GPIO5 (Mode: OUTPUT)
[07:50:39][C][switch.gpio:059]: Restore Mode: Always ON
[07:50:39][C][switch.gpio:042]: GPIO Switch ‘power_pin’
[07:50:39][C][switch.gpio:043]: Pin: GPIO23 (Mode: OUTPUT)
[07:50:39][C][switch.gpio:059]: Restore Mode: Always ON
[07:50:39][C][template.text_sensor:020]: Template Sensor ‘Sms Sender’
[07:50:39][C][template.text_sensor:020]: Template Sensor ‘Sms Message’
[07:50:39][C][logger:175]: Logger:
[07:50:39][C][logger:176]: Level: DEBUG
[07:50:39][C][logger:177]: Log Baud Rate: 115200
[07:50:39][C][logger:178]: Hardware UART: UART0
[07:50:39][C][sim800l:259]: SIM800L:
[07:50:39][C][sim800l:260]: RSSI: 0 dB
[07:50:39][C][ota:029]: Over-The-Air Updates:
[07:50:39][C][ota:030]: Address: gsm_esp32.local:3232
[07:50:39][C][api:095]: API Server:
[07:50:39][C][api:096]: Address: gsm_esp32.local:6053
[07:50:39][D][sim800l:216]: Unhandled: SMS Ready - 0
[07:50:52][W][sim800l:062]: Not ack. 3 ATE0AT+CMGF=1
[07:50:52][D][sim800l:216]: Unhandled: OK - 0
[07:50:57][D][sim800l:216]: Unhandled: OK - 0
[07:51:08][W][sim800l:107]: Registration Fail
[07:51:08][W][sim800l:107]: Registration Fail
[07:51:11][W][sim800l:107]: Registration Fail

does it require “roaming”? in that case there is a patch on dev which causes it to accept roaming simcards

Hi, Guillermo.

It works fine now with DEV branch !

Thank you

I’ve got two of these boards and can’t seem to get them to flash ESPHome properly at all - is there a trick I’ve missed?

Mine both just start boot looping after what appears to be a successful flash. ESPHome’s Git repo has an issue #598 that was apparently resolved with the latest flashing tool but it hasn’t worked for me.

Sorry if I’ve missed something obvious; it’s my first ESP32 and it seems these are totally different beasts to their older siblings!

EDIT: Fixed. Silly YAML.

Does that mean switching the ESPHome HA addon to the Dev one?

EDIT: Yep, answered my own question :crazy_face:

1 Like

Ready to smash this thing to pieces :laughing:

I had the SMS element working flawlessly on this but now it doesn’t seem to work at all - I’m getting a weird problem where it’s pulling messages from long ago rather than the message it’s actually receiving. Some of them very old indeed. Very similar to this issue, but I can’t seem to fix. I’ve also had it send repeated messages until it burned its way through £10 worth of credit when it was only supposed to text once!

I thought if I incorporated the right AT command (tried the below combinations) I could include an automation to clear old messages but I can’t seem to get the syntax right and just get ‘Not Ack’ back.

It’s definitely not power related - it’s running off an 18650.

Has anyone else had issues like this?

The driver if far from perfect and not so well tested in different conditions. Mine works ok. I receive one or two gvmnt sms daily.
You can try loading the sim on a phone and make sure there are no stored messages on it. That can be confusing the driver.

Did anyone here tried implementing battery reading percentage?

1 Like

Thank you all
I has worked for me:

switch:

  • platform: gpio
    name: “SIM800_PWKEY”
    pin: 4
    restore_mode: ALWAYS_OFF
  • platform: gpio
    name: “SIM800_RST”
    pin: 5
    restore_mode: ALWAYS_ON
  • platform: gpio
    name: “SIM800_POWER”
    pin: 23
    restore_mode: ALWAYS_ON

uart:
baud_rate: 9600
tx_pin: 27
rx_pin: 26

It’s unbelievable how fast I managed to make this work thanks to your comments

Thank you

1 Like

and signal strength?

Hello,

Would you have found a way to know:

  • Signal strength
  • IF the connection to the mobile networks is OK

I found that, it should be adapted to ESPHOME

Thank you