SIPy is a project of meshed LoRa network for SportIdent SRR orienteering stations based on Pycom LoPy4.
The communication path is:
SI BSF8-SRR --SRR--> SI SRR module --UART--> LoPy4 --PyMesh--> LoPy4 --WiFi+TCP--> MeOS.
SiPy requires some configuration before being used. These configurations for
now can be done only by using the applicative configuration API or directly by
editing the file config.json
. Using REPL:
config.set("name",<node name>)
config.set("role","border router" | "leaf")
config.save()
It changes the name configuring the owned WLAN SSID to GEC-
A SiPy node provides 2 simultaneous Wifi modes:
owned wifi
known wifi
(several wlans can be configured).The owned wlan is very handy for accessing the administration web page of a node, while the known wlans are rather used as bridges between LoRa mesh and GEC network. Nevertheless, both kind of wlans can be used undifferently for both purposes.
The admnistration web pages can be accessed once on the same network that the node, with any web browser at [http://\<node ip address>]().
SIPy nodes can be of 2 types:
Leafs and router nevertheless share the same software. During the boot, different parts are activated depending on the local configuration:
2 more threads run on all nodes:
Never, NEVER start a Pycom module without its LoRa antenna: there are good chances to burn out the radio amplifier.
LoRa transmitter/receiver couple is very sensible. A minimum distance of about 1m is required to about errors of transmission.
LoRa mesh LED color codes:
In normal operations, only one node shall be magenta, all the other are green or white, depending on the number of nodes.
This behaviour can be disabled as described by Catalin in the Pycom forum https://forum.pycom.io/topic/6337/pymesh-and-rgb-led/3:
For now, the solution is to comment-out this line: https://github.com/pycom/pycom-libraries/blob/1df042c6faf032d40c48a647cb6d158d94304d23/pymesh/pymesh_frozen/lib/mesh_internal.py#L265
Basically, the method led_state controls the LED.
So, you should take the file mesh_internal.py modify it (comment out that line) and upload it on the device. This module/file will be used, as it has higher priority than the one included in the frozen, as binary.
Let me know how it goes.
From Pycom 1.20.2r2+, Pymesh can only be provisioned from Pybytes (https://pybytes.pycom.io). Once provisioned, the way Pymesh is configured is altered and the board uses Pybytes data. To avoid this behaviour, the following instructions can be used to disable Pybytes on a given LoPy4 board:
import pycom
pycom.pybytes_on_boot(False)
machine.reset()
It can be reverted with the same commands replacing False
by True
.