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

    LoPy and nanogateway example: Inaccurate timing prevent OTAA join

    Scheduled Pinned Locked Moved LoPy
    lopyotaattntiming
    30 Posts 5 Posters 8.9k Views 6 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.
    • robert-hhR Offline
      robert-hh @kiromn
      last edited by robert-hh

      @kiromn Yes and no. I found the place in loramac.c (starting around line 760), where the channels setting are taken from the OTAA join response. This evening, I will try to supress that. If it works, one can make special Lopy nodes with match the special LoPy gateway.
      Anyway, if you need a fully compliant gateway, use another product. The LoPy is designed as a Lora node and works good enough as such.

      K 1 Reply Last reply Reply Quote 0
      • K Offline
        kiromn @robert-hh
        last edited by

        @robert-hh I will just get multichannel gateway. Thank you for the support :)

        robert-hhR 1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @kiromn
          last edited by

          @kiromn Just out of curiosity I made the change to the loramac.c code mentioned below, and indeed then all packets are sent at the same frequency, being seen by the LoPy gateway. The ttn server does not complain. Only the node is then not compliant to the spec.

          L 1 Reply Last reply Reply Quote 1
          • L Offline
            livius @robert-hh
            last edited by

            @robert-hh
            meybe not compliant to the spec but it is interesting solution
            will be good to see it as parameter in init

            think about people first, then computers

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @livius
              last edited by robert-hh

              @livius The implementation would be pretty straight forward. Just a flag and maybe a little helper function in loramac.c, called by init_helper in modlora.c. But I do not know whether this is welcome.

              L 1 Reply Last reply Reply Quote 0
              • L Offline
                livius @robert-hh
                last edited by

                @robert-hh
                For me it is :)
                I can not speak for pycom but many vendors e.g. RDBMS follow standard but contain some useful exceptions required by their users :) If it work in SQL world why not here ;-)

                think about people first, then computers

                robert-hhR 2 Replies Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @livius
                  last edited by

                  @livius Making a table of what works and what no, I get that state:
                  0_1521901822106_0d24111d-e765-4f4c-8cdc-36dce608e9c0-grafik.png
                  So it is the yellow combination that would be changed. Non-Pycom nodes will still not work well with the Nanogateway

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jcaron @robert-hh
                    last edited by

                    @robert-hh the “right” way to do this would probably be to have the network send the right list of channels to use (I.e. 3 times the same) and set the data rate as well.

                    Joins would still be a bit of a problem, but that’s supposed to be a one-time thing.

                    But really, the whole nano-gateway concept is just for testing using LoPys on both sides in very controlled environments.

                    robert-hhR 1 Reply Last reply Reply Quote 0
                    • robert-hhR Offline
                      robert-hh @jcaron
                      last edited by

                      @jcaron I agree. Another place to change that would be the gateway. But after a first glance into the spec it seems to me, that the data is protected with a cryptographic MIC, which the gateway cannot recreate.
                      The problem with join at the nanogateway seems to be the timing. I tried to adapt that with my flavor of the nanogateway, and at my tests it now works all the time. But I have no genuine node to test.

                      1 Reply Last reply Reply Quote 1
                      • robert-hhR Offline
                        robert-hh @livius
                        last edited by robert-hh

                        @livius I made a version in which you can control the join behaviour. It is just a handful of code lines. You'll find it here:
                        https://github.com/robert-hh/pycom-micropython-sigfox/tree/otaa
                        I added an optional parameter to join.
                        Edit: While testing it came again to my mind to me that you can achieve the same thing with the standard SW:
                        step1: do an otaa join
                        step2: take the parameters from the web console, use them as ABP parameters and use ABP join then with just the single frequency in the list of channels. If you then save the state to nvs_ram, you do not have to call join again. The keys will be restored by nvs_restore(), which you must call anyhow to set the counters.

                        1 Reply Last reply Reply Quote 1

                        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
                        • 2
                        • 1 / 2
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom