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



  • 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


Log in to reply
 

Pycom on Twitter