Cubecell, mikrotik and chipstack

Hi everyone

I started communication between cubecell and the chirpstack server. The gateway is Mikrotik Lora8. I have a few questions in this regard.

  1. On the mikrotik side I have the following messages:
    https://prnt.sc/w2jkz7

  2. On the chirpstack side I get something like this:

Something’s wrong?

  1. This is the code fragment that executes the sent data:

/* Prepares the payload of the frame */
static void prepareTxFrame( uint8_t port )
{
appDataSize = 2;
appData[0] = 1234;
appData[1] = 5678;
}

			prepareTxFrame( appPort );
			LoRaWAN.send();
			deviceState = DEVICE_STATE_CYCLE;
  1. Where can I see this data (1234, 5678) in the frame?
    https://prnt.sc/w2jln6

Sorry for these trivial questions, but I’m just getting started with Lora.

Regards.
JN

Hi @shady79

Looks like you’re watching the LoRaWAN Frames tab. You’ll want to look at the Device Data tab. Within the up packet, you’ll be able to see your data as a base64 encoded hex array. You can decode it with https://cryptii.com/. This thread should help! Decoding data from device

This is my data?

Yes - that is your data

OK that’s true, my data has come:)

appDataSize = 3;
appData[0] = 1;
appData[1] = 2;
appData[2] = 88;

I would now like to make them available in decoded form for visualization, how to do it?
For example, send them with ModbusTCP or save them to the mysql database.

There are some options here:

  • you could use the built-in codec options to write something to decode that data
  • you could use one of the integrations and write your own app to process the data and decode it

I went down the Node-Red road. Node Red is listening to the MQTT server and picking up data from the chirpStack and I decode and process them further there. From there it is easy to make a dashboard, write data to MySQL or do other stuff with your data.

1 Like

I’m currently testing a Python script that is listening on HTTP post request from server. I think it will be a sufficient solution for me.

2 Likes

Is this information about the battery charge correct, what is it taken from, since I have not implemented it in the code on the module side. I would like to save the battery charge state in the database together with the data coming from the module. Do I have to use the ADC in the module for this and send the reading along with the data?