IOBluetooth

RSS for tag

Gain user-space access to Bluetooth devices using IOBluetooth.

IOBluetooth Documentation

Posts under IOBluetooth tag

39 Posts
Sort by:
Post not yet marked as solved
2 Replies
572 Views
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?
Posted
by jwbeach.
Last updated
.
Post not yet marked as solved
0 Replies
373 Views
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!
Posted Last updated
.
Post not yet marked as solved
6 Replies
676 Views
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; }
Posted Last updated
.
Post not yet marked as solved
0 Replies
404 Views
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.
Posted
by sami.taha.
Last updated
.
Post not yet marked as solved
0 Replies
481 Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
563 Views
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.
Posted
by Tiji_Joy.
Last updated
.
Post not yet marked as solved
0 Replies
462 Views
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!
Posted Last updated
.
Post not yet marked as solved
2 Replies
8.7k Views
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
Posted
by Renix.
Last updated
.
Post not yet marked as solved
0 Replies
747 Views
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.
Posted
by DC-MW.
Last updated
.
Post not yet marked as solved
2 Replies
603 Views
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?
Posted Last updated
.
Post not yet marked as solved
1 Replies
777 Views
Hello, Our application is a health application that functions alongside a device transferring data via Bluetooth. There is continuous data transfer happening from this device. However, when operated on an iOS device, the application gets cut off in the background after a certain duration, negatively impacting the user experience. As is known, the background services of an application being terminated after a certain period is generally associated with how iOS manages system resources. In our case as well, we came across this issue before we implemented a formatted background task. Therefore, to address this situation, we used a formatted background task in our application, but the problem still persists. Unable to resolve the issue, we decided to analyze how other Bluetooth devices work on iOS devices. For example, when an electronic watch is connected, the Bluetooth connection never gets cut off. However, why can't we achieve the same performance with our device? I would be extremely grateful if you could shed technical insight on this matter and share your experiences. Furthermore, if you have any recommendations on how to handle such situations, I would love to hear all about them. Thanks in advance for your help.
Posted Last updated
.
Post not yet marked as solved
0 Replies
821 Views
Hello, I am working with Core bluetooth functionality incase of iOS. In one of our bluetooth hardware using pairing key to pair device. When the device is turned off and turned on again and we try to connect same device its giving us above bluetooth error of Code=14 "Peer removed pairing information" The only way to reconnect this device is to forget that from setting and reconnect. I am aware about answers regarding following above steps. But we required any other way as in our application we are connecting again device automatically and its always stopping users from background connect. In case of Android OS the Android OS is asking pairing key again and no steps required for forgetting it. So is any similar options available for iOS in latest OS or fix is pending from iOS ? Thanks
Posted
by paras.
Last updated
.
Post not yet marked as solved
0 Replies
674 Views
I am reaching out to you to seek a few clarifications on iPhone behavior w.r.t BR/EDR MAP implementation. We have our MAP MCE implementation and trying to connect with iPhone for MAP Service. Following are the observations: After pairing one should enable 'Notification' tab corresponding to the paired device in iPhone setting. If we don’t enable the Notification, the iPhone will disconnect immediately (This behavior seems specific to iPhone). Example: iPhone Setting -> Go to paired device menu -> Enable Notification. Once the 'Notifications' is enabled and after MAP connection, following are the observation: By default, iPhone will always send following 'message_list_count' as a response for 'GetMessageListing' procedure. message_list_count = 10 from 'inbox' message_list_count = 0 from 'sent' message_list_count = 0 from 'outbox' message_list_count = 0 from 'deleted' Now, with Active MAP connection between iPhone(MAP MSE) & DUT(MAP MCE). message_list_count in the 'inbox' folder gets updated when a new message is being received from a remote party to DUT. Example: From a different mobile device try to send a SMS to MAP MSE and then do message listing for 'inbox' folder, we should see 'message_list_count’ as 11. Similarly, message_list_count in 'sent' folder gets updated, when a new message is being sent from DUT(MAP MCE) to remote party and message being delivered successfully to remote party. Example: From DUT try to push a SMS message to remote party(with valid remote mobile number) and then do message listing from 'sent' folder, we should see 'message_list_count = 1'. Similarly, message_list_count in 'outbox' folder gets updated, when a new message is being sent from DUT(MAP MCE) to remote party and the message is NOT delivered to remote party. Example: From DUT try to push a SMS message to remote parity(with invalid/incorrect remote mobile number) and then do message listing from 'outbox' folder, we should see 'message_list_count = 1'. The 'message_list_count' in 'deleted' folder gets updates, when a message status is being updated from DUT(MAP MCE) via 'BT_map_mce_set_message_status()'. Just wanted to confirmed, if the above observations are ok.
Posted
by Anil1.
Last updated
.
Post not yet marked as solved
73 Replies
51k Views
Hi, I am an application developer for Mac. Our application uses bluetooth to connect to our hardware devices. Since the upgrade to MacOS 12.0.1 Monterey Bluetooth is broken customer wide. Hence pairing works but our driver cannot connect (code worked for MacOS 10.7 - 11.3). The internet reports a lot of Bluetooth issues related to Broadcom BT on Monterey and the Bluetooth Framework has changed significantly by Apple. Where can I find detailed information about Apple's Bluetooth changes ? Should I just wait until Apple fixes this from their side ? Any other guidance is appreciated. Thank you?
Posted
by pkiman.
Last updated
.
Post not yet marked as solved
0 Replies
815 Views
I'm currently developing an app that requires detecting Bluetooth connections and disconnections in cars. During testing, I've observed the following behavior: In certain vehicles, only a Bluetooth connection via the car's hands-free system is available. In these cases, the device initiates a call to itself, which is then displayed on the vehicle's infotainment system. In some of the tested vehicles, this self-call is brief and only occurs during the device's connection or disconnection process. However, in other vehicles, the self-call remains visible throughout the entire duration of the device's pairing with the car's Bluetooth system. This blocked call blocks the entire infotainment system and causes the connection/disconnection observers in my app to stop functioning as expected. I'm looking for a solution or preventative measures to address this issue. Any guidance would be greatly appreciated. Here is a snippet of my code: `func audioSessionSetup() { do { resetAudioSession() let audioOptions: AVAudioSession.CategoryOptions = [.duckOthers, .allowBluetooth, .defaultToSpeaker] try audioSession.setCategory(.playAndRecord, mode: .spokenAudio, options: audioOptions) registerNotifications() try audioSession.setActive(true) print("audioSession is active") } catch let error as NSError { print("Failed to set the audio audioSession category and mode: \(error.localizedDescription)") } } /// Reset the audio session to deactivate it. func resetAudioSession() { do { try audioSession.setActive(false, options: .notifyOthersOnDeactivation) } catch let error as NSError { print("Failed to reset the audio audioSession, error: \(error.localizedDescription)") } } @objc func handleRouteChange(_ notification: Notification) { guard let userInfo = notification.userInfo, let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt, let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else { return } switch reason { case .newDeviceAvailable: /// Handle new device connection print("New device connected.") checkConnectionForSelectedOutput(notification) case .oldDeviceUnavailable: /// Handle device disconnection print("Device disconnected.") handleLocationServices(state: false) default: print("break") handleCategoryChange(notification) break } } private func handleCategoryChange(_ notification: Notification) { if let connectedDeviceName = getConnectedBluetoothDeviceName() { if connectedDeviceName != connectedDevice && connectedDeviceName == BluetoothUtils.getBluetoothInfo().portName { connectedDevice = connectedDeviceName checkConnectionForSelectedOutput(notification) } } else { audioSessionSetup() checkConnectionForSelectedOutput(notification) print("handleRouteChange audio session is active") } }`
Posted Last updated
.
Post not yet marked as solved
4 Replies
3.8k Views
Hello Our app has been rejected from the app store because of 1.4 Physical Harm https://developer.apple.com/app-store/review/guidelines/#safety This app is used by the users from Kenya (Only registered users). Users can log their health based self-assessment data like blood pressure, glucose level, temperature, body weight, BMI with medical hardware devices and that will be shared with specialist (Physician or Clinical) to do the diagnosis and advice subscription accordingly. Problem: We have the above features from earlier versions but with the new version update  our app got rejected from app store stated that we have violated the app stores' guidelines (1.4.1 Physical Harm - Safety) Your app connects to external medical hardware to provide medical services. However, to be compliant with App Store Review Guideline 1.4.1, you must: Provide documentation from the appropriate regulatory organization demonstrating regulatory clearance for the medical hardware used by your app Provide documentation of a report or peer-reviewed study that demonstrates your app’s use of medical hardware works as described Our app's features: AccuCheck-Instant Glucometer: CE0088 This product fulfils the requirements of the European Directive 98/79/EC on in vitro diagnostic medical devices. b) FORA-DigitalThermometer-IR21b: CE Mark for compliance with European Directive integration over Bluetooth c) FORA-OximeterPO200: CE0123 and IEC 61000-4-3 Compliant integration over Bluetooth d) FORA-Weighing Machine-W310b: IEC/EN 61010-1, IEC/EN 61326, EN 301 489-17, EN 300 328 Compliant integration over Bluetooth e) OmronBPMachine-HEM -9210T: EC & EN Compliance integration over Bluetooth Please anyone help us to resolve this issue.
Posted
by rmehla31.
Last updated
.
Post not yet marked as solved
0 Replies
660 Views
Hello, I’m looking to hire 1 or 2 iOS app developers to join our team. I’m a mechanical engineer located in Connecticut (2 hrs from New York City & Boston). I’ve been designing a consumer facing iPhone app and planning its associated business venture and launch for a while, and I am now ready to begin the coding phase and hire code writers. This opportunity would be paid, part-time work that may lead to full-time employment within our group as we prepare for app launch next year. Ideal candidates would be seasoned Swift developers and have experience coding with Bluetooth. This app will be industry disrupting and transformative with global reach. Capitalize on your hard work, experience, and talent, and reach out today to learn more! Contact me at matthewcyr1 @ gmail.com.
Posted Last updated
.