Can iOS (iPhone or iPad) app have Core Bluetooth (BTLE) central manger and peripheral manager objects at same time?
Can they operate asynchronously, or does main app thread need to make them share (switch back and forth).
Sharing conceptual algorithm would be:
disable peripheral manager, enable central manager and do central functions,
and then,
disable central mgr, enable peripheral mgr, and do peripheral functions (that is, send automatic nofications, and wait for and respond to remote characteristic commands),
repeat...
BACKGROUND GORY DETAILS:
We have a local system with multiple iOS devices and multiple non-iOS devices that need to inter-communicate by BTLE.
The non-iOS devices all use Broadcom BCM20732 Bluetooth LE chip.
But hardware is not ready yet, so I'm using iOS devices to emulate the non-iOS, which requires simultaneous central AND peripheral functionality, ie.
1. act as central to periodically interrogate multiple other non-iOS devices in system.
2. act as peripheral to respond to requests for data from iOS user interface devices.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…