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.

Direct advertising packets from slave (keyfob)

Other Parts Discussed in Thread: CC2540

Hello,

On Btool, I would like the slave(the keyfob) to send direct advertising packets. This way, when it gets out of range and comes back, it sends those packets to the dongle which should connect to it automatically, provided that they are already bonded.

Attempting to produce this, I established a connection, bonded the devices then tried to send a GAP_MakeDiscoverable command in order to change the discoverability of the keyfob by changing the event type to GAP_EVENT_CONN_DIRECT_AD. However this gets me a "Not set-up properly to set up that task error".

I would like to know if

- What I am trying to produce is doable using BTool

                 - if yes, then is the AP_EVENT_CONN_DIRECT_AD the right way to do it ?

                                - if yes, then why am I getting the error ?

                                - if no, then what is the right way to perform it ?

                 - if no, then how can I perform that with code ?

Thank you,