I have been trying to setup my encodeDownlink to send a hexvalue to my lora device.
This is the payload I am trying to send:
{
“queueItem”: {
“confirmed”: true,
“data”: “65BC88E0”,
“fCntDown”: 0,
“fPort”: 10,
“id”: “”,
“isPending”: false,
“object”: {}
}
}
I am trying to convert that data string into byte values, for instance: [101, 188, 136, 224], but nothing really seems to work, the value always gets put into the downlink as something completely else, or I get the error :
{
“code”: 13,
“message”: “Exception generated by quickjs: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object\n at from (buffer:167)\n at (buffer:179)\n at encodeDownlink (eval_script:134)\n at (eval_script:150)\n”,
“details”: []
}
I read that removing the object helps, but I have found no such luck, however if I remove the object it seems I can access the fPort, which it seems I cant do if it is present