Skip to main content

Check Your Understanding 15.1.7 Check Your Understanding

1.

Which of these applications matches what BLE was designed for?
  • A battery-powered sensor that sends a temperature reading once a minute.
  • Correct. Tiny bursts of data from a battery-powered device are BLE’s pattern: the device wakes up, sends a small amount of data, and goes back to sleep.
  • Wireless headphones playing music.
  • Audio is a continuous stream at a high data rate, which is Bluetooth Classic’s job. BLE trades that bandwidth away for low power consumption.
  • Transferring a large video file between two laptops.
  • A large transfer needs a fast, continuous connection. BLE sends small packets occasionally, and it would be very slow at this.
  • A wireless security camera streaming live video.
  • Video streaming is continuous, high-rate traffic. BLE is built for short bursts of a few bytes, not for streams.

2.

In the final project, your phone connects to your team’s Bluefruit module. Which device is the peripheral, and what does the peripheral do before the connection exists?
  • The Bluefruit module is the peripheral, and it advertises: it repeatedly transmits a short packet with its name and services until a central connects.
  • Correct. The peripheral advertises and the central scans. The phone, as the central, picks the module out of its scan list and initiates the connection.
  • The phone is the peripheral, because it is the smaller and more portable device.
  • The roles are about who initiates and who advertises, not about size. The phone scans and initiates, which makes it the central.
  • The Bluefruit module is the peripheral, and before the connection it stays silent to save power until the phone finds it.
  • A device that never transmits cannot be discovered. The peripheral advertises, and that is how the central’s scan finds it.
  • Whichever device powers on first becomes the peripheral.
  • The roles are fixed by design, not by timing. The module is built to advertise and serve data; the phone is built to scan and connect.

3.

Your module is connected to your phone. A teammate opens the app on their own phone and scans. What do they see?
  • Your module does not appear in their scan list, because a connected peripheral stops advertising until the connection is broken.
  • Correct. As soon as a connection is established the peripheral stops advertising itself, and other devices can no longer see it or connect to it.
  • Your module appears, and connecting to it from the second phone joins a three-way conversation.
  • A point-to-point connection has exactly one central and one peripheral. While your phone holds the connection, the module is invisible to other centrals.
  • Your module appears, but connecting to it disconnects your phone.
  • A connected peripheral is not advertising, so it does not appear in the second phone’s scan at all, and there is nothing there to connect to.

4.

In GATT’s hierarchy, what is a characteristic?
  • One piece of data inside a service, with a value and properties saying whether it can be read, written, or subscribed to.
  • Correct. A service is a category of functionality; each characteristic inside it is one piece of data, and its properties are the rules for using it.
  • The name a peripheral broadcasts while advertising.
  • The advertised name is part of GAP, the discovery phase. Characteristics belong to GATT, the data exchange that starts after the connection is made.
  • The radio channel a connection uses.
  • Radio channels are far below GATT, in the part of the protocol the module handles for us. A characteristic is a piece of data with rules attached, and it describes nothing about the radio.
  • A category of functionality that contains one or more services.
  • That is the hierarchy upside down: a service is the category, and it contains one or more characteristics.

5.

Your program sends the characters T=23 out of the USART connected to the Bluefruit, which is in data mode and connected to your phone. What happens?
  • The module forwards the bytes over the air, and T=23 appears in the app’s UART console on the phone.
  • Correct. In data mode the module is a bridge: bytes in on RXI go out over the air through the UART service, and the app displays them. The Nucleo and the phone talk as if they had a direct USART connection.
  • The module interprets the characters as a configuration command and responds OK or ERROR.
  • Commands are interpreted only in command mode (CMD). In data mode every byte is forwarded as data, whatever its value.
  • The characters appear in CoolTerm on your laptop.
  • CoolTerm is connected to a different USART, the one that goes through the ST-LINK to your laptop. The bytes sent to the Bluefruit’s USART go to the phone.
  • Nothing, until the phone requests the data with a read.
  • The UART service uses the notify property for this direction: the module pushes the bytes to the phone as they arrive, without being asked.