Xiaomi Gateway no Longer connecting on latest firmware - "Invalid Config"

In my house the coverage of the Xiaomi gateway/hub is better comparing to a cc2531 with zigbee2mqtt. That’s no surprise as the Xiaomi is a bigger box with probably a much better antenna inside then the tiny pcb antenna on the cc2531. But it should be no problem if there are mains connected zigbee devices that can act as zigbee router and/or you use cc2531 devices as routers as explained before.

The count of devices is of which devices connect to the concentrator or to the router. When you have around 16 devices (newer zigbee2mqtt image than mine limits to 20, see below) connected to the concentrator it probably will search for a router in the zigbee mesh network. With concentrator and routers the total would be 50 as this has something to do with connections tables and available memory space in the cc2531 as is mentioned in discussion threads in the zigbee2mqtt git pages.
See also here:

Network size
The CC2531 USB sniffer coordinator firmware has a limit of 20 direct children. This means 1 coordinator + 20 end devices and 0 routers.

However by adding routers to your network you can overcome the limit of 20 devices. This means that, e.g. a network of 1 coordinator, 4 routers and 50 end devices is possible.

The number of childs that a router support differs per device! Therefore, the increased size of a network by adding a router is arbitrary.

1 Like

Thanks again for giving me more detail. I hope a single router will work ok in my small flat. But the PCB antenna limitation is understood. I’ve seen some comments about people using a combination of two different boards ( CC2530 + CC2591 I think) one as a router and the other as the coordinator which comes with an externally attached antenna, but for now, I’m not concerned too much. The gateway annoyed me again today, after HASS restarted it couldn’t connect until I power cycled it.

I had that problem with old router (ISP one), since I installed Edge Router, and set static IP for gateway, I had zero problems.

Glad to help, no problem.
A cc2531 should be fine in a small flat. The combination of cc2530 + cc2591 is of a coordinator and an signal enhancer. The explanation of the cc2591 is: “Power Amplifier (PA) for higher output power and a Low Noise Amplifier (LNA) for improved receiver sensitivity.” See link.
One more tip/advice: I use an 1 mtr USB cable between the Pi and the cc2531 because Wifi, Zigbee (and also Bluetooth) use the same radiofrequency (2.4 Ghz) and can interfere. It works better in my experience and is a tiny investment. Good luck!

Great, will definitely use a usb extension from the usb hub because the rpi is located in a very corner area near lots of computer equipment which might interfere. I will raise the board and put it next to my RF Link legacy arduino receiver (behind a shelf) :slight_smile:

Anything new?
Sadly I’ve upgraded before finding this thread :frowning:

It feels like xiaomi switched the gateway to miio with version 161.

PORT      STATE         SERVICE
4321/udp  closed        rwhois
9898/udp  closed        monkeycom
54321/udp open|filtered bo2k

Looks like the mi home app for iOS won’t let you use it unless you update the firmware.

So I can’t add any new devices until we have a solution here :frowning:

You can follow this instruction.


Or this one.

1 Like

I also ran into this and decided to update the firmware. After doing so, I kept getting an error ‘unable to obtain’ when trying to generate a key. I restarted the hub and then it worked. Everything seems to be working again.

Hi guys. I see I’m not alone. I bought the gayeway few days ago and updated it to latest firmware even before I activated lan access. So now I can’t connect it to hass because enabling of wireless communication protocol has no effect. Ports 9898 and 4123 stay closed no matter I do. I tried enable\disable and key regeneration a lot of times but no luck. It looks like we will have to wait for the next firmware update where xiaomi hopefully fix the issue…

If xiaomi have removed this functionality, then the prospect of them putting it back is minimal IMHO.

Don’t know what the best way to ask xiaomi to fix the access. I used Feedback feature from Mi Home app (enter gateway in the app and open menu with button … -> General Settings -> Feedback). I believe the more people write them – more chance to get it fixed soon. The issue is really frustrating…

1 Like

Agreeing with this.

Hope that everybody writes Xiaomi. Especially since some people report the gateway to be working fine after a while of resetting etc. If that really is the case, and why wouldn’t it be, it is a strong hint that Xiaomi has not disabled the functionality, which means that likely a bug is in the firmware.

This topic https://www.reddit.com/r/homeassistant/comments/a4tl9m/xiaomi_aqara_gateway_connection_problems_when/ suggests problems might occur when you are blocking the internet access of the gateway. Which might make sense. They don’t like to sell cheap quality products but lose control of it.

Can’t confirm. Didn’t block anything from or too xiaomi. The communication port is simply closed.
Seen that someone wrote about 164 firmware. Anyone has experience with it? This firmware isn’t provided on both of my gateways :frowning:

1 Like

No problem with connecting the hub to my wifi on 164. Although with the 164 firmware on the hub I can’t add any new ZigBee devices. At least one more person has confirmed having the same issue.
Would be great if someone else could confirm if you have updated and CAN or CAN’T add new devices.

As stated above, try using the HASS xiaomi add device service

Thank you for your suggestion although I’ve tried that several times.

Guys, it’s cool to hear that you managed to receive firmware updates! Is there any way to get it faster? I’m still
with 1.4.1_161.0143 and my MiHome app says that it is the latest version. Should I use some VPN or proxy? Is it necessary for MiHome app or gateway itself? Could you please advise some working China VPN you used etc.?

Thanks in advance

I didn’t need to use any VPN to update but I use PIA VPN service for other stuff.
Only thing I did that might have speed up my update roll out(although I don’t think so) is I reported an issue about the firmware under help & feedback in the Mi Home app.