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

    LoRaWAN join spreading factor

    Scheduled Pinned Locked Moved LoPy
    lopylorawanjoinadr
    3 Posts 2 Posters 1.5k 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.
    • A Offline
      Aris
      last edited by

      Does anyone know what changes should be made to the source code of the firmware in order to hardcode SF12 during LoRaWAN join?

      Maybe the AlternateDatarate() in the MLME_JOIN should be replaced with DR_0?

      https://github.com/pycom/pycom-micropython-sigfox/blob/master/lib/lora/mac/LoRaMac.c#L4172

      Or maybe the define of MAX_JOIN_DATARATE should be 0 at https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlora.c#L59

      Or something from line 1466 to 1479 https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlora.c

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino @Aris
        last edited by jmarcelino

        @aris
        Why are you trying to hardcode SF12 from the C side of things?

        You could just pass the dr option to LoRa.join()

        lora.join(activation, auth, * ,timeout=None, dr=None)

        just set dr to be your desired datarate. Check the docs page for more help:

        https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html

        1 Reply Last reply Reply Quote 3
        • A Offline
          Aris
          last edited by

          I think you are right. I don't know how it was stuck in my mind that I could not change the join DR. Maybe by older topics of the forum.

          Thank you!

          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