anthonykirby / lora-packet

LoRa radio packet decoder
MIT License
261 stars 83 forks source link

unable to decode payload: FRMPayload is empty #35

Closed darrylburke closed 4 years ago

darrylburke commented 4 years ago

I've double checked all the nwk and appkey to be correct, and confirmed that the data works fine int he ttn device data console. When I try to use the module through node red, the msg.payload.out if emnty.

when I tried the CLI for lora_packet I get the same blank payload returned.

./node_modules/lora-packet/bin/lora-packet-decode --appkey "7679A920DC79C0DECC693E34E670B11F" --nwkkey "4BBA414130E0A0C87FE0A7EAA257E9BD" --base64 "YGcXASaKCwADQAIAcQM1AP8BbePzEg=="

decoding from Base64: YGcXASaKCwADQAIAcQM1AP8BbePzEg== Decoded packet

Message Type = Data PHYPayload = 60671701268A0B000340020071033500FF016DE3F312

      ( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] )
              MHDR = 60
        MACPayload = 671701268A0B000340020071033500FF01
               MIC = 6DE3F312 (OK)

      ( MACPayload = FHDR | FPort | FRMPayload )
              FHDR = 671701268A0B000340020071033500FF01
             FPort = 
        FRMPayload = 

            ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
           DevAddr = 26011767 (Big Endian)
             FCtrl = 8A
              FCnt = 000B (Big Endian)
             FOpts = 0340020071033500FF01

      Message Type = Unconfirmed Data Down
         Direction = down
              FCnt = 11
         FCtrl.ACK = false
         FCtrl.ADR = true

in the ttn console the data is on port 1, (but port in outpue is "")

this should return the byte array of be9e524781aa01070f2a

darrylburke commented 4 years ago

downlink packet was empty, was not capturing the uplink packet. Please Ignore