Post

Replies

Boosts

Views

Activity

No connectionEventDidOccur for GATT over BR/EDR (aka Classic) using CoreBluetooth
I'm trying to use the iOS 13 introduced capability in CoreBluetooth to do GATT over BR/EDR. The accessory I'm using obviously implements GATT over BR/EDR (it even publishes its services using SDP). According to the session WWDC 2019 What's New in Core Bluetooth session, we have to use the registerForConnectionEvents API on a CBCentralManager instance, providing services UUIDs (CBUUIDs) that will be available to use on the BR/EDR accessory. In the session, they explicitly say: Your app will have instantiated a CBCentralManager, passed us a known service UID, and in the case of a BR/EDR or classic device, your user will go to the Bluetooth settings and search for the device, in this case let's say it's a headset running heart rate. They'll discover the device, find it, and attempt to connect. Pairing will be triggered, and then afterwards when we're connected, we'll run a service discovery of the GATT services. If we find a service that you want, then you'll get the delegate callback. So when doing a manual connection in the Settings app to the accessory, iOS does a GATT service discovery and if it matches, we receive an associated connectionEventDidOccur delegate callback with the event peerConnected and the associated CBPeripheral. However, this delegate callback never happens. I'm using the UsingCoreBluetoothClassic sample from Apple, with custom service CBUUIDs implemented by my accessory. I did multiple attempts: providing only one service CBUUID, severals CBUUIDs, none, generic ones, very specific ones... It never fires. Note that on Android, it seems to work: connection is possible using the MAC address directly, and a service discovery using SDP lists the accessory services. Also note that the event fires when I'm scanning using scanForPeripherals and connect to my accessory (because my accessory also does GATT over BLE, but for specific reasons we explicitly want to perform GATT over BR/EDR). Is there something I have to do on the accessory that I probably missed ? Thanks for your help!
1
0
1.1k
Sep ’21
Local network communications in iOS14
Hello, Like a lot of developers here, I tested my app on iOS14 and noticed the new local network privacy system alert when my app just launched. We make a companion app for smart speakers and we use our own protocols to communicate with those, making the alert appear automatically. Since those protocols are low level, is there a simple to use API that allow to control when we want to make appear this alert and know explicitly if the user denies the access ? Thanks
4
0
1.1k
Jul ’20