[LMIC] Decoding data on end node

Hi I am attempting to send the string “HELLO” to a lora device (Heltec ESP32) using the following command.

mosquitto_pub -t “application/1/device/0101010101010101/tx” -m ‘{“reference”:“abcd123434”,“confirmed”:true,“fPort”:1,“data”:“SEVMTE8=”}’

Where SEVMTE8= is HELLO in base 64

5 bytes appear on the Heltec and this is the code I use to display them

    case EV_TXCOMPLETE:
        Serial.println(F("EV_TXCOMPLETE (includes waiting for RX windows)"));
        if (LMIC.txrxFlags & TXRX_ACK)
          Serial.println(F("Received ack"));
          
        if (LMIC.dataLen) 
        {
          Serial.println(F("Received "));
          Serial.print(LMIC.dataLen);
          Serial.println(F(" bytes of payload"));
          
          Serial.print("[");
          for (i=0; i < LMIC.dataLen; i++)
          {
            Serial.print(LMIC.frame[i]);
            Serial.print(" ");
          }
          Serial.println("]");
        }

Resulting in this:

5 bytes of payload
[160 176 227 19 0]

Can anyone explain how I decode this back to HELLO

Thanks

I have fixed this the line

           Serial.print(LMIC.frame[i]);

should be

           Serial.print(LMIC.frame[LMIC.dataBeg+i]);

Were you able to get “HELLO” at node side?
LMIC.frame has other info too i dont think you can use this line
“Serial.print(LMIC.frame[LMIC.dataBeg+i]);”
to get data.
i am struggling to get data at node side i am receiving downlink and can see how many bytes are there through LMIC.dataLen but i am not able to read data.