LoRa mesh missing on Lopy4?
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?
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?
Belbs last edited by
@agotsis @jcaron You're right, package
1.20.0.rc7contains 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.
agotsis last edited by agotsis
Had the same issue with the
1.20.0.rc8. I downgraded to
1.20.0.rc7where it seems that loramesh is available (although I am not really sure how the packaging is implemented by pycom).
jcaron 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?