使用wiced_websocket_send發送數據時,會出現長時間卡在wiced_websocket_send函數裡面的情況

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
liuyuhuan
Level 1
Level 1
First question asked Welcome!

hello:

當我使用如下組合時:

wifi module    :WM-BN-BM-26

SDK version    :WICED-SDK Version: Wiced_006.004.000.0061      and     WICED-SDK Version: Wiced_006.006.001.0001

RTOS                 :FreeRTOS ver9.0.0

TCP/IP协议栈:LwIP  ver2.0.3

 

情況1: WIFI不使用省電模式:wiced_wifi_disable_powersave(); 即 PM=0 ,可以進行websocket使用wiced_websocket_send 長時間發送數據,長達6天。

 

情況2:WIFI使用省電模式:wiced_wifi_enable_powersave();即 PM=1 ,或者WIFI使用省電模式:wiced_wifi_enable_powersave_with_throughput(500);即 PM=2。   進行websocket使用wiced_websocket_send 發送數據時,一般發送數據1小時以上,就可能出現卡在wiced_websocket_send函數裡面出不來的情況,卡住的時間有可能幾秒、十幾秒、也有幾分鐘、十幾分鐘,甚至有時候長達十個小時。

 

想請問一下,這種情況有可能是哪方面的原因?該如何解決wifi使用省電模式進行長時間使用websocket發送數據呢?

0 点赞
1 解答
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

  请问有没有办法添加打印log,看下websocket 卡住的真实原因。 还有可以解决的地方就是调整listen interval, wiced_result_t wiced_wifi_set_listen_interval( uint8_t listen_interval, wiced_listen_interval_time_unit_t time_unit )

来测试是否有积极的影响。

在原帖中查看解决方案

0 点赞
1 回复
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

  请问有没有办法添加打印log,看下websocket 卡住的真实原因。 还有可以解决的地方就是调整listen interval, wiced_result_t wiced_wifi_set_listen_interval( uint8_t listen_interval, wiced_listen_interval_time_unit_t time_unit )

来测试是否有积极的影响。

0 点赞