RAK831 Pilot gateway to listen and receive data packets from Pycom Lopy4 Node

Thank you @ZhuQI Got it.

Meanwhile, rather than to copy the base64 encrypted message from the node page and paste it in the base64 converter, any advice if we can directly program within the built-in server to extract the original message? And also any advice on how we can control the node from the server to send the data whenever we want? Your help would be much helpful.

Thank you

@Sonam
In rakwireless, no impossible.
1.To get web data through the server, we can use mqtt.
Ssh login to the gateway, use the following command.
mosquitto_sub -t ‘application/#’ -v


The “data” part is the data sent by the node, but it still needs base64 decoding.
You can also use the mqtt subscription to get node data in your code.In python you can use the “paho.mqtt.client” library.

2.Loraserver sends data to the node, you can refer to the following document:

@ZhuQI Thanks for the reply. It helped a lot. Meanwhile, I need some more help.

Actually, I am doing a task where I am sending ascii text from lopy4 node to the RAKwireless lora built-in server. I have broken down the ascii text into many packets and sending. I could receive the packets in the lora built in server but now I am left with how to reconstruct/rearrange these packet back into the original ascii text and I am left without much idea how to do that. If you and other experts can share me some idea and help me please.

Would appreciate your advice.

Thank you

Suppose the node wants to send a 22-byte text "Hello lora! Hello Rak!". The node sends 3 bytes of text each time.

The node sends the total length of the text (22) to the server for the first time.
The second time the node sends the data format as follows
"13Hel"
"1" indicates the first packet data
"3" means carrying 3 bytes of data
"001" takes the first three bytes of 22 bytes.

The third time the node sends the data format as follows
"23lo "
"2" indicates the second package data
"3" means carrying 3 bytes of data
"lo " took the second three bytes of 22 bytes.

The last node sends the data format as follows
81!
"8" indicates the 8th packet of data
"1" indicates that 1 byte of data is currently carried.
"!" takes the last byte of 22 bytes.

Maybe you need to add some other instructions in the packet.
I don’t know if my understanding and practices are correct.

Thank you for the concept.

Hi @Fomi @velev @Hobo, again and apology for bothering again and again.

I am bit confused on how to reconstruct back the ASCII characters into original ASCII file in LoRa Built-in server which was sent as a lora packets from LoRa node.

Actually at the LoRa node, I did split the ASCII txt (attached ASCII_txt and program) into line by line (to make it easy to reconstruct later in Gateway/LoRa server) and then sent to RAK831 Pilot gateway as lora packets. I did receive the sent LoRa packets in LoRa Built-in server, however, I received the lora packets of split ASCII characters in base64 (attached Device_data) and that also in split packets.

However, I would prefer the reconstructed original ASCII characters to appear as a complete original file in the LoRa built-in server page rather than just the page showing numerous device-data uplink packets.

Would appreciate your advice on how to go about in making the reconstructed ASCII character appear like original ASCII txt which was sent from the LoRa node.

In some research, they used to transfer all the data received at the Gateway to PC and reconstruct/recombine the received individual data packets back to original ASCII or image using MATLAB or any other program. But here, I firstly, did not know how to send all lora packets received in Gateway/LoRa Built-in Server to PC to reconstruct nor how to reconstruct back to original whole ASCII file in Application Server itself.

Therefore, need your advice please