How to read RSSI & SNR with Heltec's LoraWAN library

LoraWAN libraries usually have the following;

LoRa.rssi() to read the current RSSI of the rario, LoRa.packetRssi() to read the RSSI of the averaged RSSI of the last received packet & LoRa.packetSnr() to read the estimated SNR of the received packet.

What are the equivalent of these in Heltec’s LoraWAN library?

My Best,
Ben

hi,

please refer the picture:

Hi Jason, Yes I am aware of getting RSSI and SNR during a downlink. How do I read at other times. For instance, how do I know the RSSI and SNR for a device which never receives a downlink message?

you can Define a global variable. When you receive the downlink, pass the value to the global variable you defined.

Jason, In reality we have devices which will have no downlink at all. Thats the problem. Please take a look at the attached image.

After an uplink is complete, heltec library also is showing the RSSI. I would like to capture it, not form the downlink.

hi,

Still the same result. confirm mode have a ACK. You can still do as I just said to get the RSSI…


just do it.

hi i m trying to extract the downlink RX sended to my device, can u paste your arduino code plz, it will help!

here you are, add this to your arduino code:

void downLinkAckHandle(McpsIndication_t *mcpsIndication)
{
  printf("\n\tdownLinkAckHandle: ACK received\n");
  printf("\n\t+REV DATA:%s,\n\tRXSIZE %d,\n\tPORT %d, RSSI: %d,\n\t SNR: %d,\n\t DATA_RATE:%d,\r\n",
            mcpsIndication->RxSlot ? "RXWIN2" : "RXWIN1", mcpsIndication->BufferSize, mcpsIndication->Port,
            mcpsIndication->Rssi, (int)mcpsIndication->Snr, (int)mcpsIndication->RxDoneDatarate);
}

cheers,
Jay

do i need to call this function in the void loop() ??

nope just add it to your code and it will be called automatically when a down link ACK is received.
watch your serial.