hnu-digihealth / sensorframework-bluetooth-low-energy-client

Bluetooth Low Energy Capacitor Plugin
MIT License
20 stars 9 forks source link

Writing value #14

Open AdrienFery opened 3 years ago

AdrienFery commented 3 years ago

Hello,

I would like to write a value using FITNESS_MACHINE_CONTROL_POINT Characteristics but I don't understand why the value should be a string, I would better understand if it would be a Uint8Array. Moreover, I see that the value is converted to a Uint8Array using TextEncoder.

Should I use it like that:

.write( BluetoothGATTServices.FITNESS_MACHINE, BluetoothGATTCharacteristics.FITNESS_MACHINE_CONTROL_POINT, String.fromCharCode(5) + String.fromCharCode(130))

Thanks,