This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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 request15:47:24.782 > Gap Link Established: h=0 ci=16 lat=0 to=1015:47:24.783 > XYZ connected15:47:24.788 > Service discovery started15:47:24.903 > ReadByGrpTypeRsp: status=20 n=015:47:24.908 > GAP Link Terminated: status=0 h=0 reason=0x0815: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.
Please click the "This Resolved My Issue" button on this post if it answers your question
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
Please be sure to mark the thread as answered if your question was answered :)
In reply to Tim C:
Thanks for your quick response!
Following connection parameters I am using:
Min. connection interval = 20ms
Max. connection interval = 20ms
Supervision Timeout = 10 seconds
Slave Latency = 0
Update parameter request enabled = TRUE
Connection pause peripheral = 6 seconds
And as I mentioned in my previous post, also on connection we are checking for a current connection interval. That we are getting using "GAPRole_GetParameter( GAPROLE_CONN_INTERVAL, &connInterval );", and if this value is higher than 40ms then we are resetting the connection interval to 20ms using "GAPRole_SendUpdateParam" function.
Also I have captured packet sniffer logs, while this issue happens. Please find it attached herewith.
Looking forward to your quick reply!
Immediate Disconnection_Packet Sniffer.psd
In reply to Dhaval V:
Yes, we are facing this issue on Custom Hardware. And we are using TI BLE Stack v1.4.0.
Let me know if you need any other information. BTW did you get anything from the BLE Sniffer Logs? You can see that Master was retrying continuously for Empty PDU. And finally got disconnected after Supervision Timeout. What is the reason? Why slave was not responding to the Master?
The sniffer logs indicate that there is a timing issue, likely caused by something that is incorrect on your custom hardware. You can attempt to verify this by:
- attempting to run the software on a TI reference platform
- run without POWER_SAVINGS defined
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.