Reputation: 51
I am looking for information, documentation, sample code or something else about the management of Bluetooth pairing/encryption in C under linux. Where can i find that ?
Regards, Alban
Upvotes: 5
Views: 10200
Reputation: 3440
AFAIK the pairing API is via D-Bus, which can be accessed in C.
See e.g. http://git.kernel.org/?p=bluetooth/bluez.git;a=blob;f=doc/adapter-api.txt;hb=HEAD and http://git.kernel.org/?p=bluetooth/bluez.git;a=blob;f=doc/agent-api.txt;hb=HEAD
Upvotes: 0
Reputation: 11896
You can use hciconfig, which is a tool supplied as part of BlueZ. The actual pairing / encryption is done inside the BT device, not the host stack. You just configure the BT device using hciconfig to tell it whether to do authentication and encryption.
See hciconfig man page, specifically the auth/noauth and encrypt/noencrypt commands
Upvotes: 2
Reputation: 8639
The dominant bluetooth stack at the moment is Bluez; a good tutorial can be found at An Introduction to Bluetooth Programming
Upvotes: 3