Decode payload KPN loradeveloper and NodeRed



  • I got the most simple situation for a test, however I am stuck (for a while now) on using the values I send with a LoPy to the https://loradeveloper.mendixcloud.com.

    Situation:
    1 LoPy connecting to the LoRa Wan of KPN towards the free testaccount.
    This works like a charm. I press the button, and in notime a value is available at the portal.

    So, on the LoPy I use the button to send a couple of bytes([0x01])' for testing.
    Here a part of the code:

        print("Toggle LED")
        p_out.toggle()
        print("sending")
        print(bytes([0x01]))
        s.send(bytes([0x01]))
        sleep(1)
        print("done")      
        sleep(5)**
    

    First I expected to see a string like 01 or something on the debugger at the KPN developer portal. But this is what I see:

    0_1503058819457_upload-5f07a151-8888-4de9-b6a4-5a0073e62aed

    1st klick on the button I see value 74
    2nd click on the button I see value 55... etc

    So my assumtion is that the value I send is encoded and stored, and visible as 'strange' values.
    Question 1: Am I right?

    So the next step is sending te value to a place to be processed. I choose the IBM bluemix in combination with NoSQL and NodeRed (ideal for testing, you only pay for run-time and costs 0.07 USD per hour, so stop the application and you pay nothing)

    Also here I got pretty far (for my knowledge) I get the value (the encoded I think) every time I press the button for the first time (value 74) on the LoPy.

    0_1503060297023_upload-db37b888-6640-406d-90bd-7169b666b707

    Great, but now I'm stuck, and stuck for over 2 weeks and getting frustrated and showing signs of insanity.

    Question 2:
    How do I decode this value 74 back to the bytes (b[0x01]) I send originally?
    I guess I need the Application Secret Key (AppSKey?) in combination with the Network Secret Key (NwkSKey?)

    I hope someone can help me to get this hurdle tackled. Perhaps someone has links to the solution. Thanks in advance.



  • Question 1: that is correct, the payload is still encrypted.

    Question 2: this has been discussed before here. I would like to refer you to Pierre's blog here.



Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.