cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

JiWa_1379161
New Contributor II

I am using a CYBLE-222014-01 as a central device and a second CYBLE-222014-1 as a peripheral device in a two product system I designed. Upon power up of both devices, the central device will automatically pair with peripheral. When idle, both devices go into sleep mode to reserve battery. Internally, the BLE stack wakes the devices up and checks connection. Not sure how this is really happening but it does. The central device also can be woken up by pressing one of three switches. When anyone of these switches is pressed, it writes to the associated characteristic and the peripheral will respond as programmed.

Here is the problem which is becoming a customer nightmare. The both devices rely heavily on detecting that the BLE connection status. If the connection should break, the central needs to start scanning again and the peripheral needs to advertise. In 99% of the time, this works perfectly. The other 1% of the time, the peripheral detects a broken connection and goes into advertising mode however, the central device doesnt detect the disconnect and operates as if it is still connected. In once instance, with the peripheral powered off, the central device detected the disconnect and immediately reconnected but there was no peripheral to connect to.

I have place a function processEvents frequently throughout the central firmware to call the General Handler for the BLE to process change of states. I also just recently added a function to manually read the state CYBLE_GetState() to check for disconnect. Neither appear to help the situation

I have used another BLE module in the past and they had a similar bug in their BLE stack which would not always detect a disconnection.

At this point I am at a loss as to what could be wrong since it works 99% of the time. The 1% that does work is problematic in the use of this device system.

Unfortunately I cant post any code as it is proprietary. I would like to know if this has been seen elsewhere and what is the fix.

I also would like to know what the function call would be to force a disconnect either by central or peripheral.

Finally, I need better clarity as to how the connection interval setting works from both perspective central and peripheral. I find the data sheet very vague and not clear as to how to set a value for this interval.

Anyone responding to this post, please do not ask for code, I cant send it. Also, dont just send me a link to the datasheets, been over them more than I care to admit. I am looking for real answers. If you are referencing a datasheet, then give specifics as to what part of that datasheet will help me and why. If you have sample code, please explain why it pertains to this issue.

Thanks

Jim

0 Likes
7 Replies