«

»

Aug 10

Pairing Bluetooth with no pin on Intel Edison

It may seems strange for an IoT enabled device, but there's no obvious way to pair an Intel Edison through Bluetooth without accessing the shell.

I spent different hours to do something that with Bluez4 took at most 4 minutes, including the research on Google.

Here's what I did.

Edison provides Bluez5 that reworks most of the tools using DBUS, so to make two quite frequent actions, like pairing a device without providing user intervention on the device, and registering a new bluetooth RFCOMM service, you need to interface with it, that isn't so obvious from C or C++.

The second action can be done if bluetoothd is started with legacy support and using the usual sdp service.

Regarding pairing, you must add an agent that responds with a set of fixed responses, like fixed / predictable pin, authorization confirmation and so on.

Bluez5-testtools package provides a simple-agent python script that can be easily modified. It also provides the support script bluezutils.

You can find both on this link to GIST. Hope that helps.

Permanent link to this article: https://www.studiofuga.com/2015/08/10/pairing-bluetooth-with-no-pin-on-intel-edison/

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

%d bloggers like this: