Skip to main content

Chapter 15 Bluetooth Low Energy

The goal of this chapter is to connect your final project to your phone: your Nucleo board will send information over a radio link and respond to commands coming back over the same link. The radio protocol is Bluetooth Low Energy (BLE), and the radio itself is the Adafruit Bluefruit LE UART Friend, a small board that carries the entire BLE protocol on its own processor and connects to our microcontroller as a serial port, which you have used since the UART chapter. Your program sends and receives bytes through USART1, the STM32C031C6’s other USART, and the module carries those bytes over the air to and from an app on your phone.
This chapter covers one class day. Before class, the reading introduces BLE as a set of ideas: what the protocol is for, how two BLE devices find each other and exchange data, and how the Bluefruit module turns all of that into a serial connection. In class we’ll look at what it takes to talk to the module from your Nucleo, walk through the bring-up path your project will follow in Lab 9, and then give you time to work on the project. Section 15.3 collects the flow-control mechanism, the AD2’s Protocol tab, the AT commands and the module’s timing rules for looking up while you build.