core-bluetooth

Not able to scan Through CBCentral Manager with service ID for iBecon Signal

走远了吗. 提交于 2019-11-29 16:32:58
Working on iBecon signal using Core Bluetooth i am able to search with CBCentralManager scan optionn nil :- Shared.sharedInstance.centralManager?.scanForPeripherals(withServices: nil, options:[CBCentralManagerScanOptionAllowDuplicatesKey:true]) But when i provide my desirable service ID i.e :- Shared.sharedInstance.centralManager?.scanForPeripherals(withServices: [serviceID], options:[CBCentralManagerScanOptionAllowDuplicatesKey:true]) it never calls didDiscoverPeripheral Delegate method, I need to scan the peripheral in background mode too and according to apple documentation you need to

Re-connect bluetooth device when app is terminated by user

不羁的心 提交于 2019-11-29 14:36:41
I have a bluetooth device with a button on it. When clicking device's button, notification characteristic updating and my app shows local notification. It's that simple. I connect bluetooth device in foreground as below : var restoreOptions = [CBPeripheralManagerOptionRestoreIdentifierKey: "customIdentifier"] centralManager.connect(peripheral, options: restoreOptions) Then setted notification characteristic value is true : peripheral.setNotifyValue(true, for: notificationCharacteristic) When notification characteristic update, app shows local notification : func peripheral(_ peripheral:

iOS Bluetooth BLE security and “Just works” association model

狂风中的少年 提交于 2019-11-29 14:17:21
问题 According to this document and this whitepaper, there are security measures designed to prevent passive eavesdropping a Bluetooth BLE connection. Is there a way to implement the secure connection between an iOS central manager and a peripheral device? Specifically, I'm looking to implement "Just works association model". I want to know if it is possible with an iPhone. 回答1: EDITED: According to the table under Step 4 in this link, because your Central (smartphone) has both Keyboard and

How to get Mac Address From CBPeripheral And CBCenter

巧了我就是萌 提交于 2019-11-29 11:00:35
I need to take target mac address from input connection and outgoing connection from CBPeripheral And CBCenter. identifier dose not define in them. look was remove from iOS 7. Is there any other way? https://developer.apple.com/library/prerelease/ios/documentation/CoreBluetooth/Reference/CBPeripheral_Class/index.html You can't get the MAC address for a CBPeripheral but you can get the identifier property, which is a UUID that iOS computes from the MAC amongst other information. This value can be safely stored and used to identify the same peripheral in the future on this particular iOS device.

iOS 6 - Bluetooth LE disconnect

社会主义新天地 提交于 2019-11-29 06:59:44
Ok what the heck is up with iOS6 and how it handles Bluetooth LE disconnections? Before the device would disconnect immediately but now, for some strange reason, the device waits to disconnect for about 30-60 seconds. I need it to disconnect ASAFP! I've been searing all over the internet trying to figure out how to initiate an immediate disconnection from the peripheral and I found this nifty email that explains a workaround is to unsubscribe from notifications on the service characteristics. Now I think I'm doing that.. When I want to disconnect I call [connected_device setNotifyValue:NO

iOS playing audio to multiple bluetooth devices concurrently [closed]

时间秒杀一切 提交于 2019-11-29 06:23:14
问题 I've got some bluetooth speakers (similar) and would really like to be able to play to more than one of them concurrently however I can't find a way to do it. I can deploy my own applications so it doesn't necessarily have to be accomplished through public APIs, but does the iPhone hardware support it? 回答1: You can connect to multiple speakers, but only play to one at a time. There isn't enough bandwidth in BT to really send two high quality stereo streams at the same time. Also, I don't

Bluetooth framework for older iOS devices

霸气de小男生 提交于 2019-11-29 05:14:55
My question is related with Bluetooth technology around iOS. I've watched WWDC about Bluetooth Low Energy 101, what's new, the basics etc, and about using the CoreBluetooth framework available in iOS 5 and later. I've looked through different sites and documentations trying to find more information about Bluetooth 2.1 and 4, but there is so few. GameKIt is not an answer, I am developing an app to work with an non-iOS device. Some of the topics I've went through: Connecting to a Bluetooth device from iOS, no MFi iOS - How to integrate bluetooth devices in my app http://www.bluegiga.com/files

How get the list of paired bluetooth devices in swift?

风格不统一 提交于 2019-11-29 04:12:50
I need to get the list of paired bluetooth devices(iOS Devices) as same as the list in 'Bluetooth' section in iOS settings as shown in below picture. Is it possible? Have you seen any apps doing this type of functionality? I have tried the following: link1 , link2 , link3 , link4 , link5 , link6 But nothing helped me clearly to get the exact list. I hope there should be a way to achieve this. Please help me by sharing your experience. Thank you. It's not possible to retrieve list of paired peripherals from iOS. Neither it's possible to check if specific peripheral is paired. Retrieving

iOS Core Bluetooth Not asking for Pair

丶灬走出姿态 提交于 2019-11-29 03:50:23
In My recent project, I need to communicate a Hardware (Bluetooth Low energy).I have implement all the delegate methods code. I am able to Connect hardware and device, But I am not getting pairing alert (Attached screen shot). Why not it is asking for pairing? Thank you. #import "BTWCentralConnectionManager.h" @implementation BTWCentralConnectionManager @synthesize cbcManager; @synthesize discoveredPeripheral; @synthesize findMeServiceCharacteristic; @synthesize findMeService; @synthesize delegate=_delegate; static NSString *kFindMeServiceUUID=@"1802"; static NSString

iOS CoreBluetooth : centralManager:didConnectPeripheral / didFailToConnectPeripheral: not getting called

做~自己de王妃 提交于 2019-11-29 03:01:47
I'm pulling my hair out of this problems. I'm trying to connect to BLE devices , can't see what I've done wrong in my code below. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. _cm = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } + (NSString*)UUIDString:(CFUUIDRef)uuid { CFStringRef string = CFUUIDCreateString(NULL, uuid)