IOBluetooth

RSS for tag

Gain user-space access to Bluetooth devices using IOBluetooth.

Posts under IOBluetooth tag

190 Posts

Post

Replies

Boosts

Views

Activity

Background Advertising Bluetooth work around with other non-iOS devices.
Before asking, I referenced this thread (https://developer.apple.com/forums/thread/652592) While the Android devices can function fully as both Central and Peripheral while an app is in both foreground and background execution modes, iOS apps are bound by restrictions that iOS has on background Bluetooth functionality. When in the background, iOS apps advertise in a proprietary advertisement format that is not part of the Bluetooth standard and thus not readable by non-iOS devices, hence it is unable to scan for other devices in any meaningful way. Any work around to this problem?
1
0
1.4k
Aug ’21
My house is not a car
I have an iPhone 12 and I paired it with a bluetooth device in my house. So when I try using my iPhone on the house, I have to click that I am not driving to open my phone. How do I change the settings to stop this? I tried the Bluetooth volume leveling setting but that has no effect. Evidently, only volume is affected and the phone does not use it for anything else. Otherwise, I have to disable the entire function.
0
0
504
Aug ’21
ios 14.6 Bluetooth disconnecting from Airpods and Beats Pro true Wireless
I have an iphone 12 pro. Since update 14.4, Bluetooth has been disconnecting randomly from my Airpods. Then when I updated to 14.6, it started happening more frequently. I thought it was my Airpods, so I bought a pair of brand new pair of Beats Pro Wireless (true wireless). It's still happening and still the most irritating thing about my apple products right now. Halp.
1
0
906
Aug ’21
Bluetooth function IOBluetoothRegisterForDeviceConnectNotifications does not work on macOS Monterey
When we try to run our code that uses the IOBluetoothRegisterForDeviceConnectNotifications function we get a "missing symbol" crash on macOS Monterey Beta 3. Was this function deprecated starting from macOS Monterey? On macOS BigSur everything is work as expected. If yes, is there any workaround or other function which can be used? P.S: a simple code was added (main.cpp.txt) main.cpp.txt
1
0
749
Jul ’21
Monterey keyboard functions fail
Same issue submitted since first Beta version 12. Have Apple bluetooth and USB keyboards. Tab will not tab from cell to cell or section to section in Excel desktop, or any online form. Space bar does not scroll pages. Rather, it opens program window to full screen zoom. Menu bar Bluetooth recognizes keyboard. Pref file can never find it. Monterey is useless without properly functioning keyboard. Tried resetting actions. No luck. Help appreciated.
0
0
607
Jul ’21
Bluetooth will not register speaker.
This is the simple code I wrote to test the Bluetooth in XCode. My intention with is this to connect to my JBL speaker to play the bell sound when I click the button. However, my JBL speaker is never picked up as a printed pname. Can anyone please help me with this? Thanks! import UIKit import CoreBluetooth import AVFoundation class ViewController: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate {       var centralManager: CBCentralManager!   var myPeripheral: CBPeripheral!   var audioPlayer = AVAudioPlayer()   override func viewDidLoad() {     super.viewDidLoad()           // Initialize central manager     centralManager = CBCentralManager(delegate: self, queue: nil)           // Audio     do {       audioPlayer = try AVAudioPlayer(contentsOf:                         URL.init(fileURLWithPath: Bundle.main.path(forResource: "bell", ofType: "wav")!))       audioPlayer.prepareToPlay()     } catch{       print(error)     }   }       func centralManagerDidUpdateState(_ central: CBCentralManager) {           // Turned on     if central.state == CBManagerState.poweredOn {       print("BLE powered on.")       central.scanForPeripherals(withServices: nil, options: nil)     }           // Not on, could be different issues     else {       print("Something wrong with BLE.")     }   }       func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String: Any], rssi RSSI: NSNumber){     // Get the peripheral.name     if let pname = peripheral.name{       print(pname)       if pname == "JBL Speaker"{         // found wanted device so stop         self.centralManager.stopScan()                   // assign it to myperipheral object         self.myPeripheral = peripheral         self.myPeripheral.delegate = self                   //         self.centralManager.connect(peripheral, options: nil)       }     }   }   // Connected   func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {     self.myPeripheral.discoverServices(nil)     print("Connected")         }       @IBAction func clickBell(_ sender: Any) {     audioPlayer.play()   } }
0
0
381
Jul ’21
Background Advertising Bluetooth work around with other non-iOS devices.
Before asking, I referenced this thread (https://developer.apple.com/forums/thread/652592) While the Android devices can function fully as both Central and Peripheral while an app is in both foreground and background execution modes, iOS apps are bound by restrictions that iOS has on background Bluetooth functionality. When in the background, iOS apps advertise in a proprietary advertisement format that is not part of the Bluetooth standard and thus not readable by non-iOS devices, hence it is unable to scan for other devices in any meaningful way. Any work around to this problem?
Replies
1
Boosts
0
Views
1.4k
Activity
Aug ’21
My house is not a car
I have an iPhone 12 and I paired it with a bluetooth device in my house. So when I try using my iPhone on the house, I have to click that I am not driving to open my phone. How do I change the settings to stop this? I tried the Bluetooth volume leveling setting but that has no effect. Evidently, only volume is affected and the phone does not use it for anything else. Otherwise, I have to disable the entire function.
Replies
0
Boosts
0
Views
504
Activity
Aug ’21
How to Change iBeacon Advertising Interval?
I'm developing a ibeacon app.  I want to change the ibeacon advertising interval. I want to slow down the ibeacon advertising interval.  But I couldn't find a way.  I am developing with Swift.  Please help me. I need your help.  Will it be impossible to change it?
Replies
1
Boosts
0
Views
865
Activity
Aug ’21
ios 14.6 Bluetooth disconnecting from Airpods and Beats Pro true Wireless
I have an iphone 12 pro. Since update 14.4, Bluetooth has been disconnecting randomly from my Airpods. Then when I updated to 14.6, it started happening more frequently. I thought it was my Airpods, so I bought a pair of brand new pair of Beats Pro Wireless (true wireless). It's still happening and still the most irritating thing about my apple products right now. Halp.
Replies
1
Boosts
0
Views
906
Activity
Aug ’21
Bluetooth RFCOMM support in iOS
Hi, I want to know if there is a roadmap for implementing RFCOMM support in iOS. We have a SOAP/Rest platform (wse.app) which makes it possible to do SOAP calls between Android and Raspberry Pi over Bluetooth/RFCOMM. When will Apple implement support for RFCOMM so I can use my iPhone and do the same ?
Replies
0
Boosts
0
Views
829
Activity
Aug ’21
Bluetooth function IOBluetoothRegisterForDeviceConnectNotifications does not work on macOS Monterey
When we try to run our code that uses the IOBluetoothRegisterForDeviceConnectNotifications function we get a "missing symbol" crash on macOS Monterey Beta 3. Was this function deprecated starting from macOS Monterey? On macOS BigSur everything is work as expected. If yes, is there any workaround or other function which can be used? P.S: a simple code was added (main.cpp.txt) main.cpp.txt
Replies
1
Boosts
0
Views
749
Activity
Jul ’21
Question on AirTags (Wayfinding)
I have AirTags on the iPhone 11, and wonder if it possible to utilize both AirTags in ONE-GO to find an item. Similar to achieving checkpoints in a racing game but instead the checkpoints are the AirTags (wayfinding).
Replies
0
Boosts
0
Views
622
Activity
Jul ’21
Monterey keyboard functions fail
Same issue submitted since first Beta version 12. Have Apple bluetooth and USB keyboards. Tab will not tab from cell to cell or section to section in Excel desktop, or any online form. Space bar does not scroll pages. Rather, it opens program window to full screen zoom. Menu bar Bluetooth recognizes keyboard. Pref file can never find it. Monterey is useless without properly functioning keyboard. Tried resetting actions. No luck. Help appreciated.
Replies
0
Boosts
0
Views
607
Activity
Jul ’21
Is it possible to connect my headphones from swift code?
I'm just starting to learn Swift, and cannot find any documentation about connecting to not BLE devices. Is it possible?
Replies
1
Boosts
0
Views
806
Activity
Jul ’21
Bluetooth will not register speaker.
This is the simple code I wrote to test the Bluetooth in XCode. My intention with is this to connect to my JBL speaker to play the bell sound when I click the button. However, my JBL speaker is never picked up as a printed pname. Can anyone please help me with this? Thanks! import UIKit import CoreBluetooth import AVFoundation class ViewController: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate {       var centralManager: CBCentralManager!   var myPeripheral: CBPeripheral!   var audioPlayer = AVAudioPlayer()   override func viewDidLoad() {     super.viewDidLoad()           // Initialize central manager     centralManager = CBCentralManager(delegate: self, queue: nil)           // Audio     do {       audioPlayer = try AVAudioPlayer(contentsOf:                         URL.init(fileURLWithPath: Bundle.main.path(forResource: "bell", ofType: "wav")!))       audioPlayer.prepareToPlay()     } catch{       print(error)     }   }       func centralManagerDidUpdateState(_ central: CBCentralManager) {           // Turned on     if central.state == CBManagerState.poweredOn {       print("BLE powered on.")       central.scanForPeripherals(withServices: nil, options: nil)     }           // Not on, could be different issues     else {       print("Something wrong with BLE.")     }   }       func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String: Any], rssi RSSI: NSNumber){     // Get the peripheral.name     if let pname = peripheral.name{       print(pname)       if pname == "JBL Speaker"{         // found wanted device so stop         self.centralManager.stopScan()                   // assign it to myperipheral object         self.myPeripheral = peripheral         self.myPeripheral.delegate = self                   //         self.centralManager.connect(peripheral, options: nil)       }     }   }   // Connected   func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {     self.myPeripheral.discoverServices(nil)     print("Connected")         }       @IBAction func clickBell(_ sender: Any) {     audioPlayer.play()   } }
Replies
0
Boosts
0
Views
381
Activity
Jul ’21