From 56708f88803913d0f28851fb2e319e9686ffd4db Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sat, 29 Feb 2020 23:00:53 +0100 Subject: [PATCH] =?UTF-8?q?Finalement=20j'ai=20laiss=C3=A9=20le=20bouclage?= =?UTF-8?q?=20en=20cas=20de=20socket=20occup=C3=A9e,=20cela=20red=C3=A9mar?= =?UTF-8?q?re=20tout=20seul=20jusqu'=C3=A0=20ce=20que=20le=20socket=20se?= =?UTF-8?q?=20lib=C3=A8re=20:-(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mesures/ADC/ADS1115/0_tst3_socat.lua | 4 ++-- Mesures/ADC/ADS1115/_zremote_cmd.txt | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Mesures/ADC/ADS1115/0_tst3_socat.lua b/Mesures/ADC/ADS1115/0_tst3_socat.lua index 3b0e06b..ca724aa 100644 --- a/Mesures/ADC/ADS1115/0_tst3_socat.lua +++ b/Mesures/ADC/ADS1115/0_tst3_socat.lua @@ -12,7 +12,7 @@ socat TCP-LISTEN:23047,reuseaddr,fork TCP-LISTEN:23000,reuseaddr,bind=127.0.0.1 telnet -r localhost 23000 ]] -print("\n 0_tst3_socat.lua zf200229.1854 \n") +print("\n 0_tst3_socat.lua zf200229.2243 \n") local node, table, tmr, uwrite, tostring = node, table, tmr, uart.write, tostring @@ -137,7 +137,7 @@ function rt_connect() end tmr_socat1=tmr.create() -tmr_socat1:alarm(2000*1000, tmr.ALARM_AUTO , function() +tmr_socat1:alarm(5*1000, tmr.ALARM_AUTO , function() rt_retry=1 if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH) end diff --git a/Mesures/ADC/ADS1115/_zremote_cmd.txt b/Mesures/ADC/ADS1115/_zremote_cmd.txt index 7ba80fb..a6ab632 100644 --- a/Mesures/ADC/ADS1115/_zremote_cmd.txt +++ b/Mesures/ADC/ADS1115/_zremote_cmd.txt @@ -1,5 +1,5 @@ # Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom -# zf200229.1600 +# zf200229.2300 Todo à faire pour ce projet ! @@ -60,7 +60,7 @@ export zIP="192.168.0.182" export zport="23" export zIP="localhost" -export zport="2323" +export zport="23000" ATTENTION: voir les tunnels tout à la fin ! @@ -74,8 +74,18 @@ for k,v in pairs(_G) do print(k,v) end # commandes lua pour ce projet -export zIP="192.168.0.152" -export zport="23" +ssh ubuntu@www.zuzutest.ml killall -9 socat +killall -9 ssh +ssh ubuntu@www.zuzutest.ml socat TCP-LISTEN:23047,reuseaddr,fork TCP-LISTEN:23000,reuseaddr,bind=127.0.0.1 & +watch -n 1 'ssh ubuntu@www.zuzutest.ml netstat -nat |grep 230' +ssh -N -L 23000:localhost:23000 ubuntu@www.zuzutest.ml & + +export zIP="localhost" +export zport="23000" +telnet -rN $zIP $zport +for k,v in pairs(_G) do print(k,v) end +~. + ./luatool.py --ip $zIP:$zport -f z_index.html ./luatool.py --ip $zIP:$zport -f 0_send_data.lua @@ -85,6 +95,7 @@ export zport="23" ./luatool.py --ip $zIP:$zport -f api_sonoff.html http://192.168.0.182 +./luatool.py --ip $zIP:$zport -f dir.lua telnet -rN $zIP $zport verbose=false @@ -103,7 +114,6 @@ dofile("wifi_info.lua") node.restart() ping -c 10 $zIP -./luatool.py --ip $zIP:$zport -f dir.lua