Closed hecko closed 8 years ago
Im an ass. Sorry to bother - realized that the data payload is PHYPayload, not a FRMPayload which this package accepts. :)
No problem, never mind.
Could use a quick line in the readme to clarify this for future cases...
I was actually about to do that and post you a push request, but wasn't sure about your preffered method to do this.
Anyways - the code that works is here:
Changed the readme/docstrings here and there: bd7903fb5d784697991b016e859850cf1b3c67ee
Feel free to just open a pull request for future cases.
Everyone, can please anyone give me a reference on whetner Im decoding the packet from TTL network correctly?
The original data pushed into LoRaWAN client (TX) module before encryption: 0x0102030405060708 This is the data from the LoRaWAN concentrator (RX): u'data': u'QGyoHrSACgACb3nY9sWjyQG6P/dE', This data is supposed to be encoded in Base64 ( according to section 4 https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT > hash key "data")
Sending from deviceid 0xB41EA86C as packet type U on port 2, AppSessionKey: 82-0E-B5-12-7B-0B-98-C8-CC-0B-7E-E4-32-53-E0-D1, packet IS decoded correctly on TheThingsNetwork backend (frame number 10 (i believe this is the sequence number in TheThingsNetwork terminology (confirm?)).
So LoRaWAN stuff works, but Im not able to use this Python module to decrypt the information:
I prepare payload as such: payload = base64.decodestring(p).encode('hex') but the output data is: [46, 23, 115, 236, 116, 37, 196, 9, 80, 110, 126, 32, 183, 20, 136, 96, 100, 221, 95, 37, 112], which by far does not resemble 0x0102030405060708
Expecting: [ 1, 2, 3, 4, 5, 6, 7, 8]
Am I missing something fundamental here? Thanks for ANY leads!