I'm developing code based on https://github.com/computenodes/dragino which, in turn, is based on this work. In particular I'm trying to add MAC command handling to make the code compliant with MAC 1.0.4.
During my testing I get an Exception telling me the following:-
Attribute Error 'JoinAcceptPayload' does not have an attribute called 'payload'
This happens when lorawan.valid_mic() is called.
The error appears to come from line 25 below
def to_clear_raw(self):
return self.payload
This method appears (in my traceback) to be called from valid_mic() but I cannot see anywhere self.payload is assigned a value in JoinAcceptPayload.
After more digging I found that I have to call lorawan.get_payload() before I can validate the MIC. Strange, I would have thought MIC validation should happen first.
Hi, this is a query.
Thanks for this code - very useful
I'm developing code based on https://github.com/computenodes/dragino which, in turn, is based on this work. In particular I'm trying to add MAC command handling to make the code compliant with MAC 1.0.4.
During my testing I get an Exception telling me the following:-
This happens when lorawan.valid_mic() is called.
The error appears to come from line 25 below
This method appears (in my traceback) to be called from valid_mic() but I cannot see anywhere self.payload is assigned a value in JoinAcceptPayload.
Could you enlighten me please. Thanks