1
votes

I set up a Raspberry Pi as an iBeacon according to several tutorials like https://learn.adafruit.com/pibeacon-ibeacon-with-a-raspberry-pi/setting-up-the-pi

Everything works fine so far as I can find the beacon with different apps. But I have also bought a "real" iBeacon from BeaconInside and while comparing the advertisement data of the two beacons with a Bluetooth LE scanning app I noticed that there is a difference:

The pi-beacon is missing the "Name (Complete)" and "Service Data" records: http://postimg.org/image/yc5wky7bv/

I also tried to scan for both with the Android BluetoothLeGatt Sample App (developer.android.com/samples/BluetoothLeGatt/index.html) and came to the same result:

Beaconinside:

8836-8889/com.example.android.bluetoothlegatt D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=78:A5:04:39:8C:3A, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -16, 1, -117, -101, 117, 9, 76, 49, -87, 5, 26, 39, -45, -100, 0, 60, 51, 1, -86, -36, -65]}, mServiceData={0000d00d-0000-1000-8000-00805f9b34fb=[1, 51, -36, -86, 93]}, mTxPowerLevel=0, mDeviceName=BEACON 39:8C:3A], mRssi=-76, mTimestampNanos=387592434672407}

Raspberry pi Beacon:

8836-8889/com.example.android.bluetoothlegatt D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=5C:F3:70:61:93:C7, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -30, -59, 109, -75, -33, -5, 72, -46, -80, 96, -48, -11, -89, 16, -106, -32, 17, 17, 18, 17, -56]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-28, mTimestampNanos=387592794842927}

The DeviceName is null and there is no ServiceData.

hciconfig hci0 -a:

hci0: Type: BR/EDR Bus: USB
BD Address: 5C:F3:70:61:93:C7 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:2785 acl:0 sco:0 events:73 errors:0
TX bytes:1348 acl:0 sco:0 commands:71 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'ABC'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x1000
LMP Version: 4.0 (0x6) Subversion: 0x220e
Manufacturer: Broadcom Corporation (15)

Does someone know why there is no name & service data record for the pi-beacon?

1

1 Answers

0
votes

The device name is sent as part of a BLE scan response, and not part of the beacon advertisement. Bluetooth beacons often do not send a name in the scan response.

If you want to make a BlueZ device transmit its name in the scan response, you can try setting it with a command like: hciconfig hci0 name 'Device Name'