Closed tomcat927 closed 1 year ago
同时是配置两个推送渠道,"inotify"和"pushdeer",作为对照。
三块724核心板: A:只配置inotify渠道(分别试过http和https) B:配置inotify和pushdeer渠道,inotify采用http C:配置inotify和pushdeer渠道,inotify采用https
A核心板:http一直无法推送成功,https测试的时候是失败了,然后换下卖弄的B、C核心板了,但是把url复制到浏览器直接请求,可以正常推送, B核心板:inotify失败,pushdeer渠道成功,但无论失败还是成功,把url复制到浏览器直接请求,都是正常推送,
C核心板有时候能推送成功,有时候失败,且inotify和pushdeer渠道都是,同时成功,同时失败,即两种推送途径结果保持一致。 但无论失败还是成功,把url复制到浏览器直接请求,都是正常推送,
且以上只要推送失败,log一致打印 [2023-06-18 20:45:57.875] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body:
body为空
1、说明不是http和https问题,怀疑是脚本封装的http方法出现了问题,
2、通电开机后,时间不对(开机看log是先发开机通知,在同步时间),然后导致请求失败(但是有时候成功又如何解释呢?)
敏感信息部分隐去了,或者加入了部分乱码打乱信息,我测试postman请求URL是正常的能发送也能正常收到响应,且推动成功, sim卡能正常上网,
[2023-06-18 20:45:13.528] [I]-[handler_sms.smsCallback] XXXXXXX 23/06/18,20:45:01+32 傻比 [2023-06-18 20:45:13.528] [I]-[util_notify.add] 添加到消息队列, 当前队列长度: 2 [2023-06-18 20:45:13.528] [I]-[audio.play] 4 FILE /lua/audio_new_sms.mp3 1 nil nil nil [2023-06-18 20:45:13.528] [I]-[util_notify.poll] 轮询消息队列中, 当前队列长度: 2 [2023-06-18 20:45:13.528] [I]-[util_notify.send] 发送通知 inotify [2023-06-18 20:45:13.574] [I]-[util_notify] GET https://push.luatos.org/key.send/%E5%82%BB%E6%AF%94%0A%0A%E5%8F%9 [2023-06-18 20:45:13.574] 1%E4%BB%B6%E5%8F%B7%E7%A0%81%3A+177%0A%E5%8F%9E6%97%B6%E9%97%B4%3A+23%2F06%2F18%2 [2023-06-18 20:45:13.574] C20%3A45%3A01%2B32%0A%23%0A%E6%9C%AC%E6%9C%BA%E5%8F%B7%E7%A0%81%3A+%2B8613080025897%0AIMEI%3A+8616 [2023-06-18 20:45:13.574] 58069202%0A%E8%BF%90%A5%E5%95%86%3A+4601%0A%E4%BE5%8F%B7%3A+-129dBm%0A%E9%A2%91%E6%AE%B [2023-06-18 20:45:13.574] 5%3A+B1%0%BF%E5%8D%A1%3A+Air7240A%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%3A+LuatOS-Air_V4018_RDA8 [2023-06-18 20:45:13.574] 910_TTS_NOLVGL_FLOAT%0A%E6%B8%A9%E5%BA%A6%3A+37.41%E2%84%83 [2023-06-18 20:45:13.574] [I]-[util_http.fetch] 开始请求 id: http_c5_r4405 [2023-06-18 20:45:13.639] [I]-[http path] /key.send/%E5%B%A%F%91%E4%BB%B6%E5%8F%B7%E7 [2023-06-18 20:45:13.639] %A0%81%3A545A%E5%8F%91%%B6%E6%97%B6%E9%97%B4%3A+23%2F06%2F18%2C20%3A45%3A01%2B32%0A%23 [2023-06-18 20:45:13.639] SMS%0A%0A%E6%9C%AC%E6%9C%B%E7%A0%81%3A+%2B8613080025897%01658065029202%0A%E8%BF%90% [2023-06-18 20:45:13.639] E8%90%A5%E5%96%3A+%E4%BF%A1%E5%8F%B7%3A+-129dBm%0A%E9%A2%91%E6%AE%B5%3A+B1%0A%E6%9D%BF%E5 [2023-06-18 20:45:13.639] 1%A1%3A+Air724UG%0A%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%3A+LuatOS-Air_V4018_RDA8910_TTS_NOLVGL_FLOAT%0A%E6 [2023-06-18 20:45:13.639] B8%A9%E5%BA%A6%3A+37.41%E2%84%83 [2023-06-18 20:45:13.639] [I]-[socket:connect-coreid,prot,addr,port,cert,timeout] 0 TCPSSL push.luatos.org 443 nil 30 [2023-06-18 20:45:13.639] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:13.772] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:13.772] [I]-[ril.proatc] OK [2023-06-18 20:45:13.772] [I]-[lib_sms rsp] +CMGD AT+CMGD=1 true OK nil [2023-06-18 20:45:13.772] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:13.803] [I]-[ril.proatc] +RFTEMPERATURE: 41.49 [2023-06-18 20:45:13.803] [I]-[ril.proatc] OK [2023-06-18 20:45:15.338] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:15.408] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:15.408] [I]-[audio.handleCb] nil 0 [2023-06-18 20:45:15.408] [I]-[audioTask] wait LIB_AUDIO_PLAY_ENTRY [2023-06-18 20:45:24.761] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:24.761] [I]-[ril.proatc] +RFTEMPERATURE: 45.77 [2023-06-18 20:45:24.802] [I]-[ril.proatc] OK [2023-06-18 20:45:43.655] [I]-[socket:connect: connect fail] TIMEOUT [2023-06-18 20:45:43.655] [E]-[http.response] false connect fail [2023-06-18 20:45:43.655] [I]-[socket:sock_close] 0 [2023-06-18 20:45:43.655] [I]-[util_http.fetch] 请求结束 id: http_c5_r4405 [2023-06-18 20:45:43.655] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body: [2023-06-18 20:45:43.655] [I]-[audio.play] 3 FILE /lua/audio_http_success.mp3 1 nil nil nil [2023-06-18 20:45:43.655] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:43.762] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:43.762] [I]-[socket:on_response:] 0 SOCKET_CLOSE 0 [2023-06-18 20:45:43.762] [I]-[util_notify.poll] 轮询消息队列中, 当前队列长度: 1 [2023-06-18 20:45:43.762] [I]-[util_notify.send] 发送通知 pushdeer [2023-06-18 20:45:43.762] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:43.807] [I]-[util_notify] POST https://api2.pushdeer.com/message/push [2023-06-18 20:45:43.846] [I]-[util_http.fetch] 开始请求 id: http_c6_r3319 [2023-06-18 20:45:43.846] [I]-[http path] /message/push [2023-06-18 20:45:43.846] [I]-[socket:connect-coreid,prot,addr,port,cert,timeout] 0 TCPSSL api2.pushdeer.com 443 nil 30 [2023-06-18 20:45:43.846] [I]-[ril.proatc] +RFTEMPERATURE: 42.06 [2023-06-18 20:45:43.846] [I]-[ril.proatc] OK [2023-06-18 20:45:45.610] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:45.681] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:45.681] [I]-[audio.handleCb] nil 0 [2023-06-18 20:45:45.681] [I]-[audioTask] wait LIB_AUDIO_PLAY_ENTRY [2023-06-18 20:45:54.733] [I]-[ril.sendat] AT+CSQ [2023-06-18 20:45:54.770] [I]-[ril.proatc] +CSQ: 10,99 [2023-06-18 20:45:54.770] [I]-[ril.proatc] OK [2023-06-18 20:45:54.770] [I]-[ril.sendat] AT+CESQ [2023-06-18 20:45:54.811] [I]-[ril.proatc] +CESQ: 99,99,255,255,8,13 [2023-06-18 20:45:54.811] [I]-[ril.proatc] OK [2023-06-18 20:45:54.811] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:54.811] [I]-[ril.proatc] +RFTEMPERATURE: 42.17 [2023-06-18 20:45:54.811] [I]-[ril.proatc] OK [2023-06-18 20:45:57.838] [I]-[socket:on_response:] 0 SOCKET_CONNECT 1 [2023-06-18 20:45:57.875] [I]-[socket:connect: connect fail] RESPONSE [2023-06-18 20:45:57.875] [E]-[http.response] false connect fail [2023-06-18 20:45:57.875] [I]-[socket:sock_close] nil [2023-06-18 20:45:57.875] [I]-[util_http.fetch] 请求结束 id: http_c6_r3319 [2023-06-18 20:45:57.875] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body: [2023-06-18 20:45:57.875] [I]-[audio.play] 3 FILE /lua/audio_http_success.mp3 1 nil nil nil [2023-06-18 20:45:57.875] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:57.991] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:59.808] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:59.862] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:59.862] [I]-[audio.handleCb] nil 0
看到信号是-129dBm,会不会是信号太差了,官方核心板是要外接天线的
的确是官方核心板,我先买个天线试试把,谢谢
想了一下,信号差。为啥收短信没问题。
看这三个板子有时发送成功有时失败的现象,像是信号不好,你试试找个信号好的地方请求会不会变正常
合宙官方推送inotify,年久失修,bug较多,自行解决吧。
同时是配置两个推送渠道,"inotify"和"pushdeer",作为对照。
三块724核心板: A:只配置inotify渠道(分别试过http和https) B:配置inotify和pushdeer渠道,inotify采用http C:配置inotify和pushdeer渠道,inotify采用https
最后结果发现,
A核心板:http一直无法推送成功,https测试的时候是失败了,然后换下卖弄的B、C核心板了,但是把url复制到浏览器直接请求,可以正常推送, B核心板:inotify失败,pushdeer渠道成功,但无论失败还是成功,把url复制到浏览器直接请求,都是正常推送,
C核心板有时候能推送成功,有时候失败,且inotify和pushdeer渠道都是,同时成功,同时失败,即两种推送途径结果保持一致。 但无论失败还是成功,把url复制到浏览器直接请求,都是正常推送,
且以上只要推送失败,log一致打印 [2023-06-18 20:45:57.875] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body:
body为空
推测、怀疑:
1、说明不是http和https问题,怀疑是脚本封装的http方法出现了问题,
2、通电开机后,时间不对(开机看log是先发开机通知,在同步时间),然后导致请求失败(但是有时候成功又如何解释呢?)
敏感信息部分隐去了,或者加入了部分乱码打乱信息,我测试postman请求URL是正常的能发送也能正常收到响应,且推动成功, sim卡能正常上网,
以下C开发板推送失败的log
[2023-06-18 20:45:13.528] [I]-[handler_sms.smsCallback] XXXXXXX 23/06/18,20:45:01+32 傻比 [2023-06-18 20:45:13.528] [I]-[util_notify.add] 添加到消息队列, 当前队列长度: 2 [2023-06-18 20:45:13.528] [I]-[audio.play] 4 FILE /lua/audio_new_sms.mp3 1 nil nil nil [2023-06-18 20:45:13.528] [I]-[util_notify.poll] 轮询消息队列中, 当前队列长度: 2 [2023-06-18 20:45:13.528] [I]-[util_notify.send] 发送通知 inotify [2023-06-18 20:45:13.574] [I]-[util_notify] GET https://push.luatos.org/key.send/%E5%82%BB%E6%AF%94%0A%0A%E5%8F%9 [2023-06-18 20:45:13.574] 1%E4%BB%B6%E5%8F%B7%E7%A0%81%3A+177%0A%E5%8F%9E6%97%B6%E9%97%B4%3A+23%2F06%2F18%2 [2023-06-18 20:45:13.574] C20%3A45%3A01%2B32%0A%23%0A%E6%9C%AC%E6%9C%BA%E5%8F%B7%E7%A0%81%3A+%2B8613080025897%0AIMEI%3A+8616 [2023-06-18 20:45:13.574] 58069202%0A%E8%BF%90%A5%E5%95%86%3A+4601%0A%E4%BE5%8F%B7%3A+-129dBm%0A%E9%A2%91%E6%AE%B [2023-06-18 20:45:13.574] 5%3A+B1%0%BF%E5%8D%A1%3A+Air7240A%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%3A+LuatOS-Air_V4018_RDA8 [2023-06-18 20:45:13.574] 910_TTS_NOLVGL_FLOAT%0A%E6%B8%A9%E5%BA%A6%3A+37.41%E2%84%83 [2023-06-18 20:45:13.574] [I]-[util_http.fetch] 开始请求 id: http_c5_r4405 [2023-06-18 20:45:13.639] [I]-[http path] /key.send/%E5%B%A%F%91%E4%BB%B6%E5%8F%B7%E7 [2023-06-18 20:45:13.639] %A0%81%3A545A%E5%8F%91%%B6%E6%97%B6%E9%97%B4%3A+23%2F06%2F18%2C20%3A45%3A01%2B32%0A%23 [2023-06-18 20:45:13.639] SMS%0A%0A%E6%9C%AC%E6%9C%B%E7%A0%81%3A+%2B8613080025897%01658065029202%0A%E8%BF%90% [2023-06-18 20:45:13.639] E8%90%A5%E5%96%3A+%E4%BF%A1%E5%8F%B7%3A+-129dBm%0A%E9%A2%91%E6%AE%B5%3A+B1%0A%E6%9D%BF%E5 [2023-06-18 20:45:13.639] 1%A1%3A+Air724UG%0A%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC%3A+LuatOS-Air_V4018_RDA8910_TTS_NOLVGL_FLOAT%0A%E6 [2023-06-18 20:45:13.639] B8%A9%E5%BA%A6%3A+37.41%E2%84%83 [2023-06-18 20:45:13.639] [I]-[socket:connect-coreid,prot,addr,port,cert,timeout] 0 TCPSSL push.luatos.org 443 nil 30 [2023-06-18 20:45:13.639] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:13.772] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:13.772] [I]-[ril.proatc] OK [2023-06-18 20:45:13.772] [I]-[lib_sms rsp] +CMGD AT+CMGD=1 true OK nil [2023-06-18 20:45:13.772] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:13.803] [I]-[ril.proatc] +RFTEMPERATURE: 41.49 [2023-06-18 20:45:13.803] [I]-[ril.proatc] OK [2023-06-18 20:45:15.338] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:15.408] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:15.408] [I]-[audio.handleCb] nil 0 [2023-06-18 20:45:15.408] [I]-[audioTask] wait LIB_AUDIO_PLAY_ENTRY [2023-06-18 20:45:24.761] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:24.761] [I]-[ril.proatc] +RFTEMPERATURE: 45.77 [2023-06-18 20:45:24.802] [I]-[ril.proatc] OK [2023-06-18 20:45:43.655] [I]-[socket:connect: connect fail] TIMEOUT [2023-06-18 20:45:43.655] [E]-[http.response] false connect fail [2023-06-18 20:45:43.655] [I]-[socket:sock_close] 0 [2023-06-18 20:45:43.655] [I]-[util_http.fetch] 请求结束 id: http_c5_r4405 [2023-06-18 20:45:43.655] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body: [2023-06-18 20:45:43.655] [I]-[audio.play] 3 FILE /lua/audio_http_success.mp3 1 nil nil nil [2023-06-18 20:45:43.655] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:43.762] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:43.762] [I]-[socket:on_response:] 0 SOCKET_CLOSE 0 [2023-06-18 20:45:43.762] [I]-[util_notify.poll] 轮询消息队列中, 当前队列长度: 1 [2023-06-18 20:45:43.762] [I]-[util_notify.send] 发送通知 pushdeer [2023-06-18 20:45:43.762] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:43.807] [I]-[util_notify] POST https://api2.pushdeer.com/message/push [2023-06-18 20:45:43.846] [I]-[util_http.fetch] 开始请求 id: http_c6_r3319 [2023-06-18 20:45:43.846] [I]-[http path] /message/push [2023-06-18 20:45:43.846] [I]-[socket:connect-coreid,prot,addr,port,cert,timeout] 0 TCPSSL api2.pushdeer.com 443 nil 30 [2023-06-18 20:45:43.846] [I]-[ril.proatc] +RFTEMPERATURE: 42.06 [2023-06-18 20:45:43.846] [I]-[ril.proatc] OK [2023-06-18 20:45:45.610] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:45.681] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:45.681] [I]-[audio.handleCb] nil 0 [2023-06-18 20:45:45.681] [I]-[audioTask] wait LIB_AUDIO_PLAY_ENTRY [2023-06-18 20:45:54.733] [I]-[ril.sendat] AT+CSQ [2023-06-18 20:45:54.770] [I]-[ril.proatc] +CSQ: 10,99 [2023-06-18 20:45:54.770] [I]-[ril.proatc] OK [2023-06-18 20:45:54.770] [I]-[ril.sendat] AT+CESQ [2023-06-18 20:45:54.811] [I]-[ril.proatc] +CESQ: 99,99,255,255,8,13 [2023-06-18 20:45:54.811] [I]-[ril.proatc] OK [2023-06-18 20:45:54.811] [I]-[ril.sendat] AT+RFTEMPERATURE? [2023-06-18 20:45:54.811] [I]-[ril.proatc] +RFTEMPERATURE: 42.17 [2023-06-18 20:45:54.811] [I]-[ril.proatc] OK [2023-06-18 20:45:57.838] [I]-[socket:on_response:] 0 SOCKET_CONNECT 1 [2023-06-18 20:45:57.875] [I]-[socket:connect: connect fail] RESPONSE [2023-06-18 20:45:57.875] [E]-[http.response] false connect fail [2023-06-18 20:45:57.875] [I]-[socket:sock_close] nil [2023-06-18 20:45:57.875] [I]-[util_http.fetch] 请求结束 id: http_c6_r3319 [2023-06-18 20:45:57.875] [I]-[util_notify.send] 发送通知失败, 无需重发 code: -99 body: [2023-06-18 20:45:57.875] [I]-[audio.play] 3 FILE /lua/audio_http_success.mp3 1 nil nil nil [2023-06-18 20:45:57.875] [I]-[audioTask] FILE #audioQueue 1 [2023-06-18 20:45:57.991] [I]-[audioTask] FILE wait LIB_AUDIO_PLAY_IND [2023-06-18 20:45:59.808] [I]-[audioTask] FILE recv LIB_AUDIO_PLAY_IND RESULT true [2023-06-18 20:45:59.862] [I]-[audio.handlePlayInd] RESULT true [2023-06-18 20:45:59.862] [I]-[audio.handleCb] nil 0