mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Logging ssid to debug network connection issues
This commit is contained in:
parent
3e8fe104c9
commit
556b587059
@ -5,6 +5,7 @@ local accessManager = require('util.access')
|
|||||||
local printDriver = require('print3d')
|
local printDriver = require('print3d')
|
||||||
local printerUtils = require('util.printer')
|
local printerUtils = require('util.printer')
|
||||||
local printerAPI = require('rest.api.api_printer')
|
local printerAPI = require('rest.api.api_printer')
|
||||||
|
local wifi = require('network.wlanconfig')
|
||||||
|
|
||||||
local TMP_DIR = '/tmp'
|
local TMP_DIR = '/tmp'
|
||||||
local LOG_COLLECT_DIRNAME = 'wifibox-logs'
|
local LOG_COLLECT_DIRNAME = 'wifibox-logs'
|
||||||
@ -112,10 +113,13 @@ end
|
|||||||
|
|
||||||
function M.status(request, response)
|
function M.status(request, response)
|
||||||
|
|
||||||
|
local ds = wifi.getDeviceState()
|
||||||
|
log:debug(" ssid: "..utils.dump(ds.ssid))
|
||||||
|
|
||||||
local rv
|
local rv
|
||||||
rv, state = printerAPI.state(request, response)
|
rv, state = printerAPI.state(request, response)
|
||||||
if(rv == false) then return end
|
if(rv == false) then return end
|
||||||
|
|
||||||
if(state ~= "disconnected") then
|
if(state ~= "disconnected") then
|
||||||
rv = printerAPI.temperature(request, response)
|
rv = printerAPI.temperature(request, response)
|
||||||
if(rv == false) then return end
|
if(rv == false) then return end
|
||||||
|
@ -209,6 +209,10 @@ end
|
|||||||
|
|
||||||
function M.alive(request, response)
|
function M.alive(request, response)
|
||||||
response:setSuccess("alive")
|
response:setSuccess("alive")
|
||||||
|
|
||||||
|
local ds = wifi.getDeviceState()
|
||||||
|
log:debug(" ssid: "..utils.dump(ds.ssid))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Loading…
Reference in New Issue
Block a user