Codec for RAK7201


Is there a link to the decoder for the RAK7201 anywhere?

I can’t find it in the git repo and my efforts at writing my own have failed me.

Thanks in advance!

Hi, can you share the version of the Firmware?

Is there a way to do it without rebooting into Windows?

I use Linux as my primary OS and rebooting just to use the RAK tool is a real pain! :slight_smile:

At the moment, I’ve got the device in UART mode (held down button 1) and I’m connecting on /dev/ttyUSB0 with 8,N,1 @ 115200baud, but I don’t seem to be able to send commands to the button, only to read when a button is pressed…

No need to use Windows, you ca use cutecom under linux :slight_smile: And to be able to send command you need /r/n it the end of the command

ok, cool so I’m connected via cutecom, but at+get_config and at+status both return ERROR n (n=1 or 2 depending on the command)

Can you try at+version ?

ha! there we go…

OK V3.3.0.14.beta4␍␊

Great, for all commands that you can use, please use the at+help command. And you do not need a decoder. The payload is just 1,2,3,4, depending on the button pressed.
Note: for configuring the device you need to hold button 1 until all 4 LEDs are blue. Holding again will put the device in “work mode”.

OK, so far I’ve tried with Codec set to “None” and Codec set to “Custom Javscript” with code that just returns the value of bytes.

The values returned in Chirpstack are something like AQ==, AW==, Ag==, and BA==, not 1,2,3,4, hence my assumption that a codec is needed?

If I set the codec to “None”, then I don’t get any data showing up in chirpstack at all!

This is without a codec set:


Am… this is bas64 encoded data. But it is strange data. Let me check this and will get back to you asap.

1 Like

@velev The following basic code works:

function Decode(fPort, bytes, variables) {
    return {"key_press": bytes.toString()};


It’s to do with converting the Base64 response into something meaningful when using a custom codec, your comment and helped me solve it, thanks!


I am glad that you figured this out. :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.