检索在iOS中通过蓝牙连接的配对设备

Vid*_*and 10 bluetooth objective-c ios

我已连接条形码扫描仪设备

条形码扫描仪信息

我想知道它的配对状态.是否与设备连接.

- (void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
    {
        self.connectingPeripheral = peripheral;        
        NSLog(@"@@@@@@Peripheral Name is:%@ Identifier:%@ Services:%@",peripheral.name,peripheral.identifier,peripheral.services);
        [self.bluetoothManager connectPeripheral: self.connectingPeripheraloptions: nil];
}
Run Code Online (Sandbox Code Playgroud)

配对列表

我正在获取有关Mac附近并启用的信息.但我没有在此方法中获取条形码扫描仪信息.

我需要条码扫描器是否连接到设备.

任何人都可以建议如何找到条码扫描仪的连接.

感谢您的回复,谢谢.

Eir*_*k M 0

正如评论中提到的,核心蓝牙适用于蓝牙低功耗,而条形码扫描仪是蓝牙 2.1(经典)。为此,您至少必须使用 IOBluetooth。

检查IOBluetooth 框架。坏消息是苹果对蓝牙经典开发有相当大的限制,但希望你能做点什么。乍一看,我没有看到任何与核心蓝牙相当的东西。