delphi TBluetoothLE

时间:2015-09-28 23:42:15   收藏:0   阅读:2337

delphi TBluetoothLE、TBluetoothLEManager

1、搜索设备

BluetoothLE1.DiscoverDevices(4000);

触发事件

BluetoothLE1EndDiscoverDevices 发现蓝牙设备

2、搜索服务

BluetoothLE1.DiscoverServices(FCurrentDevice)

BluetoothLE1EndDiscoverServices  发现蓝牙设备的服务

 

3、发送数据

BluetoothLE1.WriteCharacteristic(TBluetoothLEDevice ADevice,TBluetoothGattCharacteristic ACharacteristic);

BluetoothLE1.SubscribeToCharacteristic(FBLEDevice, FHRMeasurementGattCharact);

4、接受数据

procedure BluetoothLE1CharacteristicRead(const Sender: TObject; const ACharacteristic: TBluetoothGattCharacteristic;
AGattStatus: TBluetoothGattStatus);

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!