Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PMuld2
New Contributor II
1,384 Views

Debug BLE connections with Edison

Hi,

I have two Edison to explore BLE.

One device should take the role of central, the other one has peripheral.

On the peripheral, I use the Bleno.js lib with the echo_example.js code from https://github.com/sandeepmistry/bleno/tree/master/examples/echo https://github.com/sandeepmistry/bleno/tree/master/examples/echo

Starting it looks good:

bleno - echo

on -> stateChange: poweredOn

on -> advertisingStart: success

On the central,, I use the Noble.js lib to scan for services.

It gets discovered from my laptop:

$ node simple_scan.js

poweredOn

{ localName: 'eddie2',

txPowerLevel: undefined,

manufacturerData: undefined,

serviceData: [],

serviceUuids: [ '1fffffff4ffff4fffffffff2ffff4ff3' ] }

But then discovering the services (see scanning code https://github.com/embeddednodejs/ch_10_physical_internet/tree/master/simple_scan ch_10_physical_internet/simple_scan at master · embeddednodejs/ch_10_physical_internet · GitHub, it results on my laptop in:

$ node scan_services.js

poweredOn

found device: eddie2

services: 1fffffff4ffff4fffffffff2ffff4ff3

found device: undefined

services:

xpcError: connection interrupted

Trying the same Noble scripts on the other Edison gives:

root@edison:~/simple_scan# node simple_scan.js

And then nothing happens.

How can I detect the eddie2 peripheral?

Thanks a lot for your help!!

5 Replies
idata
Community Manager
61 Views

Hello poseid,

 

 

I'm not sure I understand what you are trying to achieve, could you explain us in what your project consists? I mean, from your post, if I'm not mistaken, I understand that you have two Edison modules. One should work as "master" and the other one as "slave", right? The "slave" should discover itself and the "master" should find it, is that correct?

 

 

In any case, I'd suggest that you try to achieve your goal manually (using gatttool from Linux) before creating your scripts, that way you will be able to understand better how BLE works. In case you don't have gatttool installed, you can get it by following this guide: https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-....

 

 

Peter.
PMuld2
New Contributor II
61 Views

Thanks, that might be what I was looking for. Background is that I want to enable and track some Beacons that I bought (Gimbal and Tile mainly, but maybe self-made Beacons with BLE113 chips too).

Instead of using the "real" beacons, I wanted to start with a "simulated" beacon first. Also, I want to learn about Eddystone beacons to retrieve URLs (see https://www.npmjs.com/package/eddystone-beacon-scanner eddystone-beacon-scanner )

PMuld2
New Contributor II
61 Views

Hmm.. install of Bluez fails with:

checking D-Bus session bus services dir... /usr/share/dbus-1/services

checking for UDEV... no

configure: error: libudev >= 172 is required

PMuld2
New Contributor II
61 Views

Ok, that previous message could be deleted. (it was a problem with copy-and-paste)

idata
Community Manager
61 Views

The same thing happened to me the first time I tried to install it, so don't worry about it… Let us know if you are able to connect your Edisons and interact with each other using gatttool.

 

 

Peter.