Hard Bricked Xiaomi 4A Gigabyte

Hi friends!

During an update, i hard bricked my 4A and since nothing happened when i plug it in my pc with ethernet cable. I fix the ip on 192.168.2.1 (as you can see on the screen at the end) , file "test.bin" with last firmware is OK and then : "DHCPc:no other DHCPd discovered"

Power button is OK (when i hold 5 secondes it start to flash) and internet button is blue fixed everytime... When i type 192.168.31.1 nothing happened.

With Xiaomi repair toolkit, yellow button is bliking every secondes. Blue button is blink very very quickly during 5seconds at beggining of procedure and then stay fix. And nothing happends, no transfer...

I'm sorry to make a new post for this but i read all this topic and i'm a little confused ... i tried every single methods to unbrick my 4A from @Zorro, both videos of @hoddy, kurf11k ... . Tiny PXE, Xiaomi Tool repair, DHCP mode + Tftpd ... But software never recognize my router plug with an ethernet cable to my pc on the blue port (right side from behind).

Thanks for reading :slight_smile:
Sam

I Tiny PXE

Your screenshot says 'dhcpd67 error, could not bind socket, address and port are already in use'
So it seems you have another process using the dhcp port?

I dont use windows so cant help you on that, but my docker recovery image will get your router going again in linux.

1 Like

Thanks for your answer @db260179

Yes it's a wifi laptop and it's connected to internet in dhcp when i'm doing the procedure. I will try with wifi disconnected (i don't think it that because i ve also try on a desktop pc without wifi) and i tell you quickly.

I've a virtual machine with the last ubuntu on it but i'm novice novice in ubuntu do you think you can guide from A to Z?

Thanks.

You will need to have an ethernet cable and plug the laptop directly to this 4A router.
In your ubuntu vm, make sure you have this interface set to a static ip address.

In your ubuntu vm, install docker engine - https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Then follow - https://docs.docker.com/engine/install/linux-postinstall/

Make sure the ubuntu vm has git installed - sudo apt install git

Then clone my repo -

git clone https://gitlab.com/db260179/xiaomi-m4a.githttps://gitlab.com/db260179/xiaomi-m4a.git

In a terminal on the ubuntu vm,

cd xiaomi-m4a/docker
./tftpserver.sh build
./tftpserver.sh start

On the router, unplug power, hold reset button, keep held down, plug power back in, release reset button once orange led is flashing.
You can watch if the dnsmasq has served the file by doing a

docker logs mi4a-openwrt-recovery -f

Just make sure ethernet interface in virtualbox is a bridged mode so the router can pick up the bootp mode.

Ideally for all of this you need a uart lead to see what the router is doing, as its possible the flash chip is faulty.

Just look up for virtual box examples and ubuntu commands etc.

Sorry, forgot you need internet on that pc to download the docker images.
So in virtual box, add another interface as a nat interface, set it in ubuntu vm as dhcp.

The static ip you set, remove the gateway part as thats not needed.

Just a note, if the router doesnt pick up the bootfile, just do a

./tftpserver stop && ./tftpserver start

Hi, I think there is something wrong with the steps. I did everything as you instructed, though docker doesn't seem to be creating the right container. The build script seems to be running fine as it outputs

Successfully built 3f0a82a5c003
Successfully tagged mi4a-dnsmasq:latest

Though, this is what I get when I start the server:
b933ba210da7e778dc39cf87fa529ba85cd6ce19dcdda568a41b0cee94f43b1f

It becomes apparent that the container does not exist when I try to stop the server:
Error response from daemon: No such container: mi4a-openwrt-recovery
docker logs mi4a-openwrt-recovery -f has the same output.

Works fine for me?

Successfully built c0c55cc13823
Successfully tagged mi4a-dnsmasq:latest
[d@lap docker]$ ./tftpserver.sh start
e185bf7419ab3e2c6fddd33c5d201d801207c9f0413fd38a72df1548d2f468e9
[d@lap docker]$ ./tftpserver.sh stop
mi4a-openwrt-recovery

Make sure to do a git pull for latest changes and use the tftpserver script

Thank you for your very usable guidance. I made it and tried to unbrick my router, the last log line is the following:
"dnsmasq-tftp: sent /tftpboot/test.bin to 192.168.31.11"

But the led light blinking purple very fast and nothing else happened. The router kept in bricked state.

Maybe the test.bin not correct for my router? Is it available any else from somewhere?

Or can I use any other method to revert any normal mode (instead of openwrt)?

Thank you for your help in advance.

1 Like

Dear gyurix
I have exactly this problem, Unfortunately any of methods not worked for me. Also tried many images but all was unsuccessful. (tinyxpe, miwifi tool, dnsmasq as tftp all falled back to bricked state with purple light blinking).
Did you find a way or a firmware to solve this problem?
My router is xiaomi 4a giga version, international.

Then you'll need serial to find out what's going on.

https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition#serial

1 Like

Hi b3hzad1, my solution was finding @xabolcs :slight_smile: who helped me but via serial console accessing the router. No any other way helped me unfortunately.

1 Like