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.

Fast small Data exchange between Dongle and Keyfob

Other Parts Discussed in Thread: BLE-STACK

Hi

I got an application with one BLE-dongle and one-keyfob running. My goal is to authentificate the keyfob (in future there will be a lot of keyfobs). I use the following algorithm:

1) The dongle initiate a connection

1a) the dongle sends a GAP_EstablishLink to my application (ca. 2 seconds)

2)The dongle sends a random number to the keyfob (by setting a UUID1)

2a) the keyfob confirms

3)The keyfob takes the number from the UUID1, calculates the response and writes it in an other UUID2

4)The dongle reads the UUID2

5)The dongle terminates the connection

This all works, but it is quite slow. Is there an other (faster) possibility to exchange such some data?

 

  • Hello,

    The authenticate will take several connection intervals(5 I think).  When data comes in on a connection interval, the response will not go out until the next connection interval.  If you skip authentication, that would speed things up.  A short connection interval will help. With something like a 10ms connection interval, you should be able to do this in 50-100ms.   GAP_Establish link is dependent on the advertising interval and scan window settings. With 100% scan window and 20ms advertising, it should take only 20ms to establish a connection.  Another factor will be serial communications delays with BTool or other tool to drive the USBDongle.

    BR,

    -Greg

  • Hi

     

    I'm watching the connection Intervals also with the sniffer tool:

    Here the Interwals you were writing about:

    ADV_Connection_Request

    Att_Write_Req at time

    Att_Write_Rsp at time

    Att_Read_By_Type_Req

    Att_Read_By_Type_RSP

    Terminate Link

    Between the Requests and the responses there is always just 1 interval (ca. 7ms). But it needs quite a long time until the link is closed... I'm correct if I send just "01 0A FE 02 00 00" to the dongle. (The BTool makes the same)

    But my question was: Is there a faster possibility without using this 2 UUIDs? Like: I set the UUID 1 and the keyfob answers my automatically with the response...

  • Hello,

    You may want to look at indications which require an indication  confirmation to be sent before the next indication can go out.

    BR,

    -Greg 

  • Thanks

    I'll try to make my response by your called indication-function. This should be possible.

     

     

  • The indication was a geat idea, thanks. Now it works fast enough.

    But I would like to be ok with the BLE-stack. Is it allowed, to send the indication and quit the connection without getting a confirmation?

     

     

    Is it correct, that the Dongle doesn't send an Indication-Confirmation automaticly?

  • Correct - the dongle does not send indication confirmation automatically.   You can disconnect anytime, so that should be ok. You may want to experiment to see if the state "waiting for confirmation" is cleared on disconnect at the slave, just to be sure it does not interfere with sending other items after reconnect.

    BR,

    -Greg