BabyBluetooth
BabyBluetooth copied to clipboard
baby.scanForPeripherals().begin().stop(10)这个方法停止搜索后,会断开所有已连接的设备
如题
stop方法调用后10秒执行`//私有方法,停止扫描和断开连接,清空pocket
- (void)babyStop { BabyLog(@">>>did stop"); [self.timerForStop invalidate]; [self resetSeriseParmeter]; self.babyCentralManager->pocket = [[NSMutableDictionary alloc]init]; //停止扫描,断开连接 [self.babyCentralManager cancelScan]; [self.babyCentralManager cancelAllPeripheralsConnection]; }` 源码中,就明确说明会断开所有的连接。