All of the initial setup steps to scan for devices, connect to a device, discover services and characteristics lead up to being able to have access to a Bluetooth LE device’s data. Core Bluetooth facilitates this as well by exposing calls on the peripheral class representation of the device to read a value for a given characteristic.
- [Instructor] So now that we've successfully written data…to our characteristic on the peripheral,…we want to look at reading data from a characteristic.…When you read the data, you get it back as a data instance.…And in many cases, that data is going to need to be massaged…or processed some how to become meaningful data…that you can use in your app.…To read the data, you call the function read value…on the peripheral and pass in the characteristic…that you want to read the value for.…There's a call back called did update value…for characteristic that we'll implement…to get the value and process it however we need.…
We want to do this regularly so that we get updates…of our characteristic's value ongoing,…and we'll create a timer for that in our code.…So one thing that we want to look at is what kind of data…do we get back from our characteristic.…If we go back to the user's guide online,…we can scroll down to the optical sensor,…and we can see that the data that we get back needs to be…processed in this way to be able to…
Author
Released
4/5/2018- Bluetooth Low Energy (BLE) basics
- Core Bluetooth key classes
- Scanning for peripherals
- Discovering services and characteristics
- Writing to a characteristic
- Reconnecting to peripherals
- Apps as peripherals
Skill Level Intermediate
Duration
Views
Related Courses
-
Introduction
-
Welcome1m 10s
-
Exercise files33s
-
-
1. BLE Basics
-
BLE overview1m 29s
-
BLE communication workflow1m 18s
-
SensorTag overview1m 38s
-
-
2. Scanning, Connecting, and Discovering
-
Bluetooth project setup4m 30s
-
Scan for peripherals4m 54s
-
Connect to peripheral3m 13s
-
-
3. Writing to a Characteristic
-
Adding additional features10m 43s
-
4. An App as a Peripheral
-
Central app on Mac4m 19s
-
Peripheral iOS app7m 47s
-
Creating a characteristic2m 42s
-
Central read requests4m 6s
-
Central write requests4m 21s
-
-
Conclusion
-
Next steps1m 7s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Reading a characteristic value