Gismo
Posts: 1
Joined: Fri Mar 11, 2016 12:12 pm

Raspberry Pi 3 -> iBeacon

Fri Mar 11, 2016 12:34 pm

Hey there,

first of all i'm very happy that the new Raspberry Pi 3 is out and supports bluetooth. As soon it was available i ordered one, since i always wanted to make an iBeacon.

Now i started to configure my iBeacon with NOOBS and the tutorial for the piBeacon from https://learn.adafruit.com/pibeacon-ibe ... eacon-data. In the latest version of NOOBS (1.8.0) it seams like bluez is already installed and the bluetooth device is running. But i'm not able to get the Raspberry Pi 3 sending the advertising data...

After setting a unique uuid with this line:

Code: Select all

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 DC 42 38 46 F9 E6 49 EF A7 B8 50 B8 43 88 63 04 00 00 00 00 C8 00
i receive this output:

Code: Select all

< HCI Command: ogf 0x08, ocf 0x0008, plen 32
  1E 02 01 06 1A FF 4C 00 02 15 DC 42 38 46 F9 E6 49 EF A7 B8 
  50 B8 43 88 63 04 00 00 00 00 C8 00 
> HCI Event: 0x0e plen 4
  01 08 20 00
But i cant find my iBeacon and im not even sure if everything works or the Raspberry Pi 3 is able to work as an iBeacon at all. I dont't know what i'm doing wrong. I already complied and installed the latest version of bluez (5.37) but it still won't work. Maybe someone can help me?

Thanks a lot for any answers!

simonx314
Posts: 5
Joined: Sun Mar 20, 2016 8:13 pm

Re: Raspberry Pi 3 -> iBeacon

Sun Mar 20, 2016 8:19 pm

I have the same issue. When I do the same steps to broadcast an iBeacon with hciconfig, I see the same exact output, but I can't find any iBeacons with my phone.

dpitchfo
Posts: 7
Joined: Sun Sep 21, 2014 7:21 pm

Re: Raspberry Pi 3 -> iBeacon

Thu Mar 24, 2016 10:25 pm

Hi,

I got the same problem. I upgraded to bluez-5.38 and everything seems to be in order, but, I do not detect the BLE. Have you had any luck?

I am trying apps on the iPhone 7 (Beacon Toolkit, Bluefruit LE and BLE Finder) and can't detect anything.



Don

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 -> iBeacon

Fri Mar 25, 2016 9:01 pm

I just got around to giving this a try, and had no problem. From a clean install of the 2016-03-18-raspbian-jessie.img, I simply ran these two commands from a terminal. First, set up the iBeacon advertising data:

Code: Select all

sudo hcitool cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 00 00 00 C8 00
Then, turn on LE advertising:

Code: Select all

sudo hcitool cmd 0x08 0x000A 01
The beacon was visible in several BLE apps on my Android phone.

jsavage
Posts: 22
Joined: Wed Aug 21, 2013 8:11 am

Re: Raspberry Pi 3 -> iBeacon

Mon Mar 28, 2016 10:01 pm

Just a quick note to confirm that the above instructions worked for me on a new install of Raspbian Jessie. (not Noobs.)
The beacon was almost instantly detected using Android app called Locate by radiusnetworks.com. It is also detectable using an app called BlueScan. My phone is a Samsung Galaxy Ace 4 running Android 4.4.4.

Now to try and do something useful with it.

James

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 -> iBeacon

Tue Mar 29, 2016 2:43 am

jsavage wrote:Now to try and do something useful with it.
Yeah, I find Google's Eddystone beacons to be a little more interesting. You can broadcast a URL that the app can open. Here's the data for an Eddystone beacon:

Code: Select all

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 06 02 0A 00 03 03 AA FE 12 16 AA FE 10 00 01 72 61 73 70 62 65 72 72 79 70 69 08 00 00
It can be seen in Locate, or the Physical Web app, or, my favorite, nRF Master Control Panel.

tendres
Posts: 2
Joined: Tue Jun 07, 2016 5:00 pm

Re: Raspberry Pi 3 -> iBeacon

Tue Jun 07, 2016 5:08 pm

I am having problems making any of the above work with a new Pi 3.
Unable to get anywhere with the internal bluetooth I bought an external but still getting nowhere. Hope someone can help as I am stumped. Same results for hci0 and hci1,

[email protected]:~/bluez-5.39/tools $ hciconfig
hci1: Type: BR/EDR Bus: USB
BD Address: 5C:F3:70:78:0C:A6 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:1730 acl:0 sco:0 events:101 errors:0
TX bytes:2100 acl:0 sco:0 commands:97 errors:0

hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:70:2D:33 ACL MTU: 1021:8 SCO MTU: 64:1
DOWN
RX bytes:780 acl:0 sco:0 events:51 errors:0
TX bytes:2544 acl:0 sco:0 commands:51 errors:0

sudo hcitool -i hci1 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 92 77 83 0A B2 EB 49 0F A1 DD 7F E3 8C 49 2E DE 00 00 00 00 C5 00

< HCI Command: ogf 0x08, ocf 0x0008, plen 32
1E 02 01 1A 1A FF 4C 00 02 15 92 77 83 0A B2 EB 49 0F A1 DD
7F E3 8C 49 2E DE 00 00 00 00 C5 00
> HCI Event: 0x0e plen 4
01 08 20 00

Thanks in advance for any help!
-tom

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 -> iBeacon

Tue Jun 07, 2016 6:56 pm

Not sure what is not working. I haven't decoded the advertising data you listed, where did it come from? Have you tried the iBeacon data I posted above? Also, you didn't show that you turned on advertising with the 'sudo hcitool cmd 0x08 0x000A 01' command. Is the external adapter 4.0 capable? What are you using to detect the beacon?

tendres
Posts: 2
Joined: Tue Jun 07, 2016 5:00 pm

Re: Raspberry Pi 3 -> iBeacon

Wed Jun 08, 2016 7:22 pm

Thanks Douglas6 for your help. I have been trying various advertising data snippets from Google searches. This was after following your steps.
This might clear some things up though:
- back to using just the Pi 3's internal bluetooth.
- what should successful output be from running:
sudo hcitool cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 00 00 00 C8 00 ?
My results:
< HCI Command: ogf 0x08, ocf 0x0008, plen 32
1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F
17 D1 AD 07 A9 61 00 00 00 00 C8 00
> HCI Event: 0x0e plen 4
01 08 20 00
then:
sudo hcitool cmd 0x08 0x000A 01
< HCI Command: ogf 0x08, ocf 0x000a, plen 1
01
> HCI Event: 0x0e plen 4
01 0A 20 00

I am using various iOS apps ('Locate', 'Beacon Bits', 'Beacon Toolkit').
How will this beacon be identified? I understand there will be no major/minor versions, but what about a title or UUID?
Sorry but confused here..

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 -> iBeacon

Wed Jun 08, 2016 11:47 pm

That all looks good. Both commands are generating successful HCI Command_Complete_Events. When run on my Pi3, I'm able to detect an iBeacon with UUID 'e20a39f4-73f54bc4-a12f-17d1ad07a961' and major and minor IDs of zero (as seen on my Android phone).

jhrisko1
Posts: 12
Joined: Fri Oct 06, 2017 6:06 pm

Re: Raspberry Pi 3 -> iBeacon

Tue Jan 02, 2018 5:26 pm

Have you tried using the Raspberry Pi as the central device? I was able to configure the RPi3 to communicate with a HM-10 bluetooth module. The HM-10 is fairly cheap. I wrote a whole blog post on how to turn an HM-10 into an iBeacon and read its RSSI with RPi3. It uses Python to read the HM-10 iBeacon RSSI. Check out the blog if you're interested:

https://engineersportal.com/blog/2017/1 ... ork-part-1

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11094
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi 3 -> iBeacon

Tue Jan 02, 2018 6:30 pm

Necromancing, therefore locking

Return to “Other projects”