mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2026-09-08 08:54:46 +02:00
Add kmod-usb-serial-ftdi as package dependency for FTDI-based 3D printers; fix MAC address lookup; fix dhcp configuration when switching to AP mode; rename api functions in network module; minor fixes and changes.
This commit is contained in:
@@ -17,8 +17,11 @@ end
|
||||
|
||||
function M.test_getMacAddress()
|
||||
local reportedMac = wlanconfig.getMacAddress()
|
||||
local output = captureCommandOutput('ifconfig wlan0')
|
||||
local actualMac = output:match('HWaddr (%w%w:%w%w:%w%w:%w%w:%w%w:%w%w)'):gsub(':', ''):upper()
|
||||
local f = io.open('/sys/class/net/wlan0/address')
|
||||
assert(f)
|
||||
local output = f:read('*all')
|
||||
f:close()
|
||||
local actualMac = output:match('(%w%w:%w%w:%w%w:%w%w:%w%w:%w%w)'):gsub(':', ''):upper()
|
||||
|
||||
assert(reportedMac == actualMac)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user