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.

CC2650EM-5XD-RD: SPP- Connection Establishment Time reduction

Part Number: CC2650EM-5XD-RD


Hi,

we are working on SPP BLE server and client.

we are calling SPPBLEClient_autoConnect to connect directly to server without scanning. 

Our aim is to connect to the server immediately. Here if it unable to connect to server(ie.if there is no server) we like to stop the establishing link in 20 ms.

In code, if there is no server it keeps on trying to establish a link. 

Please can you tell us the possibility to achieve this.

thanks,

Santhananarayanan

  • Hi Santhananarayanan,

    Why not start a timer for 20 ms as soon as you send the link establish command?

    After 20 ms, the timer should check if the gapState changed (eg, to Connected). If it's not, then stop trying to connect?

    Regards,
    Rebel
  • Hi,

    Yes, you could start a timer when you call GAP_EstablishLinkReq(), then call GAP_TerminateLinkReq() with the connection handle set to 0xFFFE (GAP_CONNHANDLE_INIT) which should stop connecting.

    Best wishes
  • Hi,
    Our main purpose is conserve the power.
    By calling this GAP_EstablishLinkReq(), It goes to GAP_LINK_ESTABLISHED_EVENT if it connected. 
    It takes time between  (20- 35)ms to establish a link.
    our requirement is to check, is there server before this 20 ms.
    if there is no server we like to call GAPCentralRole_TerminateLink(GAP_CONNHANDLE_INIT) and go to sleep.
    Is there any intermediate layer in between this two to see server is there?
    or is there any API can we use between this with HCI or anything?
    thanks,
    Santhananarayanan