I have a couple of RAK 7201 button pads communicating fine through chirpstack, but the codec is throwing errors. Ive used both the TTN codec as provided through the GUI, and a couple of alternate codecs found on the web.
The TTN codec is as follows:
function Decoder(bytes, port,)
{
var decoded = {};// Subtract 64 to show actual button number pressed
// Default firmware sends A,B,C and D
decoded.button_pressed = bytes - 64;return decoded;
}
But on uplink I get the error:
"Exception generated by quickjs: ‘decodeUplink’ is not defined at (eval_script:15) "
No doubt a rookie error here…any suggestions how to fix?
[I can see the base-64 raw data payload in node-red, it does indeed convert to A, B, C, D in ASCII (which is actually workable…question is why can’t i successfully decode with the codec?)