BluetoothLE WiFi and Raspian

From csn
Revision as of 05:33, 21 May 2020 by David (talk | contribs)
Jump to navigation Jump to search

In this first activity we will show you how you can craft a Bluetooth LE beacon using the Raspberry Pi.

Start by logging into your Raspberry Pi and then check that Bluez is installed:

sudo apt install bluez


We are going to use the Raspberry Pi to transmit an Eddystone beacon.

Lets look at the available commands:

hciconfig -h

Lets bring up the Bluetooth device on our Raspberry Pi using below command:

sudo hciconfig hci0 up

Then, lets set the Bluetooth interface to advertise but not be connectable:

sudo hciconfig hci0 leadv 3

Now we will construct and send the Bluetooth LE beacon:

sudo hcitool -i hci0 cmd 0x08 0x0008 1c 02 01 06 03 03 aa fe 14 16 aa fe 10 00 02 6D 75 72 64 6F 63 68 2E 65 64 75 2E 61 75 00 00 00

This will create a Bluetooth low energy beacon that points to murdoch.edu.au