i’ve bricked a cheap home router. i’ve installed a beta of dd-wrt firmware which did not work. raspberry pi gave me serial connection to it.
i knew it’s possible to rescue the router by using built-in serial port and fetching new firmware via tftp. there was just one problem – my pc did not have a serial port, and even if it had one – it would be RS232, while router in question had 3.3V level serial. so i’d need signal level converter like max232… or not – raspberry pi has programmable pins that can be used as a serial port, those work already on 3.3V level. great!
what i had to change on my raspberry pi 3b running raspbian:
- /boot/config.txt – added enable_uart=1
- /boot/cmdline.txt – removed console=ttyAMA0,115200
- run: systemctl stop serial-getty@ttyS0.service; systemctl disable serial-getty@ttyS0.service
- and reboot
i’ve compiled steps above from different sites, only afterwards i saw that this page describes it in nearly the same way.
after that i’ve installed minicom, run it, configured to use /dev/serial0, 115200 8N1 [ i knew it was the standard used by the router to communicate ]. and that’s it – after powering on the router i saw its bootloader in minicom. here‘s the process description.