软件平台:
IDE:CCS9.2
SDK:CC3200SDK_1.4.0
servpack:servicepack_1.0.1.13-2.11.0.1.bin
问题描述(按时间顺序)
第1天:根据sdk中例程测试过cc3200作为AP或者STA均没有问题,主要测试例程如下
D:\ti\CC3200SDK_1.4.0\cc3200-sdk\example\out_of_box
D:\ti\CC3200SDK_1.4.0\cc3200-sdk\example\getting_started_with_wlan_ap
D:\ti\CC3200SDK_1.4.0\cc3200-sdk\example\getting_started_with_wlan_station
D:\ti\CC3200SDK_1.4.0\cc3200-sdk\example\tcp_socket(iperf可以测试带宽约10Mbps)
第2-5天:测试了外设接口编写到外设驱动
SPI
I2C
UART
调试阶段都是下载到SRAM运行。
第6天:基于例程 D:\ti\CC3200SDK_1.4.0\cc3200-sdk\example\tcp_socket 开始调试网络通信。(实现功能: CC3200作为sta连接到AP,CC3200上面作为TCP Serever监听端口3000)
(a)
发现连接上wifi后,过一段时间会自动断开,经过查询是这里输出的:(因为这个现象现在已经无法出现,所以没有原始的调试信息)
UART_PRINT("[WLAN ERROR]Device disconnected from the AP AP: %s,"BSSID: %x:%x:%x:%x:%x:%x on an ERROR..!! \n\r",
对代码排查后发现,只要在BsdTcpServer 函数中执行到
iNewSockID = sl_Accept(iSockID, ( struct SlSockAddr_t *)&sAddr, (SlSocklen_t*)&iAddrSize);
就会出现断开的情况,并且iNewSockID 始终等于 SL_EAGAIN。
(b)
(a)现象还没有找到原因,后来就直接在lRetVal = WlanConnect();报错且一直持续到现在,
持续报错信息:[GENERAL EVENT] – ID=[-102] Sender=[5]
期间尝试过的操作有:1、更新serverpack;2、更换路由器或者SSID; 3、擦除单片机flash重新烧写;4、更换为外置天线
目前仍然没有解决
调试信息输出如下(有时也会每秒输出一行[GENERAL EVENT] – ID=[-102] Sender=[5])
*************************************************
CC3200 TCP Socket Application
*************************************************
[2019-11-12 11:02:48.738]# RECV ASCII>
Host Driver Version: 1.0.1.13
Build Version 2.11.0.1.31.1.5.0.2.1.0.3.37
[2019-11-12 11:02:49.059]# RECV ASCII>
Device is configured in default state
[2019-11-12 11:02:49.808]# RECV ASCII>
Device started as STATION
Connecting to AP: wifi_test …
[2019-11-12 11:03:00.143]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:10.283]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:20.394]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:21.674]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:31.782]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:41.908]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:43.667]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:03:54.942]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:04:47.138]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:04:57.296]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
[2019-11-12 11:04:59.039]# RECV ASCII>
[GENERAL EVENT] – ID=[-102] Sender=[5]
……
Viki Shi:
请参考论坛的类似问题:
e2e.ti.com/…/629398
e2e.ti.com/…/659972
e2e.ti.com/…/715135