iOS蓝牙中央管理器

时间:2014-02-09 23:24:58

标签: ios bluetooth bluetooth-lowenergy core-bluetooth cbcentralmanager

我在iPhone上试用iOS蓝牙中央管理器。

- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
    // Determine the state of the peripheral
    if ([central state] == CBCentralManagerStatePoweredOff) {
        NSLog(@"CoreBluetooth BLE hardware is powered off");
    }
    else if ([central state] == CBCentralManagerStatePoweredOn) {
        NSLog(@"CoreBluetooth BLE hardware is powered on and ready");
    }
    else if ([central state] == CBCentralManagerStateUnauthorized) {
        NSLog(@"CoreBluetooth BLE state is unauthorized");
    }
    else if ([central state] == CBCentralManagerStateUnknown) {
        NSLog(@"CoreBluetooth BLE state is unknown");
    }
    else if ([central state] == CBCentralManagerStateUnsupported) {
        NSLog(@"CoreBluetooth BLE hardware is unsupported on this platform");
    }
}

它始终是硬件不受支持的选择。

此外,我能够通过蓝牙在Android手机之间发送图片,但是当我尝试发送到我的iPhone时,它被拒绝了。 iOS蓝牙是封闭的吗?它不适用于其他蓝牙设备?

1 个答案:

答案 0 :(得分:3)

听起来你的iOS设备不支持低功耗蓝牙。

唯一受支持的iOS设备是iPhone 4S,iPhone 5,iPhone 5c,iPhone 5s,iPad 3rd Gen,iPad 4th Gen,iPad air,iPad mini和iPod Touch 5th Gen(以及更新的设备)。