Skip to contentSkip to conversation

accessing Link key within the Bluetooth module

DISCUSSION Suraj Sumangala 3 participants 4 messages Mar 21, 2011 – Mar 22, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I am working on a Bluetooth AMP manager module (linked to l2cap module) that require access to the Link key of the connected(paired) device.

I am trying to use the hci_find_link_key() call with the BDADDR of the remote device as parameter without success. It looks like the list "hci_dev.link_keys" is not getting populated in the first place.

Note: The device is already paired with the local device, so the link key should be available( I do see the link_key_notify_evt getting called).

is there any way to access the link key of a paired device inside the Bluetooth module?

Regards
Suraj

#1 lore raw

Hi Suraj,

Quoted 8 lines · Suraj Sumangala

I am working on a Bluetooth AMP manager module (linked to l2cap module) that require access to the Link key of the connected(paired) device.

I am trying to use the hci_find_link_key() call with the BDADDR of the remote device as parameter without success. It looks like the list "hci_dev.link_keys" is not getting populated in the first place.

That list only gets populated if you've enabled the management interface (enable_mgmt=1 module option) and have a matching user space version with management interface support.

Johan

#2 lore raw

Hi Johan,

Quoted 5 lines · Johan Hedberg

Hi Suraj,

That list only gets populated if you've enabled the management interface (enable_mgmt=1 module option) and have a matching user space version with management interface support.

Thanks,
The link key is required for creating an AMP connection.

Does it make sense to depend the AMP module on the "enable_mgmt" feature?
Or
Add an new link key variable to the "struct hci_conn" and update it by handling the LINK KEY related HCI (Link key request/reply) events?

Quoted 2 lines

Johan

Regards
Suraj

#3 lore raw

Hi Suraj,

Quoted 5 lines · Suraj Sumangala

Hi Johan,

Quoted 2 lines · Johan Hedberg

Hi Suraj,

Quoted 8 lines
Quoted 3 lines

That list only gets populated if you've enabled the management interface (enable_mgmt=1 module option) and have a matching user space version with management interface support.

Thanks,
The link key is required for creating an AMP connection.

Does it make sense to depend the AMP module on the "enable_mgmt" feature?

Yes, but does not use enable_mgmt in your code.

Signature · 2 lines
Gustavo F. Padovan
http://profusion.mobi