Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding 1.1 LoRaWAN payload #127

Open
tanguy-e opened this issue Mar 26, 2024 · 2 comments
Open

Decoding 1.1 LoRaWAN payload #127

tanguy-e opened this issue Mar 26, 2024 · 2 comments

Comments

@tanguy-e
Copy link

Hello, i'm trying to use lora-packet-decode to decode payload :
lora-packet-decode --nwkkey 95AC484C0B6CA199F80311CADAA774C1 --appkey F5D893278F7E3F23C3DAB5A19AE0CD6C --base64 QPjyCyaAhAEKxgot72bu6AZmyLrY
and i obtain :

      ( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] )
              MHDR = 40
        MACPayload = F8F20B268084010AC60A2DEF66EEE806
               MIC = 66C8BAD8 (BAD != 83269847)

      ( MACPayload = FHDR | FPort | FRMPayload )
              FHDR = F8F20B26808401
             FPort = 0A
        FRMPayload = C60A2DEF66EEE806
         Plaintext = 7665F6EBEE99543D ('ve....T=')

            ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
           DevAddr = 260BF2F8 (Big Endian)
             FCtrl = 80
              FCnt = 0184 (Big Endian)
             FOpts = 

      Message Type = Unconfirmed Data Up
         Direction = up
              FCnt = 388
         FCtrl.ACK = false
         FCtrl.ADR = true
   FCtrl.ADRACKReq = false

Where it seems there is a problem concerning MIC. Is this problem come from the use of LoRaWAN version 1.1 or other ?
Thanks
Eric

@anthonykirby
Copy link
Owner

anthonykirby commented Mar 26, 2024 via email

@tanguy-e
Copy link
Author

Hi Anthony, the frame is well decoded in TTN because i took it in end device live data. And the frane counter value is good. The result is the same using https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/?data=QPjyCyaAhAEKxgot72bu6AZmyLrY&nwkskey=95AC484C0B6CA199F80311CADAA774C1&appskey=F5D893278F7E3F23C3DAB5A19AE0CD6C
The library i use to send data is 1.1 compliant https://github.com/jgromes/RadioLib/tree/master/examples/LoRaWAN and it seems that there is a big difference between 1.0.x and 1.1 for coding/decoding MIC.
Thanks
Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants