Hi All,
I am using the Downlink LoRaWAN example and wondering how the downlink data is decrypted.
Here is the handler code
//downlink data handle function example
void downLinkDataHandle(McpsIndication_t *mcpsIndication)
{
Serial.printf("+REV DATA:%s,RXSIZE %d,PORT %d\r\n",mcpsIndication->RxSlot?"RXWIN2":"RXWIN1",mcpsIndication->BufferSize,mcpsIndication->Port);
Serial.print("+REV DATA:");
for(uint8_t i=0;i<mcpsIndication->BufferSize;i++)
{
Serial.printf("%02X",mcpsIndication->Buffer[i]);
}
Serial.println();
uint32_t color=mcpsIndication->Buffer[0]<<16|mcpsIndication->Buffer[1]<<8|mcpsIndication->Buffer[2];
#if(LoraWan_RGB==1)
Serial.print("Color:");Serial.println(color);
turnOnRGB(color,5000);
turnOffRGB();
#endif
}
So I see it decrypts the value color - for example if I send from TTN
bytes 01 - then color = 127651
bytes 02 - then color = 193187
bytes 03 - then color = 258723
etc
So what encrytion is that -
I would like to be able to use a downlink to change my Tx interval
regards
Paul