Unable to read Downlink

I have successfully implemented LoraWan Network. I am receiving downlinks in the RX1 window. I am able to read the size using LMIC.dataLen. The problem in that i want to display data on Serial Monitor and i am unable to extract data from LoraPacket. Following is the code that i am using currently:

Blockquote

if (LMIC.dataLen) {
Serial.print(F(“Received “));
Serial.print(LMIC.dataLen);
Serial.println(F(” bytes of payload”));
//Serial.println(LMIC.dataBeg);
Serial.print("[");
for (int i=0; i < LMIC.dataLen; i++)
{
Serial.print(LMIC.frame[LMIC.dataBeg+i]);
Serial.print(" “);
}
Serial.println(”]");
}

Blockquote

i am using LMIC library.

Assuming dataLen is non zero
Try
Serial.print(LMIC.frame[LMIC.dataBeg+i], HEX);

Thanks for the reply.
i got it working. The problem was not here the above code is correct.