- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to network BLE devices configured in both central/peripheral roles. A connection problem occurs (infrequently) whereby a peripheral will connect to a central device and then immediately disconnect (before CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT is called). Disconnect reason 62 is given. Timing the connect / disconnect events shows there is ~140ms between them, and since the min/max connection intervals are set to 20/30ms on all devices, this suggests the peripheral/slave is not responding to the central/master connection attempts immediately after first connection. The devices are very close together and there does not seem to be an rssi problem. I've removed most additional code that I thought could be interfering with the timing of BLE event processing. Any suggestion on what the problem might be and/or how to debug it?
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The error "CONNECTION FAILED TO BE ESTABLISHED (0x3E)" indicates that the LL initiated a connection but the connection has failed to be established.
1. Please ensure that the BLE subsystem (BLESS) interrupt has the highest priority.
2. Also, please check on how frequently you are calling Cy_Ble_ProcessEvents() function ? This function must be called at least once for every connection interval or scan interval, whichever is smaller. This function checks the internal task queue in the BLE Stack, and pending operations of the BLE Stack, if any. If you are not calling Cy_Ble_ProcessEvents() function for enough time in the FW, then you can set a timer and call the Cy_Ble_ProcessEvents function inside it.
If you are still facing the issue then please share your project so that we can check at our end.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The error "CONNECTION FAILED TO BE ESTABLISHED (0x3E)" indicates that the LL initiated a connection but the connection has failed to be established.
1. Please ensure that the BLE subsystem (BLESS) interrupt has the highest priority.
2. Also, please check on how frequently you are calling Cy_Ble_ProcessEvents() function ? This function must be called at least once for every connection interval or scan interval, whichever is smaller. This function checks the internal task queue in the BLE Stack, and pending operations of the BLE Stack, if any. If you are not calling Cy_Ble_ProcessEvents() function for enough time in the FW, then you can set a timer and call the Cy_Ble_ProcessEvents function inside it.
If you are still facing the issue then please share your project so that we can check at our end.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Thanks, the BLE subsystem is being run in 'dualcore' mode, with interrupt priorities shown in the attached image. The scan/connection intervals are set to 25/20-30ms, and Cy_Ble_ProcessEvents() function is being called on both M0 and M4 cores every few ms. Could the 'dualcore' operation be causing the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I wasn't aware that 'dualcore' mode is a standard means of implementing the BLE event handler in PSoC6. Also, it appears CONNECTION FAILED TO BE ESTABLISHED only occurs on device reset before connection is correctly established, and is therefore not affecting desired device operation. I'll use a packet sniffer to clarify why this particular connection issue occurs, and not take any more of your time with this issue.