Data send problem

Hello everyone,

I’ve a RAK2243 Gateway and a LoRa Server configured.
I use an Arduino UNO to detect temperature and humidity using a DHT11 sensor.
Arduino is provided with a RAK811 (WisNode) card.
The Wisnode performs the join correctly.

My goal is to send a temperature value like “23.00” and read it from the "Device Data” section inside my application.

The first problem is the following:

I’m trying to transmit the measurement data, but something doesn’t seem to be working (surely I’m doing something wrong).

Using an Arduino sketch which sends a test string containing "23”, it’s possible to see the result encoded in Base64 (inside “data:”).

If for example, however, I insert another string such as “ciao”, instead of the aforementioned “23”, it seems that the server no longer receives anything (it continues the loading). This also occurs for the various values ​​related to the measurements (example: 23.00, referring to the temperature):

In a nutshell, it seems that I can’t communicate anything more than the string “23”.

Is there anything related to the encoding that escapes me?
Is there any limit to the maximum length of the payload that I inadvertently configured?

The second problem is the following:

Assuming that I want to transmit only the string “23” (which is the only one I can receive at the moment) I still need to decode it (being encoded in Base64).
Regarding the decoding I tried to change the codec in CayenneLPP (I understood how messages should be generated but I can’t generate them correctly from Arduino so I left this idea).

I am therefore trying to define a custom JS function.

From what it says, it takes as input “bytes” which is a bytearray (?) And from what I understand, it should contain the bytes of my original message.

However, if in the function it decodes, I simply return as a value (inside the JSON) “bytes” prints the base64 encoding anyway:


So I really wanted to ask you what “bytes” is, because I don’t understand if the message is already Base64 encoded or not.

Do you have any suggestions on how to make a decode function which works?

Before writing you I’ve read all the documentation but I really can’t solve these problems :frowning:

Thank you very much for your attention and for your work.


Please see, this question has already been asked & answered a few times :slight_smile: