Onion or Onion2 as Bluetooth beacon?
-
Would it be possible to.use the onion as a Bluetooth beacon? : similar to what is described here https://medium.com/@urish/exploring-the-physical-web-without-buying-beacons-efae51e36c2e#.tj83pfi4i
-
Hi Maurice
That looks really interesting. I'm almost certain that the Omega is capable of this, with the Onion Bluetooth Light Energy expansion:
https://onion.io/product/bluetooth-expansion/
I'd like to try this one out for myself and get back to youOne heads up: the BLE dongle that the author posted on your link seems to only support Windows.
-
https://community.onion.io/topic/771/bluetooth-add-ons-solved
that thread shows how to add bluetooth software, took up about 3MB flash.
basicallyopkg install obluez-libs obluez-utils
Then its a matter of using hcitool to configure the beacon. I was after an Eddystone URL beacon and found this site helpfull in setting ut up.
https://hackaday.io/project/10314-raspberry-pi-3-as-an-eddystone-url-beaconThat last page also had a link to a tool to generate the the beacon advertising data. Keep in mind the URL length is limited to 20(?) characters, but there are special characters for common prefix and suffixes, like http:// and .com etc. So I ended up with adding the commands to my rc.local file as shown below, and upon boot the beacon is started.
Other types of beacons (ibeacon etc) just requires a diffent hcitool command with different beacons settings.
root@Omega-2194:~# cat /etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. hciconfig hci0 up hciconfig hci0 leadv 3 hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 06 03 03 aa fe 16 16 aa fe 10 00 02 65 6e 6c 69 67 68 74 65 6e 65 64 2e 74 69 70 73 00 exit 0