Difference between revisions of "FREE - Framework for Remote Experiments in Education"
Line 35: | Line 35: | ||
== Main Server (Main_Server) == | == Main Server (Main_Server) == | ||
− | This | + | This software is the dispatcher of the information. By allowing the communications form the frontend and each RPi_Server responsable for a experience. To install this you need to install at least Python 3.7 and the lib Flask (https://pypi.org/project/Flask/). |
Then go to the project from github: | Then go to the project from github: | ||
Line 64: | Line 64: | ||
$ start.bat | $ start.bat | ||
− | |||
= Communication protocol = | = Communication protocol = | ||
(TODO: write this part (Rossa)) | (TODO: write this part (Rossa)) |
Revision as of 19:31, 12 August 2021
Contents
Pre-requisites
Build environment
- Git (2.30.2+)
- Python (3.7.0+)
Install
Raspberry PI Server (RPI_Server)
Setup python3 environment variable pointing to run the version installed (in this exemple is for python3.7) by:
$ sudo nano ~/.bashrc
edit it adding to the end:
$ alias python3="python3.7"
First checkout the project from github:
$ git clone https://github.com/e-lab-tecnico-ulisboa-pt/RPi_Server-PG
then edit the "main.py" file and change the following global variables:
SERVER = "main_server_IP" MY_IP = "RPi_IP" SEGREDO = "password" PORT = Port_to_comunication BINARY_DATA_PORT = Port_to_transfer_Binary_data
After this changes the RPi_Server is ready to run by typing:
$ pyhton3 main.py
This will try to connect to the IP defined as SERVER every 10 sec.
Main Server (Main_Server)
This software is the dispatcher of the information. By allowing the communications form the frontend and each RPi_Server responsable for a experience. To install this you need to install at least Python 3.7 and the lib Flask (https://pypi.org/project/Flask/).
Then go to the project from github:
$ git clone https://github.com/e-lab-tecnico-ulisboa-pt/Main_Server-RexC
Edit the "main.py" file and change the following global variables:
SERVER = "main_server_IP" MY_IP = "RPi_IP" SEGREDO = "password" PORT = Port_to_comunication BINARY_DATA_PORT = Port_to_transfer_Binary_data
After that you need to change or edit this last one variable "segredos",
the struct of the is the following: {"RPi_IP":{"segredo":"password","nome":"Name_of_the_exp"},...}
Config File JSON
In the project of the Main_Server there is a folder called Configs, in there are all the configuration files of the experience linked to the Main_Server, so to add a new experiment you just have to copy one of the existing files and change its name to the experiment's and change the parameters in the config file:
After having this changes done you can run the Mian_Server by typing on the cmd:
$ start.bat
Communication protocol
(TODO: write this part (Rossa))