Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Decode payload KPN loradeveloper and NodeRed

    Scheduled Pinned Locked Moved LoPy
    kpnkpndeveloperlopydecodenode-red
    3 Posts 3 Posters 1.5k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      k32
      last edited by k32

      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.

      1 Reply Last reply Reply Quote 0
      • RobTuDelftR Offline
        RobTuDelft
        last edited by

        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.

        Without data you're just another person with an opinion.
        Hackster | About me

        1 Reply Last reply Reply Quote 0
        • D Offline
          DenDeze
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom