luffy45240
Posts: 3
Joined: Thu Mar 17, 2016 1:29 pm

[Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 1:35 pm

Hello,

I'm a new user on Raspberry and I bought the new version of Raspberry. I know that there is Bluetooth and BLE on this board. My problem is that i don't know how I can use the BLE. I search on different web pages and forum but i didn't find anything.

Somebody know how I can create a BLE beacon ?

Thank you for your answers.

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

Re: [Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 3:13 pm

Yeah, let me dig up some info I have on creating a BLE beacon out of a Raspberry Pi; it's not difficult. Meanwhile, what type of beacon did you have in mind, iBeacon, URIBeacon, AltBeacon, something else?
Last edited by Douglas6 on Thu Mar 17, 2016 3:42 pm, edited 1 time in total.

luffy45240
Posts: 3
Joined: Thu Mar 17, 2016 1:29 pm

Re: [Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 3:37 pm

My idea is to create an iBeacon with my raspberry and detect this beacon with my smartphone. I don't want to use an external Beacon for my case.

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 3:57 pm

I did a quick test using https://learn.adafruit.com/pibeacon-ibe ... eacon-data
No need to compile anything. AFAIK hci tools are pre-installed on Raspbian Jessie.
Test with

Code: Select all

hciconfig
It should show the BT device.

Code: Select all

sudo hciconfig hci0 up
sudo hciconfig hci0 leadv 3
sudo hciconfig hci0 noscan
sudo hcitool -i hci0 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
Should bring up the beacon... worked for me at least ;)

luffy45240
Posts: 3
Joined: Thu Mar 17, 2016 1:29 pm

Re: [Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 4:09 pm

I don't know exactly what I wrote but it works perfectly. I can detect my raspberry with my smartphone.

Thank you very much.

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

Re: [Pi3] Use my raspberry like a beacon

Thu Mar 17, 2016 4:11 pm

Yup, told ya it wasn't difficult. The tricky part is what all those numbers mean (you can find out from Google) . I'll try and write something up. I like the URIBeacon as it transmits a URL the phone app can connect to, but the iBeacon has built-in iOS support.

P.S. The adapter is powered up at boot, so that 'hciconfig hci0 up' isn't needed.

moohbe
Posts: 1
Joined: Mon Jan 16, 2017 12:48 pm

Re: [Pi3] Use my raspberry like a beacon

Mon Jan 16, 2017 12:55 pm

Hi Douglas, thanks for your advice. I too am in favour of the URI beacon and already have another Beacon product broadcasting URL's. I am looking for some help with high level python knowledge to develop a raspi beacon project. It involves getting the beacon to a) emulate multiple Beacons and beacon formats and b) sync with dynamically changing content (probably using KODI) as well as the GATT functions.
Could you please get in touch.

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

Re: [Pi3] Use my raspberry like a beacon

Mon Jan 16, 2017 3:23 pm

Here's some examples of advertising ibeacons and Eddystone beacons: viewtopic.php?p=938150#p938150. You can probably find info on the web to decode the field structures. I'm not sure what you mean by dynamic content, but remember the amount of data in a beacon is quite small, about 20 bytes, as I recall.

twisterrm
Posts: 2
Joined: Mon Jun 06, 2016 11:40 am

Re: [Pi3] Use my raspberry like a beacon

Fri Mar 03, 2017 12:09 pm

Hi all,
Did you think that i possible to use a raspberry as beacon, pushing an url that resolv into the same raspberry with apache web server containing website or other?
I know that raspberry need to act as a wifi receiver.
Can someone point me to some project if it exist?

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

Re: [Pi3] Use my raspberry like a beacon

Fri Mar 03, 2017 1:51 pm

Yes. See this post on creating a beacon, and a later post in this thread on the Eddystone beacon: viewtopic.php?p=938150#p938150

Return to “Beginners”