Write value formatting #449
Replies: 4 comments 4 replies
-
Saw an example like this. Is this correct way to do it?
|
Beta Was this translation helpful? Give feedback.
-
You can construct numbers directly from hex values in JavaScript. In theory, what you need is as simple as:
(using the |
Beta Was this translation helpful? Give feedback.
-
buf2hex looks like it just took the dataview.buffer and removed the spaces. |
Beta Was this translation helpful? Give feedback.
-
Well,
|
Beta Was this translation helpful? Give feedback.
-
Newbie question. A chinese mfg told me to write a command from my app to the watch in these exact words:
The APP write 0xD0 command to the watch via the UUID F0080003, and the parameter configuration = 0x01.
Full command: 0xD001
service:F0080001-0451-4000-B000-000000000000
write characteristic:F0080003-0451-4000-B000-000000000000
value:0xD001
My question is how do I format this value as a DataView to write it using the write function?
await BleClient.write(device.deviceId, srv, char, value??)
Beta Was this translation helpful? Give feedback.
All reactions