Hello,
for an application based on the SimpleBLEPeriperal using BLE 2.1 on an cc2650 I need to get the current connection parameters and I need to get informed when the LL connection parameters change (according to the core spec, "LE Connection Update Complete Event" is exactly what I'm looking for).
From what I've read (this forum, SWRU393 and the "Bluetooth Smart Wiki."), it looks like, the TI BLE Stack distributes this informations as GAP Events.
According to "SWRU393; I. GAP API" GAP_RegisterForMsgs() is to be called to receive extra (unprocessed) HCI status and complete events. In the same chapter is the event, I'm looking for documented: GAP_LINK_PARAM_UPDATE_EVENT
The same chapter states that: "Some of these events will be passed directly to the application and some will be handled by the GAPRole or GAPBondMgr layers."
I tried to enable the link layer event by calling GAP_RegisterForMsgs() in a service task, but I do not receive any GAP_LINK_PARAM_UPDATE_EVENT event in that task.
Poking around a little bit, I found that the peripheral task is receiving this events, but is not calling GAP_RegisterForMsgs(). So it looks like, the peripheral task is implementing the GAPRole and the GAP_LINK_PARAM_UPDATE_EVENT is not "passed directly to the application".
Now this is all very confusing to me and I have some questions:
- Is it possible to receive the original link layer HCI events ("LE Connection Update Complete Event")? This would make my live easy.
- Is it possible to additional receive the GAP events that are received by the peripheral task in an other task? If that would be easy, I would be happy too.
- How can I tell, which events are passed directly to the application and which are not?
- How does the BLE stack knows, that the peripheral task is implementing the GAPRole? (and thus sends the events)
Thank you very much for any tipp or pointer!
Kind regards,
Torsten