2
votes

I have a bluetooth barcode scanner whose spec says it's bluetooth 2.0, class 2. It is strange because my iPhone 5 (iOS7) could find and connect it. I thought iOS only connects BLE devices. But in my app I couldn't scan this device. I've no idea if this is because its bluetooth spec. I wish someone could give me some advices about how to connect this device in my app using CoreBluetooth or some other valid libs.

By the way my code is correct because I could find LightBlue app on another iPhone. My code is as following:

 // state is PowerOn
 [_centeralManager scanForPeripheralsWithServices:nil options:nil];
1

1 Answers

5
votes

I guess you detect it via Settings.app/Bluetooth? If that's so, that's a "classical" bluetooth device. It's not a Bluetooth Low-Energy one. If you want to connect to "classical" bluetooth device, you'll have to use ExternalAccessory.Framework. Bluetooth 4.0 contains two types of Bluetooth : Bluetooth "classical" and Bluetooth Low-Energy (as a fork). So that's why your iPhone can detect it.