Difference between TTN and ChirpStack Server and Payload Decoding

Hello everybody,

I have a little problem that makes me despair. But first, please excuse my bad english.

Shortly to my structure:

  • 1x Adafruit Feather 32u4 with TinyLora Lib, periodically sends “Hello LoRa”
  • 1x Dragino LG01N connected via internet with TTN
  • 1x Raspebrry Pi 4 with Dragino Single Channel LoRaHAT with full Chirp Stack LoRaServer and the single_chan_pkt_fwd for the gateway

My problem: In TTN I get 48656C6C6F204C6F526100 as Hex Data, which I can easily decode to “Hello LoRa”.
In my CS application I get as data: SGVsbG8gTG9SYQA=
When I try to decode I get an error with every decoder.
I think that it can not be a problem of the Gateway, because the data are apparently passed through. On the Raspberry terminal I can read the following data package: QNsZASYAOQAB484E7jSuEsCnPTsvxvXz

Can someone help me? What information do you need?

The difference between my decoder TTI and Brocaar are the following two functions, do not know if they are both still needed in my decoder, maybe there is also some history which is not removed:

function base64toHEX(base64) {
var raw = window.atob(base64);
var HEX = ‘’;
for ( i = 0; i < raw.length; i++ ) {
var _hex = raw.charCodeAt(i).toString(16);
HEX += (_hex.length==2?_hex:‘0’+_hex);
return HEX.toUpperCase();

function hexToBytes(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2) {
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;

As mentioned above, the data field is Base64.

$ echo SGVsbG8gTG9SYQA=|base64 -D|hexdump -C
00000000  48 65 6c 6c 6f 20 4c 6f  52 61 00                 |Hello LoRa.|