Function | Definition |
---|---|
mcu.ver() | Get the WiFiMCU firmware version |
mcu.info() | Get the mxchipWNet library version, MAC address, WLAN driver version |
mcu.reboot() | Reboot WiFiMCU |
mcu.mem() | Get the memory status |
mcu.chipid() | Get the stm32 chip ID (96 bits) |
mcu.bootreason() | Get the WiFiMCU boot reason that cause its startup |
Description
Get the WiFiMCU firmware version.
Syntax
nv,bd=mcu.ver()
Parameters
nil
Returns
nv: string type, WiFiMCU firmware version
bd: string type, build date of the firmware
Examples
-nv,bd=mcu.ver()
-print(nv,bd)
-WiFiMCU 0.9.3 build 20150818
Description
Get the mxchipWNet library version, MAC address, WLAN driver version.
Syntax
libv,mac,drv=mcu.info()
Parameters
nil
Returns
libv: mxchipWNet library version
mac: MAC address of the module
drv: WLAN driver version
Examples
-libv,mac,drv=mcu.info()
-print(libv,mac,drv)
-31620002.031 C8:93:46:50:21:4C wl0: Dec 29 2014 14:07:06 version 5.90.230.10 FWID 01-9bdaad4d
Description
Reboot WiFiMCU immediately.
Syntax
mcu.reboot()
Parameters
nil
Returns
nil
Examples
-mcu.reboot()
Description
Get the memory status.
Syntax
fm,tas,mtas,fc=mcu.mem()
Parameters
nil
Returns
fm: Total free space
tas: Total allocated space
mtas: Maximum total allocated space
fc: Number of free chunks
Examples
-fm,tas,mtas,fc=mcu.mem()
-print(fm,tas,mtas,fc)
-35600 50416 86016 25
Description
Get the stm32 chip ID (96 bits).
Syntax
chipid= mcu.chipid()
Parameters
nil
Returns
chipid: the stm32 chip product ID
Examples
-chipid= mcu.chipid()
-print(chipid)
-0200C000FDFFFAE005DFF000
Description
Get the WiFiMCU boot reason that cause its startup.
Syntax
bootreason= mcu. bootreason()
Parameters
nil
Returns
bootreason: The boot reason should be one the followings:
"NONE": Fail to get the boot reason
"SOFT_RST": Software reset
"PWRON_RST": Power on reset
"EXPIN_RST": Pin reset
"WDG_RST": Independent Watchdog reset
"WWDG_RST": Window Watchdog reset
"LOWPWR_RST": Low Power reset
"BOR_RST":POR/PDR or BOR reset
Examples
-mcu.bootreason()
SOFT_RST