Receiving Data from Gateway to Heltec LoRa V2 Node

I am able to send data from the node to the gateway, but I am not receiving the data that I am sending from the gateway into the node.

I am using as a gateway a RG1xx Laird, as a server ChirpStack and as node a Heltec ESP32 Wifi LoRa (V2), using the LoRaWAN Heltec library.

As there are not a lot of documentation of the library, I am not sure where is, in the code, the function that makes the receiving communication and how interact with it.

Can anyone help me with this? Thank you.

The node automatically prints to the serial port after receiving, and if you have not closed it, this function is always on.
There are a few points you need to pay attention to:

  1. The node and server mode should be the same (CLASS_A or CLASS_C).
  2. The validity of the data, the maximum of a single data is 255.
  3. Check if the gateway forwards? It is possible that the server requested too much transmission power, and the gateway would not forward if it did not support such a large power.

I was able to receive some data, but what I want is the node only to receive data, no send, and I don´t know how to stop sending messages.

I want the node to listen all the time, it doesn´t have to send any information, only the join.

What should I do?

It needs to send an acknowledgment frame at intervals to ensure a normal connection. If you want to monitor all the time, you just need to set it to CLASS_C, and then set it to send an uplink frame for 1 hour.

Ok, changing that it works much better.

Thank you very much!

Hello there.

I am using a Wireless Stick, as a CLASS_A which is correctly uplinking data to heltec cloud servers. I can see that when I enqueue a downlink the package is received correctly, as it prints it in the serial output. However, I would like to recover the packet load in order to change parameters on the Wireless Stick. Is there any example or documentation on how to do so?



Currently there is no such routine.

What parameters do you want to change?

The board is used to control two motors, on a schedule previously programmed; usually the wireless stick would report to the gateway under which conditions the motors were started. I would like to use a downlink to change the schedule, and perhaps to change the TxDutyCycle timer.


you can refer this code:

This code is for cubecell and you need do some change for ESP32. paste this function:

That works very fine with some minor modifications, as shown below. Thanks on your help.

Expanding the thread, would you happen to have an example of class_a transmission on demand, without sending the device to sleep when finished? We have been trying to raise a flag to signal entry to the complete lorawan cycle, but we are kind of stuck avoiding the last sleep cycle.

uint8_t rxArray[32];
void downLinkDataHandle(McpsIndication_t *mcpsIndication)
lora_printf("+REV DATA:%s,RXSIZE %d,PORT %d\r\n",mcpsIndication->RxSlot?“RXWIN2”:“RXWIN1”,mcpsIndication->BufferSize,mcpsIndication->Port);
lora_printf("+REV DATA:");

for(uint8_t i=0;i<mcpsIndication->BufferSize;i++) {

if ((mcpsIndication->BufferSize)>32) {
    lora_printf("\r\nLo recibido excede la capacidad del buffer\r\n");

for(uint8_t i=0;i<mcpsIndication->BufferSize;i++) {



I’m sorry we can’t undertand your meaning. Could you describle more?

In the Lorawan examples, the wireless stick sends periodical messages based on a timer (set at appTxDutyCycle). If you want to send a message outside that window, you have to

Would you happen to have an example where the radio is not in this cycle? I.e, when you launch all the Lorawan cycle on demand, just for the downlink (and perhaps the uplink) of a message? Think like the primary activity of the wireless stick is on other stuff, and then using lorawan just to report exceptions.


here is lorawan_interrupt of cubecell, you can refer it:

and modify this para: