O'Reilly logo

Make: Bluetooth by Sandeep Mistry, Don Coleman, Alasdair Allan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. BLE Lock

In this chapter you’ll build a lock that can be opened using your phone. The lock mechanism will be built with an Arduino Uno, Bluetooth LE radio, and a solenoid lock. You’ll also write an iOS and Android application using PhoneGap that opens the lock using Bluetooth LE.

Lock Service

Most Bluetooth LE hardware for Arduino comes with a service that emulates the Bluetooth classic Serial Port Profile (SPP). While an SPP-like service could work for this project, it doesn’t take full advantage of Bluetooth LE. For this project, use the custom lock service defined in Table 4-1.

Table 4-1. Lock Service D270
Characteristic UUID Properties

unlock

D271

write

message

D272

notify

The lock service does two things. The unlock ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required