Target
Xiaomi Gateway Version 1 (It may, or may not, work with other versions).
Behavior
This firmware is based on the NXP app note JN-AN-1189 and more specifically the MainsPowerOutlet example. This means that the flashed gateway will behave as a mains power outlet zigbee device, even if, obviously, the gateway has no relay tied to any of its output. (As far as i have investigated, no useful components is tied to the JN5169 chip of the gateway. Leds, speaker, button, etc.. are connected to the wifi chip pins). Therefore, the only useful application of this purpose is that the gateway will now act as a router and will be able to extend your zigbee network.
I use it with zigbee2mqtt. This work well, even if it is shown as an unrecognized device by zigbee2mqtt. However, it is still behaving as exepected a router.
There is some debugging message that can be monitored on the serial output while running. (especially while joining the network).
Screenshots
Zigbee2mqtt Debugging output while joining my network
Debugging output while joining my network
The flashed gateway acting as a router in my network