[TRANSLATED via Google Translate]
Hey everyone!
I’m here to tell you how I won the battle against a MikroTik wAP AC (RBwAPG-5HacD2HnD) r3 that absolutely refused to cooperate.
The drama:
The device came with RouterOS v7. I downgraded it to 6.44.6 via Netinstall (as per the standard procedure), but the TFTP method for booting OpenWrt was a total failure. The router wouldn't even deign to request the vmlinux file. Literally, I spent hours watching the traffic with Wireshark and got nothing. The factory bootloader is a headache and wanted nothing to do with non-MikroTik images.
The solution (the brute-force way):
I got fed up, grabbed my CH341A programmer (the cheap $5 Chinese one), desoldered the WSON-8 chip (a 16MB Winbond W25Q128) using a hot air station, and connected it to the programmer.
Here is the step-by-step process that worked for me on the first try (after frying a few brain cells):
Mandatory backup: Before touching anything, I made an exact copy of the flash memory just in case everything blew up.
flashrom -p ch341a_spi -c "W25Q128.V..M" -r backup_original.bin
The bootloader trick: The original bootloader takes up just the first megabyte (1MB). If you erase it, the device gets bricked. So, I extracted it:
dd if=backup_original.bin of=bootloader.bin bs=1M count=1
Building the Frankenstein (combined image): I created a 16MB file filled with zeros, then pasted the bootloader at the beginning and the OpenWrt sysupgrade image right after it (at the 1MB offset). It ended up looking like this:
dd if=/dev/zero of=imagen_completa.bin bs=16M count=1
dd if=bootloader.bin of=imagen_completa.bin conv=notrunc
dd if=openwrt-25.12.4-ipq40xx-mikrotik-mikrotik_wap-ac-squashfs-sysupgrade.bin of=imagen_completa.bin bs=1M seek=1 conv=notrunc
text
Flashing: I sent the combined file to the flash chip:
flashrom -p ch341a_spi -c "W25Q128.V..M" -w imagen_completa.bin
The moment of truth: I soldered the chip back onto the board (being very careful not to bridge any pins) and plugged it in... Ping to 192.168.1.1! And SSH was working. It was perfect.
Watch out for these details—they almost made me throw in the towel:
As soon as it boots, run passwd to set a root password.
Key tip: If you're going to install packages using apk, set the system date first. If the date is behind, SSL certificates fail and throw a really weird error. That happened to me, and I spent 20 minutes cursing at it. To fix it: date 062522302026 (this sets it to June 25, 2026, at 22:30).
The mini-PCIe slot is USB-only (for 4G modems), so if you want to install a Wi-Fi card, lspci won't show anything. The router taught me that lesson the hard way, haha.
Has anyone else had this same battle with the MikroTik bootloader?
Here is the full write-up I created (in Spanish), including all the details on desoldering, the exact commands, and photos, in case you want to dig deeper:
I hope this helps someone out and that you don't spend the weekend the way I did!
Best regards,
Matías (zhack)
[ORIGINAL]
¡Buenas gente!
Les vengo a contar cómo le gané la pulseada a un MikroTik wAP AC (RBwAPG-5HacD2HnD) r3 que se negaba rotundamente a cooperar.
El drama:
El bicho vino con RouterOS v7. Hice el downgrade a 6.44.6 por Netinstall (como dice la teoría), pero el método TFTP para bootear OpenWrt fue un fracaso total. El router directamente ni se dignaba a pedir el archivo vmlinux. Literal, me clavé horas viendo el tráfico con Wireshark y nada. El bootloader de fábrica es un dolor de cabeza y no quería saber nada con imágenes que no fueran de MikroTik.
La solución (a lo bruto):
Me harté, agarré el programador CH341A (el chinito de 5 dólares), desoldé el chip WSON-8 (un Winbond W25Q128 de 16MB) con la estación de calor y lo conecté al programador.
Acá va el paso a paso que me funcionó a la primera (después de quemar un par de neuronas):
-
Backup obligatorio: Antes de tocar nada, le saqué una copia exacta a la flash por si todo explotaba.
flashrom -p ch341a_spi -c "W25Q128.V..M" -r backup_original.bin -
El truco del bootloader: El bootloader original ocupa apenas el primer mega (1MB). Si lo borras, el equipo queda tieso. Así que lo extraje:
dd if=backup_original.bin of=bootloader.bin bs=1M count=1 -
Armar el Frankenstein (imagen combinada): Creé un archivo de 16MB lleno de ceros y pegué el bootloader al principio, y la imagen
sysupgradede OpenWrt justo después (offset 1MB). Quedó así:
dd if=/dev/zero of=imagen_completa.bin bs=16M count=1
dd if=bootloader.bin of=imagen_completa.bin conv=notrunc
dd if=openwrt-25.12.4-ipq40xx-mikrotik-mikrotik_wap-ac-squashfs-sysupgrade.bin of=imagen_completa.bin bs=1M seek=1 conv=notrunc
text
-
Grabar: Le mandé el archivo compuesto a la flash:
flashrom -p ch341a_spi -c "W25Q128.V..M" -w imagen_completa.bin -
El momento de la verdad: Volví a soldar el chip en la placa (con mucho cuidado de no hacer un puente entre pines) y al enchufarlo... ¡Ping a 192.168.1.1! Y SSH andando. Un lujo.
Ojo con estos detalles que casi me hacen tirar la toalla:
- Apenas arranca, metan
passwdpara ponerle clave al root. - Dato clave: Si van a instalar paquetes con
apk, primero ajusten la fecha del sistema. Si la fecha está atrasada, los certificados SSL truenan y te tira un error rarísimo. A mí me pasó y estuve 20 minutos puteando. Para arreglarlo:date 062522302026(esto lo pone en 25 de junio 2026, 22:30). - El slot mini PCIe que tiene es solo para USB (módems 4G), así que si le quieren poner una WiFi, no van a ver nada con
lspci. Esa también me la cobró el router jaja.
¿Alguien más tuvo esta misma pelea con el bootloader de MikroTik?
Dejo el paper completo que escribí (está en español) con todos los detalles del desoldado, los comandos exactos y fotos por si quieren profundizar:
¡Espero que le sirva a alguien y no pasen el finde como lo pasé yo!
Un abrazo,
Matías (zhack)