google / physical-web

The Physical Web: walk up and use anything
http://physical-web.org
Apache License 2.0
6k stars 667 forks source link

Raspberry Pi 3 as Eddystone Beacon #929

Closed jonathanrjpereira closed 6 years ago

jonathanrjpereira commented 6 years ago

Can I configure the Raspberry Pi 3 as a Bluetooth Eddystone beacon which would broadcast a URL? Are there any good resources for this?

dermike commented 6 years ago

@jonathanrjpereira If you install node on it you can use: https://github.com/don/node-eddystone-beacon

jonathanrjpereira commented 6 years ago

What about reading/scanning Beacons on the RasPi?

dermike commented 6 years ago

@jonathanrjpereira Then I have this shameless plug https://github.com/dermike/physical-web-scan

jonathanrjpereira commented 6 years ago

This is awesome. Thanks a lot

jonathanrjpereira commented 6 years ago

If you have any, Please share any additional resources you have for Eddystone beacons on the Raspberry Pi

jonathanrjpereira commented 6 years ago

Any resources for the RasPi 3 in Python?

dermike commented 6 years ago

@jonathanrjpereira https://github.com/google/eddystone/blob/master/eddystone-url/implementations/PyBeacon/README.md

ukBaz commented 6 years ago

Looking at PyBeacon it uses the command line tools of "hcitool" and "hcidump" which are fine short term however those tools have been deprecated in newer versions of BlueZ. Those newer versions will make their way on to the Raspberry Pi eventually. More background on this issue at: https://www.spinics.net/lists/linux-bluetooth/msg70489.html

For my own use I have used the BlueZ DBus API although that does require the bluetoothd to be run with the "-experirmental" flag for advertising/creating a beacon. Here is my example: https://github.com/ukBaz/python-bluezero/blob/master/examples/eddystone-url-beacon.py

To scan for beacons using Python then the aioblescan library looks very good: https://github.com/frawau/aioblescan

More generally I have been trying to keep track of libraries I find that use Python and run on Raspberry Pi for BLE. The results are at: https://github.com/ukBaz/python-bluezero/wiki Please feel free to correct any errors or omissions.