Other Parts Discussed in Thread: UNIFLASH
Hello,
I've a board where a host microprocessor runs a web server. The host processor is interfaced via SPI to a CC3120R configured to play AP role.
At the startup, any client device (Windows PC, MAC Book, Android phone, iOS phone) is able to successfully connect to network and exchange data (over HTTPS).
Then, if trying after board has been running for some hours (even without any client connected to in the meanwhile) non-iOS clients are still able to successfully interact; on the contrary, any iOS client results in getting the module stuck.
The behavior is that Status = sl_Recv(i, &rxBuffer, MAX_BUF_SIZE, 0); returns -452 which should mean #define SL_ERROR_BSD_ESECCLOSED (-452L) /* secure layrer is closed by other size , tcp is still connected */
The service pack used has the following components: NWP 3.10.0.5,MAC 2.0.0.0,PHY 2.2.0.6
The code for module initialization is the following:
uint8_t max_ap_stations = (uint8_t)configAp.maximumAPStations; uint8_t val = SL_WLAN_SEC_TYPE_WPA_WPA2; uint8_t channel = configAp.channel; /* Set general AP parameters */ Status = sl_WlanSetMode(ROLE_AP); if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode ROLE_AP\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SSID, strlen(configAp.ssid), (unsigned char*)configAp.ssid); // ssid max 32 char! if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode SL_WLAN_AP_OPT_SSID\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_CHANNEL, 1, (uint8_t*)(&channel)); if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode SL_WLAN_AP_OPT_CHANNEL\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_HIDDEN_SSID, 1, (uint8_t*) &configAp.hidden); if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode SL_WLAN_AP_OPT_HIDDEN_SSID\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SECURITY_TYPE, 1, (uint8_t*)&val); if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode SL_WLAN_AP_OPT_SECURITY_TYPE\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_PASSWORD, strlen(configAp.password), (uint8_t*)configAp.password); if (Status != 0) { syslog(LOG_ERR, "[ERROR] - %d - sl_WlanSetMode SL_WLAN_AP_OPT_PASSWORD\n", Status); } Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_MAX_STATIONS, sizeof(max_ap_stations), (uint8_t*)&max_ap_stations); // default: 4
For TLS handshake, the certificates issued by cc3120 are a chain formed by a custom CA concatenated to the server certificate signed by the custom CA.
May this error be related to some specific way tls is handled in iOS client devices?
Thanks in advance.
BR
Lorenzo.