Sim800l : working but strange logs

Hello,
I added a sim800l board to my esp32 WT32-ETH01 (connected by Ethernet).
The sim800l seems to work, I can send and receive SMS, call and answer but I can see strange logs.
I implemented an automation which sends back “OK” when the sim800l receives a message “test”, it works but I have these logs :

[21:56:32][D][sensor:127]: 'Sim800L RSSI': Sending state 12.00000 dBm with 0 decimals of accuracy
[21:56:37][W][sim800l:097]: Not ack. 2 ?????????????????????????????????????????
[21:56:37][W][sim800l:104]: Received unexpected OK. Ignoring
[21:56:38][W][sim800l:412]: Unhandled: ???? - 0
[21:56:38][W][sim800l:412]: Unhandled: +CMTI: "SL",1     - 0
[21:56:52][W][sim800l:097]: Not ack. 2 ??????????????????????????????
[21:56:52][W][sim800l:104]: Received unexpected OK. Ignoring
[21:57:07][D][sensor:127]: 'Sim800L RSSI': Sending state 12.00000 dBm with 0 decimals of accuracy
[21:57:08][D][sim800l:322]: Received SMS from: +33xxxxxxxx
[21:57:08][D][sim800l:323]: Test
[21:57:08][D][main:749]: Received 'Test' from +336xxxxxxxx
[21:57:08][D][text_sensor:067]: 'Sms Sender': Sending state '+336xxxxxxxxx'
[21:57:08][D][text_sensor:067]: 'Sms Message': Sending state 'Test'
[21:57:10][D][text_sensor:067]: 'Sms Message': Sending state 'Test'
[21:57:12][I][sim800l:343]: Sending to +336xxxxxxxx message: 'OK'
[21:57:15][D][sim800l:356]: SMS Sent OK: +CMGS: 57
[21:57:17][W][sim800l:097]: Not ack. 2 ?????????????????????????????????????????????????????????
[21:57:28][D][text_sensor:067]: 'Sms Sender': Sending state '+336xxxxxx'
[21:57:32][W][sim800l:097]: Not ack. 2 OK☻???????????????????????????????
[21:57:32][W][sim800l:104]: Received unexpected OK. Ignoring
[21:57:47][D][sensor:127]: 'Sim800L RSSI': Sending state 11.00000 dBm with 0 decimals of accuracy
[21:57:52][D][sensor:127]: 'Sim800L RSSI': Sending state 11.00000 dBm with 0 decimals of accuracy

You can notice the logs
Not ack. 2 ??????????
or
Received unexpected OK. Ignoring
It’s always the case, even if call the number :

[22:13:12][D][sensor:127]: 'Sim800L RSSI': Sending state 11.00000 dBm with 0 decimals of accuracy
[22:13:17][D][sensor:127]: 'Sim800L RSSI': Sending state 11.00000 dBm with 0 decimals of accuracy
[22:13:22][D][sensor:127]: 'Sim800L RSSI': Sending state 12.00000 dBm with 0 decimals of accuracy
[22:13:27][W][sim800l:097]: Not ack. 2 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[22:13:28][D][text_sensor:067]: 'Sms Sender': Sending state '+336xxxxxxxx'
[22:13:33][W][sim800l:412]: Unhandled: OK☻???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? - 0
[22:13:33][W][sim800l:412]: Unhandled: RINF - 0
[22:13:33][W][sim800l:412]: Unhandled: +CLIP: "+336xxxxxxxx",145,"",0,"",0 - 0
[22:13:33][W][sim800l:412]: Unhandled: ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? - 0
[22:13:33][I][sim800l:397]: Incoming call from +3‼6xxxxxxx‼
[22:13:33][D][text_sensor:067]: 'Caller ID': Sending state '+3‼6xxxxxxx‼'
[22:13:33][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:33][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:33][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:33][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:34][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:34][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:34][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:34][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:35][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:47][W][sim800l:104]: Received unexpected OK. Ignoring
[22:13:47][D][main:579]: Call disconnected
[22:13:52][D][sensor:127]: 'Sim800L RSSI': Sending state 12.00000 dBm with 0 decimals of accuracy

It seems to work but I suppose there is a problem somewhere.
Moreover, I can see the RSSI which is updated every 5s, and sometimes, suddenly, it stops to be updated, if I reboot the esp32 it works again immediately, maybe a problem with the UART ?

I can show a part of the code :

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16
  
esp32:
  board: esp-wrover-kit

api:
  services:
    - service: send_sms
      variables:
        recipient: string
        message: string
      then:
        - sim800l.send_sms:
            recipient: !lambda 'return recipient;'
            message: !lambda 'return message;'
    - service: dial
      variables:
        recipient: string
      then:
        - sim800l.dial:
            recipient: !lambda 'return recipient;'
    - service: connect
      then:
        - sim800l.connect
    - service: disconnect
      then:
        - sim800l.disconnect
    - service: send_ussd
      variables:
        ussdCode: string
      then:
        - sim800l.send_ussd:
            ussd: !lambda 'return ussdCode;'

text_sensor:
  - platform: template
    id: sms_sender
    name: "Sms Sender"
  - platform: template
    id: sms_message
    name: "Sms Message"
  - platform: template
    id: caller_id_text_sensor
    name: "Caller ID"
  - platform: template
    id: ussd_message
    name: "Ussd Code"

uart:
  baud_rate: 9600
  tx_pin: GPIO17
  rx_pin: GPIO5

sim800l:
  on_sms_received:
    - logger.log:
        format: "Received '%s' from %s"
        args: [ 'message.c_str()', 'sender.c_str()' ]
    - if:
        condition:
          - lambda: |-
              return str_lower_case(message) == "test";
        then:
          - sim800l.send_sms:
              recipient: !lambda 'return sender;'
              message: "OK"
    - lambda: |-
        id(sms_sender).publish_state(sender);
        id(sms_message).publish_state(message);
  on_incoming_call:
    - lambda: |-
        id(caller_id_text_sensor).publish_state(caller_id);
  on_call_connected:
    - logger.log:
        format: Call connected
  on_call_disconnected:
    - logger.log:
        format: Call disconnected
  on_ussd_received:
    - lambda: |-
        id(ussd_message).publish_state(ussd);

binary_sensor:
  - platform: sim800l
    registered:
      id: registered
      name: "Sim800L Registered"

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

I bought this sim800l

Hi
The same issue.
Did you solve the problem?

Hello,
Unfortunately no, I still have the problem.
I implemented a workaround in Home Assistant when it detects that the RSSI is no more updated it sends a SMS to itself to “wake it up”…

Which hardware do you have ? ESP, SIM800L, power…

I use ESP32 dev kit v1.0 , Sim800L Module and a 4.1V Power supply 3A
with reseting the both (ESP and Sim) every 24h automatically, it works fine but I am worried that it will hang before 24 hours!
Is it possible to explain your method (Monitor the RSSI signal) more clearly?

Also, I plan to work with an Ethernet module and connect with a network cable instead of Wi-Fi. Are you satisfied with the network module?
Do you have any problems with the connection and is it completely stable?

Hello,

I detect if the RSSI sensor is no more updated by resetting a script which calls the voice mail after 10s then sending a SMS to the sim800l itself to try to wake it up. It case of failure, a sensor sim800l_heartbit won’t be updated and home assistant detects it and I launch an automation (Telegram notification for now) :

sensor:
  - platform: sim800l
    rssi:
      id: rssi
      name: "Sim800L RSSI"
      on_value:
        then:
          - lambda: |-
                auto call = id(sim800l_heartbit).make_call();
                call.set_value(id(sim800l_heartbit).state*(-1));
                call.perform();
          - script.execute: heartbit_gsm
  
  script:
    - id: heartbit_gsm
    mode: restart
    then:
      - delay: 10s
      - sim800l.dial:
          recipient: ${VOICE_MAIL}
      - delay: 10s
      - sim800l.disconnect
      - delay: 30s
      - sim800l.send_sms:
          recipient: ${MY_NUMBER}
          message: "ping"

For the ethernet link, I am satisfied, it is very reliable, I added a 5V battery for UPS and it is perfect.

1 Like

Thanks a lot.
Forgive me for asking such a beginner question
I confused with (sim800l_heartbit) , where did you define it?
I have a request to make of you (if possible), would you please send me whole code because I want to use the ethernet port section as well.

Hello,
You can have a look on my github :

Regards

1 Like

Thanks for sharing your project. but I still have a problem. I use ESP32 dev kit (wroom 32) and Lan8720 module. would you please share your project wiring (schematic)?