wip, réaligné les tabs dans socat et recherche toujours le problème de crash toutes les 5 minutes
This commit is contained in:
@@ -0,0 +1,370 @@
|
|||||||
|
2020/06/11 11:45:26
|
||||||
|
4
|
||||||
|
2020/06/11 11:46:05
|
||||||
|
4
|
||||||
|
2020/06/11 11:49:14
|
||||||
|
4
|
||||||
|
2020/06/11 11:54:10
|
||||||
|
4
|
||||||
|
2020/06/11 11:57:55
|
||||||
|
4
|
||||||
|
2020/06/11 12:14:37
|
||||||
|
3
|
||||||
|
2020/06/11 12:46:56
|
||||||
|
3
|
||||||
|
2020/06/11 13:03:17
|
||||||
|
3
|
||||||
|
2020/06/11 13:19:37
|
||||||
|
3
|
||||||
|
2020/06/11 13:29:21
|
||||||
|
4
|
||||||
|
2020/06/11 13:40:35
|
||||||
|
4
|
||||||
|
2020/06/11 13:57:15
|
||||||
|
3
|
||||||
|
2020/06/11 14:08:44
|
||||||
|
4
|
||||||
|
2020/06/11 14:25:15
|
||||||
|
4
|
||||||
|
2020/06/11 14:28:34
|
||||||
|
4
|
||||||
|
2020/06/11 14:45:10
|
||||||
|
3
|
||||||
|
2020/06/11 15:01:34
|
||||||
|
3
|
||||||
|
2020/06/11 15:19:40
|
||||||
|
4
|
||||||
|
2020/06/11 15:27:50
|
||||||
|
4
|
||||||
|
2020/06/11 15:29:12
|
||||||
|
4
|
||||||
|
2020/06/11 15:45:34
|
||||||
|
4
|
||||||
|
2020/06/11 15:48:51
|
||||||
|
4
|
||||||
|
2020/06/11 16:05:32
|
||||||
|
3
|
||||||
|
2020/06/11 16:19:49
|
||||||
|
4
|
||||||
|
2020/06/11 16:23:57
|
||||||
|
4
|
||||||
|
2020/06/11 16:40:45
|
||||||
|
4
|
||||||
|
2020/06/11 16:54:53
|
||||||
|
4
|
||||||
|
2020/06/11 16:58:53
|
||||||
|
4
|
||||||
|
2020/06/11 17:00:31
|
||||||
|
4
|
||||||
|
2020/06/11 17:03:18
|
||||||
|
4
|
||||||
|
2020/06/11 17:06:44
|
||||||
|
4
|
||||||
|
2020/06/11 17:11:19
|
||||||
|
4
|
||||||
|
2020/06/11 17:28:00
|
||||||
|
3
|
||||||
|
2020/06/11 17:44:22
|
||||||
|
3
|
||||||
|
2020/06/11 18:00:56
|
||||||
|
3
|
||||||
|
2020/06/11 18:17:30
|
||||||
|
3
|
||||||
|
2020/06/11 18:33:23
|
||||||
|
4
|
||||||
|
2020/06/11 18:50:14
|
||||||
|
3
|
||||||
|
2020/06/11 19:06:37
|
||||||
|
3
|
||||||
|
2020/06/11 19:21:19
|
||||||
|
4
|
||||||
|
2020/06/11 19:23:49
|
||||||
|
4
|
||||||
|
2020/06/11 19:28:44
|
||||||
|
4
|
||||||
|
2020/06/11 19:34:24
|
||||||
|
3
|
||||||
|
2020/06/11 19:39:58
|
||||||
|
3
|
||||||
|
2020/06/11 19:45:35
|
||||||
|
3
|
||||||
|
2020/06/11 19:47:22
|
||||||
|
6
|
||||||
|
2020/06/11 19:53:14
|
||||||
|
3
|
||||||
|
2020/06/11 19:58:44
|
||||||
|
3
|
||||||
|
2020/06/11 20:06:06
|
||||||
|
4
|
||||||
|
2020/06/11 20:11:45
|
||||||
|
3
|
||||||
|
2020/06/11 20:19:06
|
||||||
|
4
|
||||||
|
2020/06/11 20:24:49
|
||||||
|
3
|
||||||
|
2020/06/11 20:30:39
|
||||||
|
3
|
||||||
|
2020/06/11 20:36:14
|
||||||
|
3
|
||||||
|
2020/06/11 20:41:51
|
||||||
|
3
|
||||||
|
2020/06/11 20:47:28
|
||||||
|
3
|
||||||
|
2020/06/11 20:53:05
|
||||||
|
3
|
||||||
|
2020/06/11 20:58:56
|
||||||
|
3
|
||||||
|
2020/06/11 21:06:14
|
||||||
|
4
|
||||||
|
2020/06/11 21:11:56
|
||||||
|
3
|
||||||
|
2020/06/11 21:17:34
|
||||||
|
3
|
||||||
|
2020/06/11 21:23:10
|
||||||
|
3
|
||||||
|
2020/06/11 21:28:47
|
||||||
|
3
|
||||||
|
2020/06/11 21:34:29
|
||||||
|
3
|
||||||
|
2020/06/11 21:40:21
|
||||||
|
3
|
||||||
|
2020/06/11 21:45:58
|
||||||
|
3
|
||||||
|
2020/06/11 21:51:40
|
||||||
|
3
|
||||||
|
2020/06/11 21:57:12
|
||||||
|
3
|
||||||
|
2020/06/11 22:02:58
|
||||||
|
3
|
||||||
|
2020/06/11 22:08:27
|
||||||
|
3
|
||||||
|
2020/06/11 22:14:08
|
||||||
|
3
|
||||||
|
2020/06/11 22:19:45
|
||||||
|
3
|
||||||
|
2020/06/11 22:25:23
|
||||||
|
3
|
||||||
|
2020/06/11 22:31:04
|
||||||
|
3
|
||||||
|
2020/06/11 22:36:37
|
||||||
|
3
|
||||||
|
2020/06/11 22:42:25
|
||||||
|
3
|
||||||
|
2020/06/11 22:49:45
|
||||||
|
4
|
||||||
|
2020/06/11 22:55:22
|
||||||
|
3
|
||||||
|
2020/06/11 23:01:12
|
||||||
|
3
|
||||||
|
2020/06/11 23:06:47
|
||||||
|
3
|
||||||
|
2020/06/11 23:12:26
|
||||||
|
3
|
||||||
|
2020/06/11 23:18:03
|
||||||
|
3
|
||||||
|
2020/06/11 23:23:44
|
||||||
|
3
|
||||||
|
2020/06/11 23:29:34
|
||||||
|
3
|
||||||
|
2020/06/11 23:35:09
|
||||||
|
3
|
||||||
|
2020/06/11 23:40:51
|
||||||
|
3
|
||||||
|
2020/06/11 23:46:26
|
||||||
|
3
|
||||||
|
2020/06/11 23:52:06
|
||||||
|
3
|
||||||
|
2020/06/11 23:59:22
|
||||||
|
4
|
||||||
|
2020/06/12 00:05:01
|
||||||
|
3
|
||||||
|
2020/06/12 00:20:36
|
||||||
|
3
|
||||||
|
2020/06/12 00:26:12
|
||||||
|
3
|
||||||
|
2020/06/12 00:31:48
|
||||||
|
3
|
||||||
|
2020/06/12 00:37:38
|
||||||
|
3
|
||||||
|
2020/06/12 00:43:13
|
||||||
|
3
|
||||||
|
2020/06/12 00:49:01
|
||||||
|
3
|
||||||
|
2020/06/12 00:56:21
|
||||||
|
4
|
||||||
|
2020/06/12 01:02:22
|
||||||
|
3
|
||||||
|
2020/06/12 01:08:24
|
||||||
|
3
|
||||||
|
2020/06/12 01:14:19
|
||||||
|
3
|
||||||
|
2020/06/12 01:19:57
|
||||||
|
3
|
||||||
|
2020/06/12 01:25:30
|
||||||
|
3
|
||||||
|
2020/06/12 01:31:06
|
||||||
|
3
|
||||||
|
2020/06/12 01:36:44
|
||||||
|
3
|
||||||
|
2020/06/12 01:42:21
|
||||||
|
3
|
||||||
|
2020/06/12 01:47:54
|
||||||
|
3
|
||||||
|
2020/06/12 01:53:32
|
||||||
|
3
|
||||||
|
2020/06/12 01:59:08
|
||||||
|
3
|
||||||
|
2020/06/12 02:04:47
|
||||||
|
3
|
||||||
|
2020/06/12 02:10:22
|
||||||
|
3
|
||||||
|
2020/06/12 02:16:01
|
||||||
|
3
|
||||||
|
2020/06/12 02:21:37
|
||||||
|
3
|
||||||
|
2020/06/12 02:27:09
|
||||||
|
3
|
||||||
|
2020/06/12 02:32:49
|
||||||
|
3
|
||||||
|
2020/06/12 02:38:23
|
||||||
|
3
|
||||||
|
2020/06/12 02:44:01
|
||||||
|
3
|
||||||
|
2020/06/12 02:49:37
|
||||||
|
3
|
||||||
|
2020/06/12 02:55:13
|
||||||
|
3
|
||||||
|
2020/06/12 03:00:54
|
||||||
|
3
|
||||||
|
2020/06/12 03:06:28
|
||||||
|
3
|
||||||
|
2020/06/12 03:12:06
|
||||||
|
3
|
||||||
|
2020/06/12 03:17:40
|
||||||
|
3
|
||||||
|
2020/06/12 03:23:31
|
||||||
|
3
|
||||||
|
2020/06/12 03:29:07
|
||||||
|
3
|
||||||
|
2020/06/12 03:34:45
|
||||||
|
3
|
||||||
|
2020/06/12 03:42:18
|
||||||
|
4
|
||||||
|
2020/06/12 03:47:57
|
||||||
|
3
|
||||||
|
2020/06/12 03:53:32
|
||||||
|
3
|
||||||
|
2020/06/12 04:00:56
|
||||||
|
4
|
||||||
|
2020/06/12 04:06:35
|
||||||
|
3
|
||||||
|
2020/06/12 04:12:29
|
||||||
|
3
|
||||||
|
2020/06/12 04:18:12
|
||||||
|
3
|
||||||
|
2020/06/12 04:23:59
|
||||||
|
3
|
||||||
|
2020/06/12 04:29:36
|
||||||
|
3
|
||||||
|
2020/06/12 04:35:18
|
||||||
|
3
|
||||||
|
2020/06/12 04:40:51
|
||||||
|
3
|
||||||
|
2020/06/12 04:46:32
|
||||||
|
3
|
||||||
|
2020/06/12 04:52:06
|
||||||
|
3
|
||||||
|
2020/06/12 04:57:42
|
||||||
|
3
|
||||||
|
2020/06/12 05:03:18
|
||||||
|
3
|
||||||
|
2020/06/12 05:08:53
|
||||||
|
3
|
||||||
|
2020/06/12 05:14:36
|
||||||
|
3
|
||||||
|
2020/06/12 05:20:10
|
||||||
|
3
|
||||||
|
2020/06/12 05:25:45
|
||||||
|
3
|
||||||
|
2020/06/12 05:31:21
|
||||||
|
3
|
||||||
|
2020/06/12 05:36:59
|
||||||
|
3
|
||||||
|
2020/06/12 05:47:32
|
||||||
|
3
|
||||||
|
2020/06/12 05:53:10
|
||||||
|
3
|
||||||
|
2020/06/12 05:58:46
|
||||||
|
3
|
||||||
|
2020/06/12 06:04:24
|
||||||
|
3
|
||||||
|
2020/06/12 06:11:42
|
||||||
|
4
|
||||||
|
2020/06/12 06:19:07
|
||||||
|
4
|
||||||
|
2020/06/12 06:26:49
|
||||||
|
4
|
||||||
|
2020/06/12 06:32:39
|
||||||
|
3
|
||||||
|
2020/06/12 06:38:15
|
||||||
|
3
|
||||||
|
2020/06/12 06:43:53
|
||||||
|
3
|
||||||
|
2020/06/12 06:51:11
|
||||||
|
4
|
||||||
|
2020/06/12 06:56:51
|
||||||
|
3
|
||||||
|
2020/06/12 07:02:28
|
||||||
|
3
|
||||||
|
2020/06/12 07:08:04
|
||||||
|
3
|
||||||
|
2020/06/12 07:13:45
|
||||||
|
3
|
||||||
|
2020/06/12 07:19:36
|
||||||
|
3
|
||||||
|
2020/06/12 07:25:14
|
||||||
|
3
|
||||||
|
2020/06/12 07:30:50
|
||||||
|
3
|
||||||
|
2020/06/12 07:36:27
|
||||||
|
3
|
||||||
|
2020/06/12 07:42:06
|
||||||
|
3
|
||||||
|
2020/06/12 07:47:56
|
||||||
|
3
|
||||||
|
2020/06/12 07:53:40
|
||||||
|
3
|
||||||
|
2020/06/12 07:59:19
|
||||||
|
3
|
||||||
|
2020/06/12 08:05:00
|
||||||
|
3
|
||||||
|
2020/06/12 08:10:45
|
||||||
|
3
|
||||||
|
2020/06/12 08:16:54
|
||||||
|
3
|
||||||
|
2020/06/12 08:22:28
|
||||||
|
3
|
||||||
|
2020/06/12 08:29:50
|
||||||
|
4
|
||||||
|
2020/06/12 08:35:36
|
||||||
|
3
|
||||||
|
2020/06/12 08:41:12
|
||||||
|
3
|
||||||
|
2020/06/12 08:47:00
|
||||||
|
3
|
||||||
|
2020/06/12 08:52:41
|
||||||
|
3
|
||||||
|
2020/06/12 08:58:15
|
||||||
|
3
|
||||||
|
2020/06/12 09:03:52
|
||||||
|
3
|
||||||
|
2020/06/12 09:09:26
|
||||||
|
3
|
||||||
|
2020/06/12 09:15:05
|
||||||
|
3
|
||||||
|
2020/06/12 09:20:45
|
||||||
|
3
|
||||||
|
2020/06/12 09:26:19
|
||||||
|
3
|
||||||
|
2020/06/12 09:29:45
|
||||||
|
4
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
-- Scripts qui permet d'enregistrer la raison du boot dans la flash
|
-- Scripts qui permet d'enregistrer la raison du boot dans la flash
|
||||||
|
|
||||||
print("\n 0_rec_boot.lua zf200611.1705 \n")
|
print("\n 0_rec_boot.lua zf200612.1117 \n")
|
||||||
|
|
||||||
-- Problématique:
|
-- Problématique:
|
||||||
-- Afin de pouvoir enregistrer l'heure du boot dans la FLASH il faut
|
-- Afin de pouvoir enregistrer l'heure du boot dans la FLASH il faut
|
||||||
@@ -34,6 +34,7 @@ function rec_boot()
|
|||||||
file.close()
|
file.close()
|
||||||
zboot_detail=nil zboot_reason=nil tm=nil
|
zboot_detail=nil zboot_reason=nil tm=nil
|
||||||
ztime_format=nil rec_boot=nil
|
ztime_format=nil rec_boot=nil
|
||||||
|
collectgarbage() print(node.heap())
|
||||||
end
|
end
|
||||||
|
|
||||||
if verbose then print("End tmr_rec_boot1:") end
|
if verbose then print("End tmr_rec_boot1:") end
|
||||||
|
|||||||
@@ -129,10 +129,6 @@ end
|
|||||||
--net.createServer(net.TCP, 180):listen(23, telnet_listener)
|
--net.createServer(net.TCP, 180):listen(23, telnet_listener)
|
||||||
print("Revers telnet server running...\n")
|
print("Revers telnet server running...\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function rt_connect()
|
function rt_connect()
|
||||||
srv_rt = nil collectgarbage() srv_rt = net.createConnection(net.TCP, 0)
|
srv_rt = nil collectgarbage() srv_rt = net.createConnection(net.TCP, 0)
|
||||||
srv_rt:on("connection", function(sck)
|
srv_rt:on("connection", function(sck)
|
||||||
|
|||||||
@@ -1,27 +1,6 @@
|
|||||||
-- Scripts à charger après le boot pour démarrer son projet
|
-- Scripts à charger après le boot pour démarrer son projet
|
||||||
|
|
||||||
print("\n boot.lua zf200611.1328 \n")
|
print("\n boot.lua zf200612.0936 \n")
|
||||||
|
|
||||||
-- function ztime_stamp() return tmr.now()/1000000 end
|
|
||||||
|
|
||||||
-- sntp.sync(nil, nil, nil, 1)
|
|
||||||
--
|
|
||||||
-- function ztime_format(ztime)
|
|
||||||
-- tm = rtctime.epoch2cal(ztime + 3600)
|
|
||||||
-- return(string.format("%04d/%02d/%02d %02d:%02d:%02d", tm["year"], tm["mon"], tm["day"], tm["hour"], tm["min"], tm["sec"]))
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- print(ztime_format(rtctime.get()+3600))
|
|
||||||
--
|
|
||||||
-- zsec, zusec = rtctime.get()
|
|
||||||
--
|
|
||||||
-- print(zsec, zusec)
|
|
||||||
-- zsec=zsec+3600+zusec/1000000
|
|
||||||
-- print(ztime_format(zsec))
|
|
||||||
--
|
|
||||||
-- print(zsec)
|
|
||||||
-- znanosec= zsec*1000000000
|
|
||||||
-- print(znanosec)
|
|
||||||
|
|
||||||
function boot()
|
function boot()
|
||||||
verbose = false
|
verbose = false
|
||||||
@@ -47,11 +26,11 @@ function boot()
|
|||||||
collectgarbage() print(node.heap())
|
collectgarbage() print(node.heap())
|
||||||
|
|
||||||
zpower=0
|
zpower=0
|
||||||
-- f="0_get_power.lua" if file.exists(f) then dofile(f) end
|
f="0_get_power.lua" if file.exists(f) then dofile(f) end
|
||||||
-- collectgarbage() print(node.heap())
|
collectgarbage() print(node.heap())
|
||||||
|
|
||||||
-- f="0_cron.lua" if file.exists(f) then dofile(f) end
|
f="0_cron.lua" if file.exists(f) then dofile(f) end
|
||||||
-- collectgarbage() print(node.heap())
|
collectgarbage() print(node.heap())
|
||||||
|
|
||||||
print("verbose:",verbose) print("le boot est lancé...")
|
print("verbose:",verbose) print("le boot est lancé...")
|
||||||
gpio.write(zLED, gpio.HIGH)
|
gpio.write(zLED, gpio.HIGH)
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
-- Scripts pour régler l'horloge quand on est connecté en WIFI
|
||||||
|
-- Permet aussi de 'compresser' le unix time afin de prendre moins de place dans les strings
|
||||||
|
-- je suis en train de faire une version plus économique au niveau RAM (voir à la fin)
|
||||||
|
print("\n set_time2.lua zf200611.1926 \n")
|
||||||
|
|
||||||
|
--source: https://www.freeformatter.com/epoch-timestamp-to-date-converter.html
|
||||||
|
|
||||||
|
ztime2019 = 1546300800 -- Unix time pour le 1.1.2019
|
||||||
|
|
||||||
|
function set_time()
|
||||||
|
sntp.sync(nil, nil, nil, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ztime_compress(ztime_long)
|
||||||
|
return ztime_long - ztime2019
|
||||||
|
end
|
||||||
|
|
||||||
|
function ztime_uncompress(ztime_short)
|
||||||
|
return ztime_short + ztime2019
|
||||||
|
end
|
||||||
|
|
||||||
|
function ztime_format(ztime)
|
||||||
|
tm = rtctime.epoch2cal(ztime + 3600)
|
||||||
|
return(string.format("%04d/%02d/%02d %02d:%02d:%02d", tm["year"], tm["mon"], tm["day"], tm["hour"], tm["min"], tm["sec"]))
|
||||||
|
end
|
||||||
|
|
||||||
|
set_time()
|
||||||
|
print(ztime_format(rtctime.get()))
|
||||||
|
|
||||||
|
|
||||||
|
-- function ztime_stamp() return tmr.now()/1000000 end
|
||||||
|
|
||||||
|
-- sntp.sync(nil, nil, nil, 1)
|
||||||
|
--
|
||||||
|
-- function ztime_format(ztime)
|
||||||
|
-- tm = rtctime.epoch2cal(ztime + 3600)
|
||||||
|
-- return(string.format("%04d/%02d/%02d %02d:%02d:%02d", tm["year"], tm["mon"], tm["day"], tm["hour"], tm["min"], tm["sec"]))
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- print(ztime_format(rtctime.get()+3600))
|
||||||
|
--
|
||||||
|
-- zsec, zusec = rtctime.get()
|
||||||
|
--
|
||||||
|
-- print(zsec, zusec)
|
||||||
|
-- zsec=zsec+3600+zusec/1000000
|
||||||
|
-- print(ztime_format(zsec))
|
||||||
|
--
|
||||||
|
-- print(zsec)
|
||||||
|
-- znanosec= zsec*1000000000
|
||||||
|
-- print(znanosec)
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
-- Petit script pour initaliser la couche WIFI
|
-- Petit script pour initaliser la couche WIFI
|
||||||
|
|
||||||
function wifi_init()
|
function wifi_init()
|
||||||
print("\n wifi_init.lua zf200611.1157 \n")
|
print("\n wifi_init.lua zf200612.0943 \n")
|
||||||
|
|
||||||
f= "secrets_wifi.lua" if file.exists(f) then dofile(f) end
|
f= "secrets_wifi.lua" if file.exists(f) then dofile(f) end
|
||||||
f= "secrets_project.lua" if file.exists(f) then dofile(f) end
|
f= "secrets_project.lua" if file.exists(f) then dofile(f) end
|
||||||
|
|||||||
Reference in New Issue
Block a user