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

    Problems with setting up an OTAA Node in TTN **SOLVED**

    Scheduled Pinned Locked Moved LoPy
    lopylorawanttnttn gatewaylora
    3 Posts 2 Posters 1.3k Views 2 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.
    • C Offline
      cylex
      last edited by livius

      Hey there!

      I'm new to the whole IoT world (sorry for that) but the LoPy seemed really interesting so i decided to order two of them. As a first step I wanted the two LoPys to communicate with eachother in TTN (one as a GW and the other as a node). Setting up the first Lopy as a nano GW in TTN was easy thanks to @bucknall and his tutorial. But I'm getting problems with setting up the Node:
      I took the dev_eui; app_eui and the app_key numbers and pasted them into the otaa_node.py. After that I transferred that file to my LoPy and nothing happened. Do I have to rename that file? What needs to stand in the main.py file? Do I need to add additional files to the lib or sys folder? BTW I'm using the newest firmware (1.6.12.b1) and when I try to run the file I'm getting an error like this:
      Traceback (most recent call last):
      File "main.py", line 15, in <module>
      ValueError: odd-length string

      Anyone an idea? Thanks for your help!

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @cylex
        last edited by livius

        @cylex

        i do not know what you have in main.py on this line but look if it is e.g. unterminate hex values
        e.g.

        app_eui = binascii.unhexlify('AD A4 DA E3 AC 12 67 6B'.replace(' ',''))
        

        but you store

        app_eui = binascii.unhexlify('AD A4 DA E3 AC 12 67 6'.replace(' ',''))
        

        above missing second char "B" in pair (last char in the string) (odd chars but must be even)

        think about people first, then computers

        C 1 Reply Last reply Reply Quote 1
        • C Offline
          cylex @livius
          last edited by

          @livius oh man, such a stupid mistake! thank you man!

          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