蓝牙代理报错:invalid handle error

 错误症状:

-(void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error{

    if (error) {

        JWLog(@"%@",[error localizedDescription]);

        return;

    }

    JWLog(@"updateNotification");

}

该代理抛出错误:invalid handle error

解决方法:将蓝牙重新启动,错误消失,连接正常

参考:http://stackoverflow.com/questions/25139916/setting-notifications-on-characteristic-results-in-invalid-handle-error

posted @ 2016-01-07 14:24  一夜星辰  阅读(788)  评论(0编辑  收藏  举报