I have an application on the 2640 that communicates with a smart phone app. I have discovered that if the phone goes out of range (or the BLE communication is otherwise prevented - phone or my device goes into an RF chamber that prevents communication) the 2640 BLE operation gets a state change event with a new state of GAPROLE_WAITING_AFTER_TIMEOUT. The state never changes. When I bring the phone back into range, the app indicates the connection has been dropped. The 2640 does not resume advertising. The code in simple_peripheral.c that handles this state is as follows:
case GAPROLE_WAITING_AFTER_TIMEOUT:
attRsp_freeAttRsp(bleNotConnected);
Display_print0(dispHandle, 2, 0, "Timed Out");
// Clear remaining lines
Display_clearLines(dispHandle, 3, 5);
#ifdef PLUS_BROADCASTER
// Reset flag for next connection.
firstConnFlag = false;
#endif // PLUS_BROADCASTER
break;
I am using SDK version 4.10.0.10. I guess there needs to be some processing on my part to exit this state to resume advertising?