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 '+33627278083'
[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