randdusing / ng-cordova-bluetoothle

Angular 1.x wrapper for the PhoneGap/Cordova Bluetooth Low Energy Plugin
Other
47 stars 34 forks source link

How can I send hex? For example 0x0100 #20

Closed othmaan closed 8 years ago

randdusing commented 8 years ago

Break it down into an array of bytes so something like:

var bytes = [0x01, 0x02, 0x03, 0x04];
var value = bluetoothle.bytesToEncodedString(bytes);
var params = { value: value, address: ..., service: ..., characteristic: ... }
othmaan commented 8 years ago

Thanks a lot. I didn't know how to add a tag 'question' :)