Chances are a given app is going to want to reconnect to whatever Bluetooth LE device(s) it was connected to previously. To help with this, Core Bluetooth provides calls to fetch peripherals the system knows about. The app passes in the known UUIDs for the peripherals in the system or can retrieve already connected devices to connect to.
- [Instructor] As we build toward…our app implementation,…we want to make sure we're handling connecting…and reconnecting to the device…in an efficient manner,…and Core Bluetooth can help us here.…We need to store the peripheral UUID.…This will help us retrieve the device later,…and be able to reconnect to it if possible.…Now this value can change on your device.…Generally it won't,…but you need to check the specifications…of your specific device.…The first thing Core Bluetooth can help us do is…fetch a list of known peripherals.…
This is a list of peripherals…that your device has connected to in the past…that the system keeps a list of.…If you can find your peripheral there…based on the UUID, you can reconnect to it.…The next possibility is to fetch a list…of already connected devices.…If your device is one of those,…you can reconnect to it.…If neither of these work out,…you can still can as usual.…Apple provides this diagram for the workflow.…You retrieve the known peripherals,…and if you find the right one,…you connect to it.…
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: Reconnecting to peripherals