Unable to connect Xiaomi Gateway after changed WiFi

I’ve been using the same gateway for several months, running Home Assistant on VirtualBox.

I purchased a new Mesh WiFi router several weeks ago, but did not have time to set it up and re-connect the Xiaomi Gateway, Yeelights, Fan, etc…

Yesterday I decided to do it, reset the Xiaomi Gateway and connected it to the new WiFi. All was ok at first, devices remained the same in the Mi Home App, but it just wasn’t updating all the sensors and switches… So i deleted one by one and re-added them back.

Once my network was all up, the IPs for all the devices were changed to the same previous ones before the network change i decided to “turn on” the Home Assistant VM. Made the config changes and rebooted.

Xiaomi Aqara was detected but could not configure it from UI…

To make a long story short, i ended up doing an nmap to check the gateway port.

I did it on my Mac and my VM, both showed that port 9898 is closed. I was never closed before.

Tried reset several times and enable the developer mode and “Lan Connection” in Mi Home app, still it shows that the port is closed… and now everytime i “reset” the gateway reconnect, instead of the orange light blinking it will blink cyan and the Chinese lady still will prompt me to connect the gateway.

After several tries, now i can’t even connect the Gateway to the Mi Home app.

There were no updates on firmware before i changed router… Now all the sensors and switched in my home assistant won’t work without the gateway…

Is there a way to hard reset the gateway, I’ve tried holding the button down for 10, 20 , 30 sec still the same…

Finally got the gateway to connect to WiFi… but my port 9898 is now closed, even when i enable LAN on the Mi App…

Weird though, the gateway LED light color seems out of sync, doesn’t display correct color when i change it in Mi App.

Also instead of flasing blue when powered on, it flashes red. Instead of flashing yellow/orange when trying to pair, it flashes cyan.

The radio still works with Home Assistant though

Managed to open back up the port 9898 by using the psm-set network.open_pf 3 method, everything working as it was before. But the LED still blinks red instead of blue when i power on the gateway…