int WriteHex(string v, bool readResponse = true, string callbackName = null, string devName = null)

Queues a write command to send to the device.


Name Description
hexBytes string
Bytes to write, hex-encoded. For readability, you may insert spaces between any or all of the bytes: 03 0607 AABBCC DD
readResponse (Optional) bool
Pass false if a response is not expected from your command, otherwise the read will wait for a timeout, delaying subsequent commands. The default is true.
callbackName (Optional) string
A JavaScript function name that you would like KioWare to call with the result. If not specified or null, OnKioDeviceCmdResult will be called.
devName (Optional) string
Target the device via the name from the Config Tool.


On success, an incrementing number; the purpose of which is to match a particular call to a callback response. Upon failure, 0.


Trust Level Required: Full Trust


if(!KioCustomSerialDevice.WriteHex('03 AAFF', false)) console.log('Device NOT open!');


KioWare for Windows version 8.12 or greater.