0

I have a few questions regarding coreBluetooth that I am not sure about

If I implement a CBCentralManager on an iOS device and run "ScanForPeripherals" using nil as my CBUUID tag will I be able to detect other phones with bluetooth on? Or does it have to be a bluetooth accessory advertising?

Does CoreBluetooth only detect devices implementing Bluetooth Low Energy?

In order to detect a peripheral object using CoreBlueTooth do you have to implement code for a peripheral and test run it on another device?

Thanks

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user2076774
  • 405
  • 1
  • 8
  • 21

2 Answers2

4

-Setting "nil" will give you all Bluetooth devices advertising.


-Yes a Bluetooth accessory advertising will be listed.


-For Phone to be listed, it must act as a peripheral & thus it can advertise, this you can accomplish by using iOS app like "LightBlue" (provided that Phone has Bluetooth 4.0).

manojdeshmane99
  • 206
  • 3
  • 10
  • +1 , But about his last question , he must implement peripheral application separately , there are some sample code for that in apples side . – V-Xtreme Nov 15 '13 at 06:11
  • I'll had that as described in the documentation `CoreBluetooth.framework` is only for Bluetooth Low-Energy. Classical Bluetooth works with `ExternalAccessory.framework` but must be paired before with Settings.app. – Larme Nov 15 '13 at 10:00
  • Are you able to simultaneously connect to multiple peripheral BLE applications? – user2076774 Nov 18 '13 at 01:46
0

Just use https://github.com/DavidSahakyan/LGBluetooth

    [[LGCentralManager sharedInstance] scanForPeripheralsByInterval:4
                                                         completion:^(NSArray *peripherals)
     {
         if (peripherals.count) {
             [self testPeripheral:peripherals[0]];
         }
     }];
l0gg3r
  • 8,864
  • 3
  • 26
  • 46