You can use this script to dowload firmware when you have trouble with minicom or you want to download from script/IDE.
On Debian based systems install expect and the also nessesary xmodem transfer program as root with
apt-get install expect lrzsz
Binary stty is in essentiall package coreutils which is already installed.
#!/usr/bin/expect -f set dev "/dev/ttyS0" set file "mks1152_96_19in_070204.bin" system "stty 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke < $dev" spawn -open [ open $dev r+ ] send_user "* Waiting for the prompt, please turn on the router\n" expect "ADM5120 Boot:" send_user "\n* Got prompt, waiting for the second prompt\n" send " " expect "Please enter your key : " send_user "\n* Got second prompt, uploading firmware $dev\n" send "a" close system "sx -vv $file > $dev < $dev" spawn -open [ open $dev r+ ] expect "Please enter your key : " send_user "\n* Got second prompt, booting\n" send "c"
Modify the set dev and set file commands and run it. Script is waiting for ADM5120 boot prompt. Next it will download firmware using sx command and boot new firmware.