core-bluetooth

Is it possible to connect iOS and android device using Bluetooth?

坚强是说给别人听的谎言 提交于 2019-11-30 07:37:29
I have to make an application to pair an iOS and Android device (iPhone 5, iPad 3, Galaxy S3, Nexus 7 they all use Bluetooth 4.0) and then send data to each other. Is this amount of data limited ? Can we send something like a photo or a PDF? I've already done the pairing and sending data between 2 iOS devices using CoreBluetooth and the sample code from Apple BTLE_Transfer Of what i understood, a Peripheral (Server) can Advertise to a Central (Client). This central is scanning around itself, and then try to find the Server by looking for the UUID of the service advertised. When i make a Server

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

∥☆過路亽.° 提交于 2019-11-30 07:23:03
问题 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

Can iOS do central and peripheral work on same app at same time?

核能气质少年 提交于 2019-11-30 06:23:30
问题 Can iOS (iPhone or iPad) app have Core Bluetooth (BTLE) central manger and peripheral manager objects at same time? Can they operate asynchronously, or does main app thread need to make them share (switch back and forth). Sharing conceptual algorithm would be: disable peripheral manager, enable central manager and do central functions, and then, disable central mgr, enable peripheral mgr, and do peripheral functions (that is, send automatic nofications, and wait for and respond to remote

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

狂风中的少年 提交于 2019-11-30 06:13:09
问题 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

How many devices we can pair via Bluetooth to iPhone?

可紊 提交于 2019-11-30 04:55:46
Can anyone tell me how many devices can we pair via Bluetooth to iPhone at a time..need help..till now i have not got the exact number. As it stands in iOS 6.1.4, the current limit for Bluetooth Low Energy devices is 10 simultaneous CONNECTIONS (at least on the NRF8002 chipset). Although the BLE spec says it can in theory have an infinite number of connections, the connection will time out when you try to add an 11th device. As for the pairing table, I've previously had two additional a2dp devices in my pairing table(not connected) and 10 current BLE connections as the maximum. So that is a

How to turn CBUUID into string

只谈情不闲聊 提交于 2019-11-30 03:46:38
I can't find any official way to get a UUID string back out of a CBUUID. These UUIDs can be 2 or 16 bytes long. The goal is to store CBUUIDs in a file somewhere as a string, and then resurrect with [CBUUID UUIDWithString:] etc. Here is what I have so far. // returns a simple 4 byte string for 16bit uuids, 128 bit uuids are in standard 8-4-4-4-12 format // the resulting string can be passed into [CBUUID UUIDWithString:] +(NSString*)CBUUIDToString:(CBUUID*)cbuuid; { NSData* data = cbuuid.data; if ([data length] == 2) { const unsigned char *tokenBytes = [data bytes]; return [NSString

Wake up ios app when a bluetooth device is near by

对着背影说爱祢 提交于 2019-11-30 02:15:25
问题 I am running core bluetooth in the background to scan for a device. It works fine, and pretty much stops when i QUIT the app manually. Apple docs state that the app can be woken up by the peripheral sometimes, and this may bring it from suspended state for about 10 seconds or so, do some operation and then go back to suspended. Source: https://developer.apple.com/library/IOs/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps

How can I clear the CoreBluetooth cache on MacOS?

亡梦爱人 提交于 2019-11-30 02:10:12
I'm developing a Bluetooth LE device and am having trouble because of MacOS's caching of the services. If I try to delete a service or change its UUID on the device I'm developing, the change doesn't show up on the Mac and instead I continue seeing the old list of services and UUIDs from the device. I tried going to another Mac that hadn't paired with my device and it saw the new list of services with the correct UUIDs, so it seems to be a caching issue with my development Mac. I found the com.apple.Bluetooth.plist file in /Library/Preferences and deleted it, but the system put it back with

Read data from BLE device

本小妞迷上赌 提交于 2019-11-29 19:39:18
I am trying to read data from a bluetooth device (BR-LE4.0-S2). I was able to connect BLE device, but not able to read data from it.I don't have any specification about BLE services and it's characteristics. Here what my issue is - (void)peripheral:didUpdateValueForCharacteristic:error: not getting called. I followed tutorial " https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonCentralRoleTasks/PerformingCommonCentralRoleTasks.html#//apple_ref/doc/uid/TP40013257-CH3-SW2 " .Following is my code. What my requirement is to

iOS how to discover bluetooth headset and its events

夙愿已清 提交于 2019-11-29 18:10:54
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 getCentralManagerState:central.state]); } //following method does not fire -(void)centralManager: