Low-power system to connect isolated communities based on the LoRa protocol to provide a messaging system to registered users using LoPy devices.
Based on https://github.com/gie-sakura/msnlora
- Device: Pycom LoPy4
- Firmware version: 1.18.2.r3 or higher
This version is capable of transmitting up to 150 KB.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes in your lopy.
In the lopy device:
This is the basic information required to set up a suitable development environment for a Pycom device, in this case the LoPys.
You first need to have Python 3 and Pip 3 installed in your computer. Check here for the proper instructions and code:
https://www.python.org/download/releases/3.0/
$ sudo apt install python3
$ sudo apt install python3-pip
Install the software required to connect to the LoPy device
$ sudo python3 -m pip install mpy-repl-tool
For more information you can check the full documentation
Now you can download and install the project in your devices.
First download the .ZIP, extract it in your machine.
To install the repository in the LoPy device, open a terminal on the project's location.
Verify if the device has been recognized:
$ sudo python3 -m there detect
Confirm that the device only contains the main.py and boot.py files:
$ sudo python3 -m there ls -l /flash/ *
Upload the files of the repository to the device:
$ sudo python3 -m there push * /flash
Get access to the REPL prompt:
$ sudo python3 -m there -i
Once in the REPL promt import the server file and choose the execution mode
import server
Connect to the network and type the address
192.168.4.1
To srta using it you need to have a device with WiFi and a browser. Open a browser in your device and go to http://192.168.4.1
. A form will appear with the necessaary information
The 'mqttproxy' directory stores the version of the code that integrates sensors into the system. The core of the network works as in the base version.
File client.py
with the proper configuration has to run in a LoPy with a Pysense board. In this code example the luminosity is read and sent as a JSON message.
The destination is a device called 'mqttproxy'. We use anycasting to reach this device since it basically works as a proxy to a predifiend MQTT broker, in our example the broker is "test.mosquitto.org".
Files "mqttproxyreg.py" and "mqttproxy.py" must be run in a computer (RPis are fine) and are used to register, the former, and to get data from the close by LoPy and forward it to the broker, the latter.
- Miguel Kiyoshy Nakamura Pinto
- Angélica Moreno Cárdenas
- Pietro Manzoni
This project is licensed under the GNU GPLv3 - see the LICENSE.md file for details
- Ermanno Pietrosemoli
- Marco Zennaro
- Marco Rainone