chenxuuu / sms_forwarding

超低成本硬件短信转发器,只需29.9
MIT License
524 stars 64 forks source link

收到短信后的日志中有一段乱码 #3

Closed wc7086 closed 1 year ago

wc7086 commented 1 year ago

1

[2022-12-20 22:23:30.203] I/main LuatOS@ESP32C3 base 22.10 bsp V1001
[2022-12-20 22:23:30.209] I/main ROM Build: Oct 31 2022 12:26:25
[2022-12-20 22:23:30.215] D/main loadlibs luavm 98296 14400 14584
[2022-12-20 22:23:30.219] D/main loadlibs sys   143944 47588 51172
[2022-12-20 22:23:30.219] I/user.main   sms_forwarding  1.0.0
[2022-12-20 22:23:30.229] E (529) task_wdt: esp_task_wdt_init(593): TWDT already initialized
[2022-12-20 22:23:30.245] I/user.air780 sync at
[2022-12-20 22:23:31.251] D/wlan esp_wifi_init ret 0
[2022-12-20 22:23:31.289] D/wlan wifi event 2
[2022-12-20 22:23:31.289] D/wlan esp_wifi_start ret 0
[2022-12-20 22:23:31.297] D/wlan esp_wifi_connect ret 0
[2022-12-20 22:23:31.297] I/user.wlan   wait for IP_READY
[2022-12-20 22:23:31.299] D/wlan wifi station start
[2022-12-20 22:23:32.164] D/wlan wifi event 4
[2022-12-20 22:23:32.164] D/wlan wifi connected!!!
[2022-12-20 22:23:33.243] D/wlan ip event 0
[2022-12-20 22:23:33.243] D/wlan IP_EVENT_STA_GOT_IP 192.168.1.10
[2022-12-20 22:23:33.244] qq    32.80078
[2022-12-20 22:23:33.244] I/user.wlan   ready !!
[2022-12-20 22:23:33.244] ww    33.27832
[2022-12-20 22:23:33.247] I/user.notify wait for a new sms~
[2022-12-20 22:23:33.247] zzz   33.33203
[2022-12-20 22:23:40.543] I/user.air780 got recv    AT
[2022-12-20 22:23:40.955] I/user.air780 got recv    AT
[2022-12-20 22:23:40.957] I/user.air780 check sim card
[2022-12-20 22:23:42.937] I/user.air780 got recv    AT+CPIN?
[2022-12-20 22:23:42.937] I/user.air780 configrate
[2022-12-20 22:23:43.683] I/user.air780 got recv    AT+CMGF=0
[2022-12-20 22:23:45.217] I/user.air780 got recv    AT+CSCS="UCS2"
[2022-12-20 22:23:45.940] I/user.air780 got recv    AT+CNMI=2,2,0,0,0
[2022-12-20 22:23:45.941] I/user.air780 wait for connection
[2022-12-20 22:23:47.259] I/user.air780 got recv    AT+CGATT?
[2022-12-20 22:23:47.260] I/user.air780 connection status   true
[2022-12-20 22:23:47.260] I/user.air780 connected! wait sms
[2022-12-20 22:23:52.043] I/user.sms    recv    10684043000000000112    0?N0`kcW(ۈLwOv{_U
xI/user.notify got sms 10684043000000000112    0?N0`kcW(ۈLwOv{_U
xww    32.85645

[2022-12-20 22:23:52.082] I/user.notify send to pushDeer push server    【阿里云】您正在进行短信登录,验证码******,切勿将验证码泄露于他人,本条验证码有效期15分钟。
[2022-12-20 22:23:52.082] I/http HTTP POST
[2022-12-20 22:23:52.127] D/http esp_http_client_perform 0
[2022-12-20 22:23:52.133] I/user.notify pushed sms notify   200 table: 3FCACFB0 {"code":0,"content":{"result":["{\"counts\":1,\"logs\":[],\"success\":\"ok\"}"]}}   10684043000000000112
[2022-12-20 22:23:52.133] I/user.notify wait for a new sms~
[2022-12-20 22:23:52.133] zzz   36.56348
[2022-12-20 22:24:02.705] D/sntp time sync done
chenxuuu commented 1 year ago

需要完整日志

wc7086 commented 1 year ago

需要完整日志

已提供

chenxuuu commented 1 year ago

我看日志里的推送没有问题

chenxuuu commented 1 year ago

data内容是ucs2(utf16),打印出来就是乱码,没有问题

wc7086 commented 1 year ago

给这两行的data也加上ucs2_utf8()吧,串口输出看着舒服点。 https://github.com/chenxuuu/sms_forwarding/blob/fc71eb2a5afc89b6d566404d9e6cf851d64f0532/script/uartTask.lua#L76 https://github.com/chenxuuu/sms_forwarding/blob/fc71eb2a5afc89b6d566404d9e6cf851d64f0532/script/uartTask.lua#L76

chenxuuu commented 1 year ago

日志就没必要好看了,排查问题用的东西