Hi,
BLE Stack: BLE-CC254x-1.4.0.
Project code: HIDAdvRemote (or, HIDAdvRemote-Audio)
1) When the remote is unpaired, it will use the ADV_IND advertising.
When the Remote is already paired, and link is terminated after 60s, then on keypress, it should be linking back to the same host. And, it should be using ADV_DIRECT_IND too.
Implementing the ADV_DIRECT_IND for reconnecting after the 60s Idle timeout, I will need the host address GAPRole_GetParameter( GAPROLE_CONN_BD_ADDR, HostAddress ).
However, during the IDLE timeout, the Gap module reset the Address to 0.
[Q1]: If I comment out this statement (please refer to below code), will it cause any issue to the stack ?
case GAP_LINK_TERMINATED_EVENT:
{
gapTerminateLinkEvent_t *pPkt = (gapTerminateLinkEvent_t *)pMsg;
VOID GAPBondMgr_ProcessGAPMsg( (gapEventHdr_t *)pMsg );
//osal_memset( gapRole_ConnectedDevAddr, 0, B_ADDR_LEN );
// Erase connection information
gapRole_ConnInterval = 0;
gapRole_ConnSlaveLatency = 0;
gapRole_ConnTimeout = 0;
2) Assuming that the Remote is paired, and then the battery is replaced.
When the remote is powered up and trying to re-establish the link using ADV_DIRECT_IND.
There could be a problem. The Host BD Address will be 0, as this is stored inside XDATA.
So, to use ADV_DIRECT_IND, the Remote needs to store this info into the NVM area. In this case, the Application can do this storage.
[Q2]: The question is, shouldn't the stack be handling this ?
Thanks in advance.