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.

How does "connHandle" in GATT API work in detail?

Hi all,

I understand that connection handle is useful for central devices that have more than one slave connected. If there are several peripherals connected to a central device, there is an internal pointer to each connection, called connection handles. The first connection is always enumerated as handle 0x0000, second connection 0x0001 and so on.

In TI's KeyFobDemo, I didn't find any code that assigns the connection handle number. I also couldn't find any document that explains this parameter in full detail and how is it assigned.

My Question is, who determines or assigns the connection handle number (peripheral or central device?) and how does it work in details?

If a peripheral device is operating in indicating or notifying mode (i.e. using blood pressure or heart rate profiles), will the connection handle always be 0x0000 for the peripheral, no matter what?

Could somebody help me out on this?

Thanks.

Jake

  • Connection handle is an arbitrary number that is local to the device; a connection might well have different handles in the central and peripheral devices.  Perhaps it is deterministic on TI stack, but I wouldn't count on it.