coolnameismy / BabyBluetooth

:baby: The easiest way to use Bluetooth (BLE )in ios/os ,even bady can use . 一个非常容易使用的蓝牙库,适用于ios和os
MIT License
4.74k stars 1k forks source link

连接成功后怎么发送数据呢? #221

Open hzhh110 opened 4 years ago

hzhh110 commented 4 years ago

[self.baby setBlockOnConnected:^(CBCentralManager central, CBPeripheral peripheral) { NSLog(@"设备:%@--连接成功",peripheral.name); weakSelf.linkState = BluetoothLinkState_Successful; if ([weakSelf.delegate respondsToSelector:@selector(MyBluetoothToolLink:)]) { [weakSelf.delegate MyBluetoothToolLink:BluetoothLinkState_Successful]; NSLog(@"") weakSelf.currentPeripheral = peripheral; } //停止扫描 [weakSelf.baby cancelScan]; }];