if (self.deviceInfoCha ==nil) {
return;
}
+ if(self.curentPeripheral.state == CBPeripheralStateDisconnected){
+ [self showLog:@"蓝牙已经断开连接"];
+ [self disconnected];
+ return;
+ }
[self showLog:[NSString stringWithFormat:@"向蓝牙设备发送数据 %@\n%@",self.deviceInfoCha,data]];
if (self.productType == AiMouseProductType_tlw) {
}
- (void)disconnected{
+ self.connectStateCallBack(@"",false);
self.curentPeripheral = nil;
+
}
@end
if ([DeviceManger shared].isConneted) {
[self geviceInfoAction];
}
- [self performSelector:@selector(getDeviceIinfo) withObject:nil afterDelay:1];
+ [self performSelector:@selector(getDeviceIinfo) withObject:nil afterDelay:5];
}
@end