Book Image

Raspberry Pi LED Blueprints

By : Agus Kurniawan
Book Image

Raspberry Pi LED Blueprints

By: Agus Kurniawan

Overview of this book

Table of Contents (14 chapters)
Raspberry Pi LED Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing iBeacon


iBeacon is a proprietary technology from Apple, which adds additional services to a BLE stack. It usually provides location services on an iBeacon stack. An iBeacon stack consists of universally unique identifier (UUID)—major and minor values. How to implement iBeacon on Raspberry Pi? In the previous section, we already set up our Bluetooth on Raspberry Pi.

Now we build iBeacon on the Bluetooth 4 (BLE) stack. Make sure that you have already set up Bluetooth on Raspberry Pi. Please read this in the previous section.

After attaching the Bluetooth 4.0 USB to the Raspberry Pi board, turn on and configure it. Type the following commands:

$ sudo hciconfig hci0 up
$ sudo hciconfig hci0 leadv 3
$ sudo hciconfig hci0 noscan

We pass the leadv 3 parameters on hciconfig to disable the advertised service connectable. The noscan parameter is used to disable our Bluetooth device to do scanning.

The next step is to send an iBeacon packet. To transmit an iBeacon packet, you can use hcitool...