Reputation: 724
I have two boards: Board 1: PixiePro running Arch Linux, Bluez 5.4 | Onboard Bluetooth Adapter Board 2: Raspberry Pi running Raspbian, Bluez 5.39 | USB Bluetooth Dongle
While using hcitool
to scan for BLE devices (iBeacon) on Board 1, I only receive the address of a single device (pic below).
AC:BC:32:72:8C:6B
I have more than 10 iBeacons that the adapter should be finding. I've tried the following techniques:
Start hcitool lescan
, removing duplicates
sudo hcitool lescan --duplicates
Start hcitool lescan
process & read data from hcidump
sudo hcitool lescan --duplicates 1>/dev/null &
sudo hcidump --raw
These both just show one or two different mac addresses. There should be several different mac addresses for the various iBeacons near me.
Here is output by Board 2 using a USB bluetooth dongle for comparison:
sudo hcitool lescan
As you can see, there are quite a few different devices, some of which are immediately identifiable as Kontakt iBeacons. Note: most of the beacons around me are not Kontakt iBeacons
Is there a setting I'm missing or need to enable when using hcitool lescan
?
Upvotes: 2
Views: 1704
Reputation: 171
I will try to help you with this one.
It seems that there is something wrong with your PixiePro device, however information you’ve provided is not enough to diagnose the issue.
It could be a problem with either the device itself, or Bluez stack, or, simply because the devices are out of the detectable range of the PixiePro device.
In order to debug your issue you may try to do the following:
First of all check mac-addresses, uuid, major and minor values of your devices. Usually you may find this information on the web-portal of your iBeacon vendor;
Ensure that all of the devices are turned on and working. The simplest way is to check whether they are detected by a mobile phone. You may install free iOS or Android application. You should be able to detect all of your devices. Also check the RSSI values of every iBeacon device. Please note that values will vary even though they can be at the same distance from the phone to the iBeacon. However, the behavior, while you are moving them further or closer to the receiving device, should be clearly recognized by the mobile application;
Once you are 100% sure that all of the iBeacon devices are
working properly, you should be able to detect the mac-addresses on
your board devices. To do this, I’d recommend to run the hcitool
in
the first terminal window and the hcidump
tool in the second
without any additional parameters. Unlike the hcitool
command it
will also output the RSSI values of captured packets like this:
HCI Event: LE Meta Event (0x3e) plen 42
LE Advertising Report
ADV_NONCONN_IND - Non connectable undirected advertising (3)
bdaddr 02:AB:26:D4:9A:EE (Public)
Flags: 0x1a
Unknown type 0xff with 25 bytes data
RSSI: -72
These values will help you to compare the behavior of scanning on different devices. DON’T expect them to be equal everywhere, these are simply relative values. Now try to move each of your devices close to your receiving board(s) and you should be able to see its mac-address in the output of the hcidump
tool.
In this case if you still don’t see your iBeacon devices then for sure there is an issue somewhere in your boards. It could be either hardware or software. This is where I’d recommend:
Good luck!
If any questions, feel free to ask!
Upvotes: 1