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

    How to change the role of a leader router in a pymesh network ?

    Scheduled Pinned Locked Moved Discussion
    1 Posts 1 Posters 20 Views 1 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.
    • R Offline
      rayan malro
      last edited by

      Hello everyone,

      I wonder if it is possible to manually set a specific router as a leader in a Pymesh network

      I use 3 Fipy (=routers) and here is the firmware version: Pycom MicroPython 1.20.2.rc11
      I use this repo without using pybytes: https://github.com/pycom/pycom-libraries/tree/master/pymesh/pymesh_frozen

      When the mesh network is running, a leader is defined automatically. I would like to manually change its router role to set another leader in the network.

      I tried to change the leaderweight to increase the probability of a router becoming a leader with the following command:

      pymesh.leader_priority(2)
      

      In addition, I tried to change the role of a router and to set the current leader as a simple router following this cli command :

      # code used to define the router as a leader
      pymesh.ot_cli('state leader') 
      # code used to define the current leader as a router
      pymesh.ot_cli('state router')
      

      But this does not work. The leader router of the original network reverts to its role as leader.

      Thanks in advance for any answer,
      Have a great day

      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