Post not yet marked as solved
CABTMIDILocalPeripheralViewController is a welcome addition to iOS8 but it would be better for my app's purposes to enable discoverability automatically or at least incorporate it into the existing UI design. Is there a way to programtically replicate the functionality iof the "Advertise MIDI Service" UISwitch?
Post not yet marked as solved
Hi everyone.I'm facing a really weird issue with the ExternalAccessory framework. I've the following instruction inside my codeNSArray *accessories = [[EAAccessoryManager sharedAccessoryManager] connectedAccessories];to retrieve the Bluetooth accessories connected to my device. I know this framework only works with MFi certified peripherals and I have all the needed protocols declared inside the Supported External Accessory Protocols in my Info.plist file.This is working fine, except in one case: when I restart my iOS device and launch my test app again, the connectedAccessories method returns zero accessories, even if the peripheral is turned on and connected (in the Bluetooth settings, the accessory appears connected and the Bluetooth icon in the status bar is active).I'm currently facing this issue on iPhone 4S with iOS 9.1, but it is also replicable on other devices and iOS versions.
Post not yet marked as solved
Description:I am using NRF51822, version 11.0 of nordic BLE, I am connecting to the BLE and I want to keep the BLE connection persist in background as well. I have already enabled background mode for BLE central, Still the connection gets disconnected after 3 min when app is in background. How to keep the connection persist in background mode. Thanks in Advance.
If I understand correctly, ATT MTU size negotiation is managed by CoreBluetooth automatically and transparently. (Just in case - I'm not talking about Bluetooth 4.2 PDU size negotiation here - as far as I know, it is rarely supported).I'm not sure if / how to adjust my code to account for the actual MTU size to make communication as efficient as possible.Let's say, I want to implement duplex serial-like data exchange between two devices (at least iOS 8). As I have seen, common approach (and maybe the best one) is to have two characteristics on the peripheral : one characteristic is "notifiable", the other one - writable. The peripheral sends data to the central through notifications, the central sends data to the peripheral through the writable characteristic.The most technically useful answer that gave useful hints and highglighted possible caveats was http://stackoverflow.com/a/20321542/217823 by Justin Middleton. Is this even today, after 4 years, the most efficient way to implement BLE communication using CoreBluetooth?I have seen a suggestion to use central.maximumUpdateValueLength on the peripheral to avoid pushing more data than the central can accept. Is this value affected by the ATT MTU size? Is there any similar way for the central side also to determine actual current MTU size when writing the data to the peripheral's writable characteristic? Or I should write in safe chunks of 20 bytes and ATT subsystem will automatically collect MTU-sized messages?Also, I have heard that on some implementations you have to add a short sleep() after the first connection to give ATT subsystem some time to negotiate MTU sizes. Is this necessary for CoreBluetooth or does it happen automatically and I won't receive connection delegate calls sooner than MTU size negotiation was complete?
Post not yet marked as solved
Hello,From the app, I want to open Bluettoh settings,with iOS 9 I did use this and this worksUIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=Bluetooth")!)With iOS 10, I tested the following line and this also works:UIApplication.sharedApplication().openURL(NSURL(string:"App-Prefs:root=Bluetooth")!)Has anyone submitted an app for review with code using "App-Prefs"? I know that this is not documented, and I wonder if this is allowed.Thanks
Post not yet marked as solved
I am learning Core Bluetooth to improve my general skills and marketability for new jobs. I have written a MacOS app that acts as a CBPeripheralManager and an iOS app that acts as a CBCentralManager. I have gotten the Peripheral to stream small data chunks to the Central just fine.Now I am looking to learn how to send larger data amounts. I have seen the sample code for sending data to subscribers in chunks and am in the process of porting that to Swift. But the CoreBluetooth docs also say: "Note: Use notifications to send a single packet of data to subscribed centrals. That is, when you update a subscribed central, you should send the entire updated value in a single notification, by calling the updateValue:forCharacteristic:onSubscribedCentrals: method only once. Depending on the size of your characteristic’s value, not all of the data may be transmitted by the notification. If this happens, the situation should be handled on the central side through a call to the readValueForCharacteristic: method of the CBPeripheral class, which can retrieve the entire value." https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonPeripheralRoleTasks/PerformingCommonPeripheralRoleTasks.html#//apple_ref/doc/uid/TP40013257-CH4-SW1What I can't figure out is how to use `readValueForCharacteristic:` properly for a peridoically-updating characteristic. Is that possible, actually? I can't seem to subscribe to it to know when ot updates and then call `readValueForCharacteristic` as that endlessly tries to read the data but only gets the partial data. I tried sending an update notification from the Peripheral on one characteristic at the same time as I updated the data on a second characteristic. Then when the central gets the first characteristic update, it tries reading the second charcteristic but it gets `nil` for the value. But if I implement peripheralManager:didReceive readRequest:, and print the value of the characteristic, the Peripheral thinks it has data.I have also noticed that `readValueForCharacteristic:` also causes subscritptions to time out after 30 seconds or so, if I get this working do I need to resubscribe to services after doing it?Peripheral code is at https://github.com/natebirkholz/BluetoothTransmitter/tree/MultipleCharacteristicsCentral code is at https://github.com/natebirkholz/BluetoothTest/tree/MultipleCharacteristics
Post not yet marked as solved
Hello everyone,I' working with a Raspberry Pi Zero W (having BLE) which reads the data from a temperature sensor, and makes a notification if necessary, I want to send this notification to my application written in Swift 3 for iOS, to display an alarm on the screen for example.I've been searching almost a week on Web but I have not found a method to do this finally, in fact I'm looking for a tutorial or example reference to do this. I don't know how I can use Core Bluetooth to communicate with my Raspberry Pi. That's why I would ask you if is possible for a solution either a reference or example or tutorial or book about on this subject, asking about communication between the Raspberry Pi Zero W and iOS application in Swoft 3 via BLE protocol.Thanks in advance,
Post not yet marked as solved
I had the intention of designing an audio routing app for the iPhone. My goal was to pair my iPhone (ME344LL/A) to a computer (MBP 11,1) and send audio over Bluetooth to the iPhone.My problem is that my computer wont pair to my iPhone as an audio device. I looked into the Bluetooth profiles and it appears that if I can manually set the profile on my iPhone then my computer can pick it up.This must be possible, maybe not by default but I must be able to override the iOS defaults. Thank you for any help anyone can provide!
Post not yet marked as solved
Hi,We are developing a Bluetooth peripheral that shall interact with an iOS based device (e.g. iPhone 7). Bluetooth Classic shall be used to improve speed communication.For the peripheral, we are using the Bluetooth module RN4678 from Microchip: http://ww1.microchip.com/downloads/en/DeviceDoc/50002519A.pdfWe are developing the application using the iAP profile which is already supported by the RN4678 Module. Shall we go through the MFi Program if we are using a Module that is already MFi?Regards,Andres
Post not yet marked as solved
I know that with the release of watchOS 4, Apple Watch can now act as its own CBCentralManager for communicating with BLE peripherals. But why can't the Apple Watch be used as a CBPeripheralManager? If CoreBluetooth is now accessible, why allow access to receive BLE but not send? I have a project that currently uses WatchConnectivity to transfer motion data from the Watch to a paired iPhone, but I think that bypassing WatchConnectivity and making the Watch a BLE peripheral would improve data transfer rates significantly.Can anyone shed any light on why Apple Watch can't be a peripheral?
Post not yet marked as solved
In iOS (iPhone), how can we "forget" a paired (Classic Bluetooth) device programmatically?It seems this is not possible even with the private API (/System/Library/PrivateFrameworks/BluetoothManager.framework).Can anyone help please?It is possible to open the Bluetooth settings progammatically:https://stackoverflow.com/questions/5655674/opening-the-settings-app-from-another-appHow possible is it to access the paired (Classic Bluetooth) devices from Bluetooth Settings and subsequent "forget" one?Many thanks.
Post not yet marked as solved
We are building an IoT app where central is iPhone app and peripheral is our own hardware. I have read in bluetooth design guidelines documenation that current time service is implemented interally by iOS. We were not able to read the characterstic value for Current Time Service(0x1805) through peripheral.Here are the steps we are following1) Scan for peripherals from central(iOS app)2) Connect the Peripheral(IoT) device to Central (iOS app)3) Once the Peripheral is connected, we tried to access Current Time Service(0x1805) characterstic value and we get error.4) We are able read and write from/to Peripheral.Do Central(iOS app) or Peripheral(IoT) device need to enable anything to access current time service?
Post not yet marked as solved
I have ELD hardware with BLE Profile (V4.0) I want to connect through SPP is it possible in iOS?1. If possible do we require to enroll with MFi Program?2. If not possible with SPP is there any other way to do?
Post not yet marked as solved
Is it possible to pair a non health (custom service) BLE device to an Apple watch. I am able to connect and communicate with the device via CoreBluetooth when pairing is disabled, but when pairing is enabled, connection seems to be refused. Best regardsAnders
Post not yet marked as solved
Dear friends,I am creating an App, that prints to thermal printer over Bluetooth (BLE) connection. I am able to print images, but printing is very slow and images have lines in it.I am creating a single data packet, which includes printer command (standard ESC/POS commands) and image data and printing it using this method:writeValue: forCharacteristic: type:I have observed that when I print same data using socket connection (to a wifi printer), it prints correctly.Please suggestThanks,Dipak
Post not yet marked as solved
Hello,I strictly want to transmit a uuid while in the background without making any 2-way communication or connections.I am working on a phone application where the phone will be advertising a BLE IBeacon. This advertising needs to continue when the app is in the background. Reading the documentation there is not a whole lot of information about advertising beacons. The majority of the content is about scanning and ranging. Is there anyone else out there that is using the Phone as a BLE IBeacon to advertise in the background while in an advertise mode and not in a connected mode? Will it be possible to advertise an ibeacon in the background with no limitations when not connected to another device?Cheers!Kevin
Post not yet marked as solved
I have a Nordic nRF52 based BLE device and have programmed it to be a HID gamepad. I have tested this HID gamepad hardware with non-Apple smart devices over BLE and it works well. The hardware will pair and connect to iOS (iPhones) devices but there is no response of the device. It is as if the Apple iOS devices are ignoring all communication from my HID gamepad device. Also if I program my hardware to be HID keyboard or a HID mouse, everything works fine with the same iOS devices.Can you tell me what is needed in my hardware / firmware to support HID gamepad over BLE?
Post not yet marked as solved
Hello,I am trying to write a WatchOS app that runs as a Bluetooth central in the background. I added 'UIBackgroundModes' value 'bluetooth-central' but when I try to upload to TestFlight I get an error:"Missing entitlement. watchOS extension '<my app name>' uses 'UIBackgroundModes' value 'bluetooth-central' without the required entitlement 'com.apple.developer.bluetooth-central-background' signed into the bundle."I tried adding this entitlement manually as it wasn't in the available list but then XCode complains it can provision with that entitlement in there.Has anyone successfully made this work or does CoreBluetooth just not work in the background for WatchOS?Thank you for your time.
Post not yet marked as solved
HiWe are starting to build our own BLE device. We intend to send some simple commands to any smartphone through BLE like:Next music.Previous music.Play/Pause music.Start the smartpone voice assistant (Siri for instance).In short:Which Bluetooth or BLE profile should we use to start Siri thanks to a BLE device that doesn't own neither MIC neither speakers ?To be able to start Siri from a Bluetooth or BLE device, is there any MFI requirements (HW or SW)?Is there any procedure or guidance to start Siri from BLE device that doesn't embed its own MIC?You will find more details on what we have tried to do below:Our device doesn't have neither speakers, neither MIC, so Siri has to get the voice flow from the smartphone MIC, not from the device that asked to start Siri. From our point of view it seems that the best BLE profile that match our needs is the HID over BLE. Am I right or am I missing something ?The HID (over GATT BLE profile) has a command that allow to start Siri (refer to this website):Usage ID: 0xCFUsage Name: Voice CommandUsage Type: OSCSo it seems to be a good lead, but from now we didn't succeed to start Siri with this command. Do we need to implement any kind of MFI certification software or hardware (Apple Authentication Coprocessor v2.0c)?Is there any kind of procedure or guidance to be able to start Siri from a BLE HID device?Thank you in advance,Best regards,Yoan
Post not yet marked as solved
Hi,I am trying to figure out to see if there's a way that I don't need to prompt user to enter the password, but to send password programmatically.Example:1. Device has a pre-shared key of 12342. My app attempts to pair with the device with 1234Ideal Result:- User does not need to input password of 1234. The app handles the password entering and then it's pairedCurrent:- If I try to pair new device, I will always a pop-up that asks the user to enter the password 1234Thanks!