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

    LoRa mesh missing on Lopy4?

    Scheduled Pinned Locked Moved LoPy
    5 Posts 4 Posters 521 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.
    • B Offline
      Belbs
      last edited by

      Hi all! I'm trying to setup a simple Lora mesh, but I'm stuck on the "setup" part.
      If I understand correctly, the LoRa mesh support is only available in the latest development RC builds.

      (sysname='LoPy4', nodename='LoPy4', release='1.20.0.rc8', version='v1.9.4-7b83c6d on 2019-03-06', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1')
      

      Yet my Lopy4 keeps saying it has no notion of the LoRa "mesh" capabilities when I try something like this:

      from network import LoRa
      
      # initialise LoRa
      # the LoRa parameters (frecq, sf, bandwidth) has to be the same for all
      # nodes in the same Pymesh
      lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868)
      
      print("Enable Pymesh")
      # print(lora.Mesh())
      pymesh = lora.Mesh()
      
      # check node state inside Pymesh
      # PYMESH_ROLE_DISABLED = 0, ///< The Pymesh stack is disabled.
      # PYMESH_ROLE_DETACHED = 1, ///< Not currently participating in a Pymesh.
      # PYMESH_ROLE_CHILD    = 2, ///< The Pymesh Child role.
      # PYMESH_RlOLE_ROUTER   = 3, ///< The Pymesh Router role.
      # PYMESH_ROLE_LEADER   = 4, ///< The Pymesh Leader role.
      print("Pymesh node role: %d"%pymesh.state())
      
      print("IPv6 unicast addresses: %s"%pymesh.ipaddr())
      

      I keep getting the following error.

      AttributeError: 'LoRa' object has no attribute 'Mesh'
      

      And I can see that no "mesh" elements are present in the LoRa class.

      >>> LoRa.
      __class__       __name__        ABP             ALWAYS_ON
      AS923           AU915           BW_125KHZ       BW_250KHZ
      BW_500KHZ       CLASS_A         CLASS_C         CODING_4_5
      CODING_4_6      CODING_4_7      CODING_4_8      EU868
      LORA            LORAWAN         OTAA            RX_PACKET_EVENT
      SLEEP           TX_FAILED_EVENT                 TX_ONLY
      TX_PACKET_EVENT                 US915           add_channel
      airtime         bandwidth       callback        coding_rate
      compliance_test                 events          frequency
      has_joined      init            ischannel_free  join
      mac             nvram_erase     nvram_restore   nvram_save
      power_mode      preamble        remove_channel
      set_battery_level               sf              stats
      timeout         tx_power
      

      I tried the following builds: LoPy4-1.19.0.b4 (which is confirmed working by somebody else), LoPy4-1.20.0.rc1 and LoPy4-1.20.0.rc8
      What am I missing?

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @Belbs
        last edited by

        @belbs it is my understanding that there are versions with and without Pymesh due to the added size.

        No idea where you find/select one or the other though, haven’t used it at all myself.

        Do you have the latest firmware update tool?

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          agotsis @jcaron
          last edited by agotsis

          @jcaron @Belbs

          Had the same issue with the 1.20.0.rc8. I downgraded to 1.20.0.rc7 where it seems that loramesh is available (although I am not really sure how the packaging is implemented by pycom).

          Cheers.

          1 Reply Last reply Reply Quote 0
          • B Offline
            Belbs
            last edited by

            @agotsis @jcaron You're right, package 1.20.0.rc7 contains the meshing capabilities. Looking at the git commits, rc8 builds on top of rc7 though... so it doesn't make a lot of sense as to why it is not included.
            Anyway, it works now! Thanks for the help.

            1 Reply Last reply Reply Quote 0
            • T Offline
              thinginnovations
              last edited by

              It's a little odd that the LoPy includes the mesh functionality but the LoPy4 doesn't in rc8. I would have expected it to be the other way around based on the increased memory capacity on the LoPy4.
              Will there be build options available via the firmware update tool to include mesh or not for all supported devices?

              Thanks

              Andrew

              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