From fd55a78a5a67147770560d80c2f56015f438f4b8 Mon Sep 17 00:00:00 2001 From: Paul SQUIZZATO Date: Fri, 17 Mar 2023 14:18:15 +0100 Subject: [PATCH 1/4] Ajouter 'Documentation/Compte rendus/CR-17-03-2023' --- Documentation/Compte rendus/CR-17-03-2023 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Documentation/Compte rendus/CR-17-03-2023 diff --git a/Documentation/Compte rendus/CR-17-03-2023 b/Documentation/Compte rendus/CR-17-03-2023 new file mode 100644 index 0000000..d418964 --- /dev/null +++ b/Documentation/Compte rendus/CR-17-03-2023 @@ -0,0 +1,9 @@ +## Rendez-vous du 17 Mars + +- Il nous reste 14h (sans compter la séance du 17/03) + +- Une fois la BDD qui marche, comment à tester : + - Utiliser des scripts de client pymodbus; + - ou avec des envois de paquets en dur directement dans le decodeur. + +#### Prochain rendez-vous le Mardi 21 Mars à 10h15 (Démo du code) \ No newline at end of file From 63699b8c795d1a3f887e8230c74196a39bfb322d Mon Sep 17 00:00:00 2001 From: Paul SQUIZZATO Date: Fri, 17 Mar 2023 14:18:26 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Documentation/?= =?UTF-8?q?Compte=20rendus/CR-17-03-2023.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation/Compte rendus/{CR-17-03-2023 => CR-17-03-2023.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Documentation/Compte rendus/{CR-17-03-2023 => CR-17-03-2023.md} (100%) diff --git a/Documentation/Compte rendus/CR-17-03-2023 b/Documentation/Compte rendus/CR-17-03-2023.md similarity index 100% rename from Documentation/Compte rendus/CR-17-03-2023 rename to Documentation/Compte rendus/CR-17-03-2023.md From a8e4ba4cd8dbf8207a7e7bfbaa95c434fed767e9 Mon Sep 17 00:00:00 2001 From: louwar Date: Fri, 17 Mar 2023 14:57:40 +0100 Subject: [PATCH 3/4] Update doc bug --- src/readme.md | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/readme.md b/src/readme.md index ac2184a..dee36af 100644 --- a/src/readme.md +++ b/src/readme.md @@ -1,32 +1,3 @@ -# Install - -```sh -python -m pip install pipenv -pipenv update -pipenv shell -``` - -# Run - -Within pipenv, run in two terminals: - -```sh -./start_server.sh -./start_client.sh -``` - -# Example commands - -Within client run: - -``` -client.read_coils slave=1 address=0 -client.write_coil slave=1 address=0 value=1 -client.read_coils slave=1 address=0 -``` - -See the first boolean was false in the first read, was written to true, and appears at true in second read. - # Client commands : ``` @@ -44,4 +15,5 @@ client.write_registers address=0 values=845,123,0,427,4 slave=1 client.read_holding_registers address=0 count=1 slave=1 client.read_holding_registers address=0 count=100 slave=1 -``` \ No newline at end of file +``` + From fde227311aaccc9fe72e7c7b0de4b3f4e678ab82 Mon Sep 17 00:00:00 2001 From: louwar Date: Fri, 17 Mar 2023 14:59:52 +0100 Subject: [PATCH 4/4] Update doc bug --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 00b53de..1afd78b 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ ## Utilisation ### Install + ```sh // Install d'outil -python -m pip install pipenv +python3 -m pip install pipenv // Install module pip install typer @@ -18,6 +19,24 @@ pipenv update // Lancement du shell pipenv pipenv shell ``` +**ATTENTION** : lorsque vous voulez faire un pipenv update cela vous donne une version buguée de pymodub qui est là `3.2.0` *(pour voir votre version faite un `pip freeze`)* + +#### Marche à suivre: +1) Désinstallez la bibliothèque pymodbus à l'aide de la commande suivante: +> pipenv uninstall pymodbus + +2) Installez une version précédente de la bibliothèque pymodbus en utilisant la commande suivante: +> pipenv install pymodbus==3.1.3 + +### Lancement +il faut lancé 3 terminal pipenv pour : + +```sh +./start_server.sh +./start_client.sh +sudo python3 ./decoder.py +``` + ### Côté BDD Il faudra que vous connectiez à votre BDD PostgreSQL. Exécuter le script `Table.sql` qui se trouve dans src avec la commande ci-dessous. @@ -39,21 +58,34 @@ psql -h londres -d -U -W **ATTENTION** `londres` est un serveur héberger dans l'infrastructure de notre établissement universitaire. -### Lancement -il faut lancé 3 terminal pipenv pour : - -```sh -./start_server.sh -./start_client.sh -sudo python3 ./decoder.py -``` - ## Notre configuration * Python (3.9) * PostgreSQL * pip (22.0.2) * pymodbus (3.1.3) +Notre pipfile: +``` +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +redis = "*" +click = "*" +prompt-toolkit = "*" +pymodbus = {extras = ["repl"], version = "*"} +sqlalchemy = "*" +scapy = "*" +ipython = "*" + +[dev-packages] + +[requires] +python_version = "3.9" +``` + ## Développeurs * [Louis](https://codefirst.iut.uca.fr/git/louis.dufour) * [Paul](https://codefirst.iut.uca.fr/git/paul.squizzato)