IOBluetooth

RSS for tag

Gain user-space access to Bluetooth devices using IOBluetooth.

Posts under IOBluetooth tag

190 Posts

Post

Replies

Boosts

Views

Activity

IOBluetoothDevice registerForConnectNotifications callbacks not working (no callbacks) when process run as daemon/root under Sonoma (works on Ventura)
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; }
6
0
1.7k
Oct ’23
Voice Control does not work with any connected bluetooth devices
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.
0
1
678
Sep ’23
Bluetooth Device Implementation
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.
1
0
900
Sep ’23
Multipeer Connectivity between two iPads and bluetooth pairing between two iPads not working
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.
0
0
1k
Sep ’23
Pairing for MFi
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!
0
0
790
Aug ’23
iOS supported profiles
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
2
0
10k
Aug ’23
Using Bluetooth microphone while controlling audio with A2DP profile.
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.
0
0
1.1k
Jul ’23
iPhone 12 does not detect device while scanning for bluetooth devices
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?
2
1
1k
Jul ’23
iOS Health Application Bluetooth Data Transfer - Background Processing Issue
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.
1
1
1.5k
Jul ’23
Code=14 "Peer removed pairing information"
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
0
1
1.7k
Jun ’23
Bluetooth MAP Behavior with iPhone.
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.
1
0
1.3k
Jun ’23
MacOS 12.0.1 Monterey Bluetooth issues
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?
82
9
59k
Jun ’23
AVFoundation - Visible call on the vehicle's infotainment system when connecting to Bluetooth.
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") } }`
0
0
1k
May ’23
App Coding Job Opportunity
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.
0
0
822
May ’23
Help in certificate my product
I plan made certificate my product called EB01 for apple. I have a trouble with grouping EB01 in to one of categories from Accessory Interface Specification. EB01 is a bluetooth module (precisly BM64 from Microchip) that enables send music and custom data beetwen phone and amplifiers (EB01 is a plug and play extension pcb to our amplifers). So the input to EB01 is a bluetooth connection, and output is digital data with music and custom raw data (like uart). We plan to desging app for iphone to control our amplifers by this custom data. From above descriptive what device in Accessory Interface Specificationi can assign to my device? BM64 also supprot iap protocol.
0
0
812
Apr ’23
Iphone blue tooth fails to discover devices
Prior to IOS 14 this functioned well with multiple types of devices (JBL speakers, headsets, computer) on both our iPhones. Now, and with having tried all the recommended fixes, they no longer discover these. The iPhone may discover each other but the connection fails. Does connect to AirPods but now always needing pairing and with many fails before. It's a useful feature and a deal breaker for my next choice of personal device so, let me know how soon this can be resolved. The response clock is ticking.
1
0
1.6k
Apr ’23
IOBluetoothDevice registerForConnectNotifications callbacks not working (no callbacks) when process run as daemon/root under Sonoma (works on Ventura)
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; }
Replies
6
Boosts
0
Views
1.7k
Activity
Oct ’23
Voice Control does not work with any connected bluetooth devices
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.
Replies
0
Boosts
1
Views
678
Activity
Sep ’23
Bluetooth Device Implementation
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.
Replies
1
Boosts
0
Views
900
Activity
Sep ’23
Multipeer Connectivity between two iPads and bluetooth pairing between two iPads not working
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.
Replies
0
Boosts
0
Views
1k
Activity
Sep ’23
Pairing for MFi
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!
Replies
0
Boosts
0
Views
790
Activity
Aug ’23
iOS supported profiles
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
Replies
2
Boosts
0
Views
10k
Activity
Aug ’23
Using Bluetooth microphone while controlling audio with A2DP profile.
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.
Replies
0
Boosts
0
Views
1.1k
Activity
Jul ’23
iPhone 12 does not detect device while scanning for bluetooth devices
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?
Replies
2
Boosts
1
Views
1k
Activity
Jul ’23
iOS Health Application Bluetooth Data Transfer - Background Processing Issue
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.
Replies
1
Boosts
1
Views
1.5k
Activity
Jul ’23
Code=14 "Peer removed pairing information"
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
Replies
0
Boosts
1
Views
1.7k
Activity
Jun ’23
Bluetooth MAP Behavior with iPhone.
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.
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’23
MacOS 12.0.1 Monterey Bluetooth issues
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?
Replies
82
Boosts
9
Views
59k
Activity
Jun ’23
register notification not working with thread in M1 chip , the same works for intel chip
created a separate thread for registering notification for bluetooth new device, but the notification callback is never called (sometimes does but mostly not).The same code works smoothly on intel chip.
Replies
0
Boosts
0
Views
846
Activity
Jun ’23
AVFoundation - Visible call on the vehicle's infotainment system when connecting to Bluetooth.
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") } }`
Replies
0
Boosts
0
Views
1k
Activity
May ’23
What happened to the device status prompt "Ineligible for 14 days"?
What happened to the device status prompt "Ineligible for 14 days"?
Replies
1
Boosts
0
Views
2.2k
Activity
May ’23
App Coding Job Opportunity
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.
Replies
0
Boosts
0
Views
822
Activity
May ’23
Help in certificate my product
I plan made certificate my product called EB01 for apple. I have a trouble with grouping EB01 in to one of categories from Accessory Interface Specification. EB01 is a bluetooth module (precisly BM64 from Microchip) that enables send music and custom data beetwen phone and amplifiers (EB01 is a plug and play extension pcb to our amplifers). So the input to EB01 is a bluetooth connection, and output is digital data with music and custom raw data (like uart). We plan to desging app for iphone to control our amplifers by this custom data. From above descriptive what device in Accessory Interface Specificationi can assign to my device? BM64 also supprot iap protocol.
Replies
0
Boosts
0
Views
812
Activity
Apr ’23
Looking to Hire Developer
I have an app project that I'm trying to get off the ground, and I'm looking to hire a developer or team of developers to write the code for the app. The app will require communication with the latest versions of Bluetooth. Any suggestions on where to find developers for this? Is anyone here interested in learning more about the project?
Replies
0
Boosts
1
Views
709
Activity
Apr ’23
macOS 13 and BLE5 2mbps PHY
Does macOS (not iOS) support the BLE5 2mbps PHY? I'm trying to do BLE5 streaming to an iMac and cannot see to enable the 2mbps phy during negotiation. Also not finding anything in the forums for macOS and BLE5. Thank you.
Replies
2
Boosts
0
Views
1.1k
Activity
Apr ’23
Iphone blue tooth fails to discover devices
Prior to IOS 14 this functioned well with multiple types of devices (JBL speakers, headsets, computer) on both our iPhones. Now, and with having tried all the recommended fixes, they no longer discover these. The iPhone may discover each other but the connection fails. Does connect to AirPods but now always needing pairing and with many fails before. It's a useful feature and a deal breaker for my next choice of personal device so, let me know how soon this can be resolved. The response clock is ticking.
Replies
1
Boosts
0
Views
1.6k
Activity
Apr ’23