Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion

I'd say xiaomi's curl and wget version are too stripped and for some reason they are not working with github right now, maybe something with the certificate (in case of curl, as that wget doesn't even support https)... every site today works with https which (although secure and understandable) can be a headache for things like this.

Confirm first if the router's date and time are OK, because if that isn't correct then it will be a cause for SSL errors (and https is http over SSL).

Other than that, you can try @db260179 build and see if it works, since it's on gitlab, something like:

curl https://gitlab.com/db260179/xiaomi-m4a/uploads/1a59eba3073303f9a46e8e21970ea0fe/openwrt-19.07.4-r11208-ce6496d796-ramips-mt7621-xiaomi_mir4ag-squashfs-sysupgrade.bin --output firmware.bin

It should be stable (more than my build for certain flash chips) and working as well, but if you want later after getting it to work you can use the web interface to flash other firmwares like my build or a custom build you can do using @db260179 image builder (see https://gitlab.com/db260179/xiaomi-m4a/-/releases for downloads, New fixes feedback - Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) thread for feedback on that build)

More complicated would be to download the image to your pc, then set up your own web server (e.g. apache or nginx on linux, or something equivalent on other operating systems) so that they serve the image using http only, and later use wget or curl to download it from your pc... or setup a ftp server, wget should work with that too. It's out of the scope of this thread but if you're using a linux virtual machine you should find lots of tutorials around the web for basic setup of that.

Using a tftp server on your pc should also be possible, as I think xiaomi's firmware includes a tftp client but I'm not sure of that and can't check it now or tell the exact usage, since my router is already on openwrt.

If anyone else reading the thread has suggestions, please tell :slight_smile:

Edit: added --output firmware.bin to curl example above