Skip to content
Rex St. John

Get in touch

Notes for getting Bleno and Intel Edison working together

Problem: Bleno makes a single call and then stops working after running as a Node.js script on Edison. After that, it is impossible to connect to the service and read characteristics.

Originally published on the rexstjohn.com blog

Tags
  • ios
  • nodejs
  • intel-edison

Originally published at rexstjohn.com on November 18, 2014. Recovered from the Internet Archive.

Problem: Bleno makes a single call and then stops working after running as a Node.js script on Edison. After that, it is impossible to connect to the service and read characteristics. The issue seems to be that “bluetoothd” (running in the background) creates it’s own GATT server which stops you from creating your own…you have to therefore kill off the process. See this bug for more details.

You can either do “killall bluetoothd” on the command line or, for a “more permanent solution,” use:

systemctl disable bluetooth

I had the most success when using an iOS device with the LightBlue iOS app installed to scan.If you want to get really fancy with Edison you might try something like this:

exports.killBluetoothd = function() {
    console.log('Unblocking BLE');
    function puts(error, stdout, stderr) { sys.puts(stdout) }
    exec("killall bluetoothd", puts);
};