assert failed: tcpip_send_msg_wait_sem IDF/components/lwip/lwip/src/api/tcpip.c:455 (Invalid mbox)
assert failed: tcpip_send_msg_wait_sem IDF/components/lwip/lwip/src/api/tcpip.c:455 (Invalid mbox)
UIS8910DM平台移值LwIP的方式和推荐的不太一样。
(1)没有创建 tcpip_thread 线程,把需要在 tcpip_thread 执行的代码,移植到 net_thread 线程上。该工作通过修改 tcpip_thread() 函数和异步调用函数(如tcpip_inpkt、tcpip_callback_with_block、tcpip_send_msg_wait_sem、tcpip_api_call)的实现来完成。
(2)设置 LWIP_TCPIP_CORE_LOCKING = 1
(3)对网络设备的数据处理,通过线程 callback的方式,运行在 net_thread 线程上。
综上所述,UIS8910DM平台上,socket层的主动调用基本都运行在调用者的线程上,而接收数据的协议栈内的处理运行在 net_thread 线程上,然后通过消息队列将异步事件通知给使用者。
原文链接:https://blog.csdn.net/Jonee_Pan/article/details/108110681
标签:src,lwip,thread,api,线程,sem,tcpip
From: https://www.cnblogs.com/hshy/p/16636348.html