2

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];
Cheng
  • 23
  • 4

1 Answers1

5

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.

Larme
  • 24,190
  • 6
  • 51
  • 81
  • Thank you! I do detect it via Settings. So if I use `ExternalAccessory.Framework`, will Apple allow my app to publish through App Store? – Cheng Nov 15 '13 at 11:29
  • YES. There are plenty of applications working with `ExternalAccessory.framework` on the AppStore. I developed a few ones for clients. Well, you'll still have to pass through validation and all the other guidelines. If you sell the other product, you'll have to get a MFI first (for "classical" Bluetooth devices). – Larme Nov 15 '13 at 11:46
  • @Larme, i know this is a old question, but do you know if there are any BLE Barcode scanners out here? I'm using KOAMTEC at this moment, but i would rather have something vendor in-depending. – Roger Jul 09 '15 at 08:35