core-bluetooth

How to connect Android device to an iOS device over BLE (Bluetooth Low Energy)

穿精又带淫゛_ 提交于 2019-11-28 15:15:45
I'm trying to make an application which uses the new Bluetooth Low Energy API of Android. For this, I started with the BLE sample coming with API level 18 . As I read that Android can not act as a Peripheral, I put the Android phone in central mode, scanning for BLE devices around it. For this purpose, I made some testing with a Nordic Platform simulating a Heart Sensor. Everything works in a perfect way! After this, I try to pick an iPhone (iOS 7 beta 4) and put it in a Peripheral way and simulating a Heart Rate sensor as the previous testing. The Android app is able to see the device and

Why use coreBluetooth connectPeripheral did not call delegate methods in IOS8

江枫思渺然 提交于 2019-11-28 12:03:49
I want use CoreBluetooth.framework in IOS8 to achieve data transfer, i did discover peripheral in the follow method and try connect the peripheral. - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { NSLog(@"Discover name : %@", peripheral.name); [self.centralManager connectPeripheral:peripheral options:nil]; } But it did not call the delegate methods didFailToConnectPeripheral or didConnectPeripheral , I waner what's wrong with it, is the code error or IOS8 need some

iOS how to discover bluetooth headset and its events

白昼怎懂夜的黑 提交于 2019-11-28 11:45:13
问题 I am trying to discover "Bluetooth Headset" and get its events. I read the "CoreBluetooth" documentation and implemented sample code as below. It does not fire the delegate method ' didDiscoverPeripheral '. Is there any solution for this? Code: CBCentralManager *myCentralManager; [myCentralManager scanForPeripheralsWithServices:nil options:nil]; -(void)centralManagerDidUpdateState:(CBCentralManager *)central{ //following line prints CBCentralManagerStatePoweredOn NSLog(@"state:%@", [self

Does blued cache ATT values, and how to clear the cache?

我是研究僧i 提交于 2019-11-28 11:44:29
I am trying to find any workarounds for a Bluetooth LE bug on OSX . In particular, I want to know where OSX goes wrong in reading the Bluetooth LE GATT table. Thus, I am viewing the L2CAP packets in PacketLogger from Hardware IO Tools for XCode . When I use Bluetooth Explorer to connect to the Bluetooth LE device, I am expecting to see 3.4.4.9 Read By Group Type Request (uuid=0x2800 «Primary Service», startingHandle=0x0001, endingHandle=0xffff) to discover primary services (or Find By Type Value Request (uuid=0x2800, value:uuid of service)), followed by 3.4.4.1 Read By Type Request (uuid

Obtaining Bluetooth LE scan response data with iOS

泄露秘密 提交于 2019-11-28 10:26:33
I am working with Bluetooth Low Energy devices, and I was wondering whether it is possible to read the Scan Response Data to an advertisement with iOS and Core Bluetooth without connecting. I understand that after reading an advertisement packet, you can request additional data from the peripheral in the format of a 31 byte scan response. I know that Core Bluetooth suggests that if the ad packet is full, you can put the local name in the scan response packet, but does it allow you to see the whole packet? Yes, you can use CoreBluetooth to read the full manufacturer data or service data bytes

Turning bluetooth radio back on after the app is suspended doesn't call centralManagerDidUpdateState

♀尐吖头ヾ 提交于 2019-11-28 09:52:18
问题 My app connects with a low energy peripheral when the peripheral goes out of range, I get didDisconnect method callback, I simply call connect on the peripheral and whenever it comes back into range it connects. Even in the background, if the app is suspended the by the iOS but since I have a pending connection, it wakes the app up and connects. However, if the user turns the Bluetooth off, all the peripherals go into disconnected state, hence no pending connection remains. If the app is

Re-connect bluetooth device when app is terminated by user

廉价感情. 提交于 2019-11-28 08:30:48
问题 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

iOS CoreBluetooth / iBeacon: Advertise an iBeacon and a peripheral service concurrently

好久不见. 提交于 2019-11-28 08:24:41
I'm writing an application for iOS that requires that the application advertise both an iOS iBeacon as well as advertise peripheral service concurrently. It's necessary that the service is advertised rather that simply discoverable on the peripheral because the use case requires the central (in BLE parlance) connect to the peripheral after being woken up by iOS (but still in the background) due to proximity to the iBeacon. Apps running in the background on centrals can only discover peripheral by available service rather than discovering all peripherals [] ; My code works to advertise either

Bluetooth connection between 2 iOS devices

懵懂的女人 提交于 2019-11-28 06:33:49
I am trying out Core Bluetooth framework introduced in iOS 5.0. According to many threads ( one of many ) on StackOverflow itself: Core Bluetooth framework can be used to communicate with ANY hardware, which has Bluetooth Low Energy (4.0) hardware support. We can forget about Made For iPhone/iPod (MFI) program, if you are using Core Bluetooth technology. I have an iPhone 5, iPhone 4S, Google Android Nexus 7 with me, and I am sure at least first 2 has hardware support for BLE. My Question is Well, I tried below given code on my iPhone 4S/iPhone 5, but it failed to scan and find the iPhone5

Peripheral and central at the same time on iOS

跟風遠走 提交于 2019-11-28 06:32:23
I've looked everywhere and tried everything , but nothing seems to work :( On iOS, I'm making an app (for iOS 6 and above) in which iOS devices need to exchange data. Therefore, both devices need to be peripheral and central at the same time. I've done exactly as specified in the WWDC video, but the devices can't connect successfully with each other. When I make one device only central and the other only peripheral, the central connects seamlessly to the peripheral. However, when both devices are peripheral and central at the same time, I get random errors: at any stage (discovering services