Hi,
We are using CC2541 as a peripheral. Currently, we are facing very strange issue, in which our peripheral device got disconnect from the central device immediately after connection. Following are the BLE Device Monitor logs:
15:47:24.571 > Connect request
15:47:24.782 > Gap Link Established: h=0 ci=16 lat=0 to=10
15:47:24.783 > XYZ connected
15:47:24.788 > Service discovery started
15:47:24.903 > ReadByGrpTypeRsp: status=20 n=0
15:47:24.908 > GAP Link Terminated: status=0 h=0 reason=0x08
15:47:24.909 > XYZ disconnected
The above mentioned issue happens with normally working device i.e. initially, the device was working fine and suddenly it reaches to the state where it disconnects immediately after connection. This issue goes away after resetting the device.
Please note, in "GAPROLE_CONNECTED" case of Peripheral State Notification callback function, we are checking for connection interval requested by the central device after making connection using "GAPRole_GetParameter( GAPROLE_CONN_INTERVAL, &connInterval);". If the requested connection interval is higher than 40ms then we are resetting connection interval using GAPRole_SendUpdateParam() to 20ms.
As per the above logs it doesn't seem that update parameter goes to the central device as the connection interval was within expected range i.e. less than 40ms. But still does anyone think that above implementation may cause this issue?
Has anyone face this issue?
Appreciate your quick reply.
Thanks,
Dhaval