Which Bluetooth Profiles / services are supported by iOS?I found this:https://support.apple.com/en-us/HT204387I read up the iOS 11.3 will only see the built in pre-defined profiles. Is there a work around?Hands-Free Profile (HFP 1.6)Phone Book Access Profile (PBAP)Advanced Audio Distribution Profile (A2DP)Audio/Video Remote Control Profile (AVRCP 1.4)Personal Area Network Profile (PAN) Human Interface Device Profile (HID)Message Access Profile (MAP)So the Android phones will see the advertising of all kinds of BT / BLE devices, but iPhone does not, unless it was previousely paired by a custom app.Once you "Forget" this device on iPhone, it goes away and will not be seen during scanning.So even a Serial Port dongle with Serial Port Profile is not supported.(SPP), unless it is drive by a custom app?Any help appreciated
IOBluetooth
RSS for tagGain user-space access to Bluetooth devices using IOBluetooth.
Posts under IOBluetooth tag
34 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am currently writing a iPadOS application to act as a companion to the desktop version that controls a piece of hardware via a USB CDC serial connection. Due to modern iPads having USB-C ports for the last 2 years and the ability to attach certain USB devices via adaptors since the origin of the 30pin doc connector I would expect protocol availability to be fairly complete. So then why is it that the headers required to use USB CDC serial don't exist and if you make them yourself you need to use illegal symbols so you can't upload it to App Store connect.
Where as USB CDC ethernet has full support along with Bluetooth RFCOMM (rs232 serial over bluetooth) and even USB MIDI given that midi is a superset of serial. So why isn't there a USB CDC serial kit/api/even just allowing a data stream to the TTY/CU port?
If there is a way please tell me what it is and point me to the documentation.
[Q] What is the thread safety status of the IOBluetooth framework?
Is it possible call any class from the IOBluetooth framework from a secondary thread?
I haven't found so far information about this in the documentation and the only pieces of info you can find through a google search say the framework is not thread safe but these are old pieces of info.
Always failed to add IOBluetoothSDPServiceRecord in macOS Ventura
As the title said, after I called the method "publishedServiceRecordWithDictionary", the Bluetooth XPC connection would always be interrupted and reset.
The same code that I run in macOS Monterey is well executed without any warning.
And I got the following logs :
[CoreBluetooth] XPC connection interrupted, resetting
[IOBluetooth] Failed to add service record
[CoreBluetooth] XPC connection interrupted, resetting
[CoreBluetooth] XPC connection interrupted, resetting
[CoreBluetooth] XPC connection interrupted, resetting
[CoreBluetooth] XPC connection interrupted, resetting
Hi, I have an App KeyPad that lets you use your mac keyboard as a bluetooth keyboard for your iPhone, TV, iPad, another Mac, Windows PC.
https://apps.apple.com/us/app/keypad-bluetooth-keyboard/id1491684442?mt=12
Ever since the release of MacOS Ventura this app is no longer working. I have raised feedback report in december, and there is no activity on it. FB11869248
Essentially if I call publishedServiceRecord with a 16bit UUID in "0001 - ServiceClassIDList" the bluetoothd crashes and kills all bluetooth connections (Mouse, keyboard, headset...everything) and then reconnects. This is 100% reproducible.
What is interesting is that if a user installs my App on MacOS Monterey, it works, and if they upgrade to MacOS Ventura, it will continue to work. But if they install it new in Ventura it will not work. Even more interesting, because my app was installed in Monterey, all OTHER similar apps will work on Ventura.
I suspect that this is some sort of permission issue but I am not getting any support.
Anybody see something similar.
Sam
We have a BLE device (under development). The device is MFi capable and is visible in Accessibility->Hearing Devices and I can connect and steam music to my device.
When I disable the MFi feature and use a custom advertisement with custom 128-bit data and 128-bit Service Class UUIDs (0x07) advertisement type field, the device does not show up on the Bluetooth screen. There are other Android devices like my LG TV which show up on my phone's Bluetooth screen while my BLE device does not show up on the scan list.
Here are the details of my iPhone:
iOS version - 16.5.1(c)
Modem firmware - 3.70.01
What is the advertisement data that needs to be sent in my BLE device's advertisement packet to enable iPhone to detect it with a generic BLE device scan?
Hi
I'm developing a full-duplex iPhone voice chat application and I'd like to intercept bluetooth headset button events to perform certain actions in my app while maintaining a full-duplex audio. I'm using the MediaPlay to intercept remote bluetooth AVRCP MPRemoteCommandEvent play/pause events as well setting AVAudioSession to use the BluetoothA2DP category, however, when I do this, I can't seem to use the bluetooth microphone as an audio input. Specifically, when I query AVAudioSession for available inputs, bluetooth is not returned. I'm guessing this is because A2DP is a half-duplex protocol, but my understanding is that AVRCP events are only available with A2DP. The other bluetooth profile choice is HSP (AVAudioSession category Bluetooth), which works for full-duplex audio, but does not appear to provide a way to intercept the various AT commands from this profile unless I'm in an actual telephone call. For example, when I use HSP and press a button on my headset, I see in the logs the AT+CHUP command being sent from the headset to the phone.
Two questions:
Is there a way to use a bluetooth microphone while using A2DP for output at the same time?
If the above can't be done, is there a way to intercept the HSP AT control commands from a headset without being in a telephone call?
Thanks.
Hi everyone,
I'm currently working on a Bluetooth device that doesn't support pairing. While going through the MFi certification documents, I noticed that pairing seems to be a required feature.
Has anyone had experience getting MFi certification for a device that doesn't support pairing? Is it even possible? Any insights or guidance would be greatly appreciated!
Thanks in advance for your help!
I am writing to seek assistance with a persistent issue I am encountering with Bluetooth pairing and Multipeer Connectivity on two iPad devices ((Model: [iPad Pro (11 inch,2nd generation)] and Model: [iPad (6th generation)) and running iOS [iOS 16.6]
Issue Description:
Bluetooth Pairing Problem: I am unable to establish a Bluetooth connection between two iPad devices. Despite following the usual steps for pairing devices, such as enabling Bluetooth and ensuring both devices are discoverable, the pairing process is not successful. This issue prevents the devices from communicating over Bluetooth. But when I try to pair these two iPads with different iPhone , Bluetooth pairing is successful.
Multipeer Connectivity Issue: Additionally, due to the failed Bluetooth pairing, the Multipeer Connectivity framework on these devices is not functioning as expected. Multipeer Connectivity relies on Bluetooth and Wi-Fi for nearby device discovery and communication. As a result, my application, which relies on this framework, is unable to establish connections between the two iPad devices.
Troubleshooting Steps Taken:
I have attempted the following steps to resolve these issues:
•
Restarted both iPad devices.
•
Network resetting also done.
•
Ensured that Bluetooth is enabled on both devices.
•
Checked for any potential sources of Bluetooth interference.
•
Verified that both devices are running the latest version of iOS [16.6 version]].
•
Attempted to forget and re-establish the Bluetooth pairing.
Request for Assistance:
Despite these efforts, the issues persist. I kindly request your guidance and support in diagnosing and resolving the Bluetooth pairing problem and the subsequent Multipeer Connectivity issues. These functionalities are critical for my application's functionality, and I would greatly appreciate your expertise in resolving this matter.
If any additional information or diagnostic data is required to assist with the troubleshooting process, please let me know, and I will provide it promptly.
Hello all,
I am interested in trying to develop a short-medium range (>100 meters) tracking device for a hobby project in order to gain some literacy in mobile phone software, and have a few questions. I am new to working with anything iOS so please correct me in any mistakes I make in this query.
Is RFID or Bluetooth better for tracking and implementation on iOS?
How difficult is device implementation into iOS and apps such as find my iPhone? How would one go about it?
If I wanted a tracking device to send notifications based on location/distance from another device, could I do that with Apples framework or would I have to create my own app?
What programming language would be used in this sort of endeavor? Would C++ work or does iOS use different ones?
Thanks in advance, any and all advice is greatly appreciated.
Our accessibility users are using Apple's Voice Control feature: https://support.apple.com/en-us/HT210417
Voice Control does not work with bluetooth devices. It doesn't seem to be natively supported by Apple and only the iOS device's microphone works. Airpods, Bose Headphones and Jabra BT devices do NOT work.
Is there a way to get our application to run with Bluetooth devices? The current experience doesn't work with our accessibility users as they physically are unable to move closer to the device so bluetooth headphones are critical for their user experience to work correctly.
No connection notifications callback for Bluetooth devices are called on Sonoma if process is run as daemon/system, works on Ventura. Seems to be some changes in TCC that now requires kTCCServiceBluetoothAlways in system TCC.db - but how to grant this?
Other calls on IOBluetoothDevice fails probably for the same reason.
Running as launch agent works as expected on both Sonoma and Ventura.
Code used
os_log_t logHandle = 0;
@interface BluetoothConnection : NSObject
{
}
@end
@implementation BluetoothConnection
-(id)init {
self = [super init];
if (self)
{
IOBluetoothUserNotification* notification = [IOBluetoothDevice registerForConnectNotifications:self selector:@selector(deviceIsConnected:fromDevice:)];
if (notification == nil)
{
os_log_debug(logHandle, "registerForConnectNotifications failed");
}
else
{
os_log_debug(logHandle, "registerForConnectNotifications %{public}@", notification);
}
}
return self;
}
-(void)deviceDidDisconnect:(IOBluetoothUserNotification*)notification fromDevice:(IOBluetoothDevice*)device {
os_log_debug(logHandle, "%{public}@ (%{public}@) disconnected", [device name], [device addressString]);
}
-(void)deviceIsConnected:(IOBluetoothUserNotification*)notification fromDevice:(IOBluetoothDevice*)device {
os_log_debug(logHandle, "%{public}@ (%{public}@) connected (%d, %d)", [device name], [device addressString], device.deviceClassMajor, device.deviceClassMinor);
[device registerForDisconnectNotification:self selector:@selector(deviceDidDisconnect:fromDevice:)];
}
@end
int main(int argc, const char * argv[])
{
@autoreleasepool
{
logHandle = os_log_create("SPX”, “BT”);
BluetoothConnection *bluetoothConnection = [[BluetoothConnection alloc] init];
[[NSRunLoop currentRunLoop] run];
}
return 0;
}
I am trying to read/write from/to a Bluetooth device that has SPP(Serial port profile) from Python in Mac OSX. Could you recommend any good library to do so? I have been trying for long but the solutions I have tried does not work.
Any help would be greatly appreciated!
Does the new iOS 17.1 not support bluetooth devices anymore? I have a set of Bose head phones that I use all day when I work. I used to be able to listen to podcasts, audiobooks and pdf's using VoiceDream. Now, the apps don't work w/ the headphones. They work when not using the headphones, but only the phone works with the headphones. is there a work around?
I am trying to print using CUPS and my own backend, Bluetooth, but it is failing on macOS Sonoma.
The backend I built don’t have permission to perform Bluetooth communication or get a list of Paired devices.
I granted permissions to /usr/libexec/cups/backend/ from System Settings -> Privacy and Security -> Bluetooth, but that did not solve the problem.
When I run only the backend I created, the permission dialog appears and I can print, but when I try to print from CUPS, it does not appear and fails to print.
The print queue still shows "Ready to print" and the job remains.
Printing succeeds with USB and LAN, but only with Bluetooth.
Printing succeeds on 13.6 and earlier, problem occurs on 14 and 14.1.
Please let me know how to give permission to my backend.
When I set the AVAudioSessionCategory avAudioSessionCategory: AVAudioSessionCategory.playAndRecord, sound to come out of the built-in speaker instead of Bluetooth headphones。ios17 。It is normal in IOS 16 or 15
final session = await AudioSession.instance; await session.configure(AudioSessionConfiguration( avAudioSessionCategory: AVAudioSessionCategory.playAndRecord, avAudioSessionCategoryOptions:AVAudioSessionCategoryOptions.allowBluetooth | AVAudioSessionCategoryOptions.allowBluetoothA2dp, avAudioSessionMode: AVAudioSessionMode.defaultMode, avAudioSessionRouteSharingPolicy: AVAudioSessionRouteSharingPolicy.defaultPolicy, avAudioSessionSetActiveOptions: AVAudioSessionSetActiveOptions.none, androidAudioAttributes: const AndroidAudioAttributes( contentType: AndroidAudioContentType.music, flags: AndroidAudioFlags.none, usage: AndroidAudioUsage.media, ), androidAudioFocusGainType: AndroidAudioFocusGainType.gain, androidWillPauseWhenDucked: true, ));
How to make sound output from Bluetooth instead of speakers in IOS 17?
How to make sound output from Bluetooth instead of speakers in IOS 17?
Hello,
I try to create a Bluetooth RFCOMM client and server on macOS, I tried using this project on GitHub but I have this message :
The device does not have the necessary services.
and it's impossible to connect to the device.
do you know an example project that working ?
Thanks
Hello,
I have found an example of Bluetooth RFCOMM client for macOS on GitHub.
I search now an example of Bluetooth RFCOMM server for macOS.
Thanks.
objectC program: iOS all : iPhone ~
swift program. : iOS 13 ~ : iPhone 6s ~
swiftUI Program : iOS 13 ~ : iPhone 6s ~
bluetooth classic : ~ iPhone 4s
Bluetooth Low Engery : iPhone 5 ~
are All above content right?
i am making iOS app with swiftUI app, and Bluetooth Low Energy.
after making app, i found that my app can run on greater than iOS13 , iPhone 6s.
how many is ther number of above iPhone6s User ?
I am developing an App that uses BLE to connect to third-party devices.
Considering information security, perform a LE Secure Connection before BLE connection.
But we encountered an issue:
after uninstalling the App and reinstalling it, the paired device cannot be connected again. This requires to ignore this device in Settings to continue using it.
But we can't do this, it's not friendly to our customers.
So, I would like to ask the developers here if they know how to solve this issue.
Thank you