I have some question related to the BLE stack code. Specifically regarding GAP operation.
My device is the peripheral.
On first connection to my device from peer :
- How long can a 'connection procedure' take. From when the stack is receiving a connection request from peer until creating a connection event for the M4 (GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC), is there a timeout, can it be calculated ?
- In case I initiate an ACI_GAP_SET_NON_CONNECTABLE command in the middle of a 'connection procedure', does connection fail? does the command return a specific error? do I get GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC with a specific error code? which one?
- In case of switching to ACI_GAP_SET_NON_DISCOVERABLE , am I still connectable ?
- In case the periph is ACI_GAP_SET_LIMITED_DISCOVERABLE, and it gets connected , do I get an ACI_GAP_LIMITED_DISCOVERABLE_EVENT or only the connection event and in what order?
- In case i am ACI_GAP_SET_LIMITED_DISCOVERABLE, and I don't get connected, am I still 'connectable' after the ACI_GAP_LIMITED_DISCOVERABLE_EVENT? or do I need to use ACI_GAP_SET_NON_CONNECTABLE?
- In case the periph got connected (stack stops advertising auto.) but I still run the command ACI_GAP_SET_NON_CONNECTABLLE, will I always get an error code? which one?
- Is there a way to poll BLE stack to know if it is advertising or not?