Raspberry iBeacon does not detect

I recently tried setting ibeacon to a BLE key (silica silicon radio) on raspberry pi. Link: http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html

I get this message:

HCI Command: ogf 0x08, ocf 0x0008, plen 44 1E 02 01 1A 1A FF 4C 00 02 15 E2 C5 6D B5 DF FB 48 D2 B0 60 D0 F5 A7 10 96 E0 00 00 00 00 C9 00 00 00 00 00 00 00 00 00 00 00 00 00 > HCI Event: 0x0e plen 4 01 08 20 12 

And the application does not even find the beacon. Although I can see that the key that is blinking is highlighted with this command:

 sudo hciconfig hci0 leadv 0 

But nothing is revealed.

So, run the APP named LIGHTBLUE from the AppStore, and it discovers Bluetooth with a different UUID.

I have tried this several times. And they completed all the steps in the textbook. But this Bluetooth device just does not appear.

Also, I'm curious to know what 0x08 and 0x0008 are and if I want to use a different UUID, what should I do? But this is the later part ...

Right now, BLUETOOTH will not use Estimated UUIDs, as stated in the Radius Networks tutorial.

I hope to get an answer soon.

The command I wrote (after this did not work, I changed the power to C9):

$ sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00

and, surprisingly, an error: Error: invalid HCI command parameters; Why is it invalid? Is it because CSR supports 128-bit rather than 64-bit hex?

Thanks!

+6
source share
6 answers

I saw the same problem as the memoryhole, where I had to remove extra zeros. I also had to enable ads before I configured the advertising data so that it worked correctly with my key.

Here is the exact sequence / commands that worked for me:

 sudo hciconfig hci0 up sudo hciconfig hci0 leadv 3 sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 

Here is what my version of the Radius script finished:

 #!/bin/sh . ./ibeacon.conf echo "Launching virtual iBeacon..." sudo hciconfig $BLUETOOTH_DEVICE up sudo hciconfig $BLUETOOTH_DEVICE leadv 3 sudo hcitool -i $BLUETOOTH_DEVICE cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 $UUID $MAJOR $MINOR $POWER 00 echo "Complete" 

It was on a Rasberry Pi with a company key BLE-402-BK ORICO BTA-402-BK (CSR8510 A10)

(I would leave this as a comment, but did not have enough rep)

+11
source

I also have a CSR-based USB Dongle bought in Hong Kong. I got the LE Set Advertising Data strong> team to work by removing the add-on at the end. According to the Bluetooth 4.0 Specification, the data field should be 31 octets long. I'm not sure why the Radius Networks tutorial added extra zeros. Try the following:

 $ sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 

Note. I did not run this on a Raspberry Pi, but the Ubuntu 12.04 laptop with bluez-4.98.

+3
source

I bought several of them from Amazon:

http://www.amazon.de/CSL-Bluetooth-Adapter-Technologie-neuester-Standard/dp/B00C68IQ3C

and didn’t get it to work in the beginning after Radius tut. Running hcidump in another window showed an error message when providing the hcitool command:

 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Data (0x08|0x0008) ncmd 1 status 0x12 Error: Invalid HCI Command Parameters 

After removing the extra 00 at the end of the hcitool command, it worked. My configuration file:

 export BLUETOOTH_DEVICE=hci0 # E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 # export UUID="e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0" export UUID="92 77 83 0A B2 EB 49 0F A1 DD 7F E3 8C 49 2E DE" export MAJOR="00 00" export MINOR="00 00" export POWER="C5 00" 

pay attention to extra 00 in POWER! this extra 00 is important.

My beaconstart script:

 #!/bin/sh . ./ibeacon.conf echo "Launching virtual iBeacon..." sudo hciconfig $BLUETOOTH_DEVICE up sudo hciconfig $BLUETOOTH_DEVICE noleadv sudo hciconfig hci0 noscan sudo hciconfig $BLUETOOTH_DEVICE leadv 3 sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 $UUID $MAJOR $MINOR $POWER # sudo hciconfig $BLUETOOTH_DEVICE leadv 3 echo "Complete" 

During try-and-erroring, I also added noscan and put leadv 3 in the FRONT of the hcitool command. But only after removing the extra 00s did he start working.

+2
source
 HCI Event: 0x0e plen 4 01 08 20 12 

translate to: ad set command ended with error 0x12 "Invalid HCI command parameters"

ogf 0x08, ocf 0x0008 is a command for setting advertising packet data, so you change the arguments of this command to change the UUID. You want to change the part of the hex string that matches the UUID. Note:

sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00

iBeacon broadcasting UUID Profile E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 with major 0 and minor 0

Do you have a bluetooth 4.0 dongle? Which team did you enter? (edit it in your question)

0
source

Sorry, you need a different bluetooth dongle. There have been other reports that CSR does not work with Bluez glass on the Raspberry Pi for iBeacon advertising. See here and here.

I checked that the above command does not give an error when using the recommended IOGear GBU521.

0
source

I was successful with the Raspberry Pi and Inateck csr4b5 BT Dongle, which should contain the CRS 8510. Following BT specifications, the length of 31 octets is exactly the same as the memory, and omitting the additional 00 octets, at the end it worked.

Edit: also worked with the Pearl Dongle Model PX-1632-675 and CSL USB Bluetooth Nano Dongle CSL-Nr. 23996

Give it a try.

Greetings

0
source

Source: https://habr.com/ru/post/959080/


All Articles