You can use web UI console
Console cable
SSH with program like putty
once logged into the switch copy and paste the below into the console
Hit enter if needed to force reboot
cmd
cat<<EOF>cfgfile
MAC=EC:13:B2:A1:31:38
MODEL=WS-12-DC
BOARDREV=F
SERIAL=0
EOF
mtd write cfgfile config
reboot