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.

CC2540 drop connection notification

Other Parts Discussed in Thread: CC2540

Hi everybody!

I have cc2540 minidev kit with ble 1.2.1.

In USB dongle I downoaded simpleBLECentral project (att client) and in keyfob I downloaded simpleBLEperipheral (att server) project with little changes (bond disable, password is zero).

USB dongle searches keyfob and connected to it successfully (GAP_LINK_ESTABLISHED_EVENT event generated).

When I remove battery from keyfob I guess simpleBLECentral should be generated GAP_LINK_TERMINATED_EVENT event, but this does not happen.

Is my reasoning correct?

Or how to detect when keyfob drop connecton (for example remove battery or out of area)?

 

 

 

 

  • Hello Evgheni,

    A GAP_LINK_TERMINATED_EVENT is only generated upon a successful termination of the link.  In order for that to happen, basically a request has to be made to terminate and then once the request is answered, then the link is terminated.  When you remove the battery, this does not happen.  You just get a link loss. 

    Some additional information can be found in the TI BLE Software Developer's Guide.

    Thanks,

  • Thanks for reply!

    I read  TI BLE Software Developer's Guide many times but there is no information about how to detect unexpected link loss.

    I suppose that need to do follow variants:

    1. periodically (every 1 sec) read some characteristic from att server and when read fail I consider that link is loss.

    2. use proximity profile to recognise link loss.

    Which variant more proper? Or are there other options?