I would like to know more about how I can use a bluetooth PTT device with the "Push to Talk" framework on iOS. I've enabled the setAccessoryButtonEventsEnabled on the PTChannelManager, but I am unable to get it to transmit when I press the PTT button on the device.
Is there documentation that explains any additional steps I need to do in order to use a bluetooth PTT device with an iPhone using the Push to Talk framework? Our application works fine when interacting through the software UI.
I'm testing with a PrymeMax PTT device. This is the user guide: https://www.pryme.com/files/manuals/MANUAL-BTH-550-MAX.pdf
There are a lot of generic devices like this one that I would like to support. Can somebody provide more information on how this is accomplished?
I would also like to support it with iOS versions older than iOS 17 if possible.
There are a lot of generic devices like this one that I would like to support. Can somebody provide more information on how this is accomplished?
Starting with some background context, PTT control headset generally work in one of two ways:
a) They present themselves to the system through the standard media control profiles of classic bluetooth. As far as the system is concerned, the headset is EXACTLY the same as any other bluetooth headphones/headset/head unit. Within the API, support for these accessories is what "setAccessoryButtonEventsEnabled" actually controls.
When you enable accessory button events, the system then maps whatever media events it receives onto PTT channel events. As an aside, there are actually two reasons why we provide an API to control this instead of simply enabling this automatically:
-
Some apps specifically DON'T want to use the media system this way. For example, some PTT apps are primarily focused on "receiving" message (not transmitting) and they want the usr to be able to listen and control their music, not the app.
-
This mapping process works really well when the user knows what's going on and using it "intentionally", but can also create REALLY strange behavior when used "blindly". For example, virtually all car head units send a "play" command to bluetooth when a device connects, which means turning on your car can generate a "transmit" request.
b) BLE (Bluetooth Low Energy) controllers implement their own bluetooth profiles to notify the controller of changes on the accessory. My understanding is that there is some amount of informal standardization around the BLE profile, but that's not something Apple is involved with so I can't provide anymore detail than that. In terms of the systems role here, your app would use the CoreBluetooth framework to connect and communicate with the accessory and then control the PTT framework based on whatever happened on the accessory. Putting that in more concrete terms, your app would receive a characteristic change meaning "transmit" through CoreBluetooth and then call "requestBeginTransmittingWithChannelUUID" to start the transmission process.
In terms of this specific accessory:
I'm testing with a PrymeMax PTT device. This is the user guide: https://www.pryme.com/files/manuals/MANUAL-BTH-550-MAX.pdf
That's a BLE controller ("b"), so you'd need to use CoreBluetooth to support it yourself. The specifics of what that would involve are something you'd need to work with the hardware vendor to determine.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware