# Linux/OpenWrt on the SERCOMM NA502/NA502s

In our home, we renovated two of the three floors. Thus, one floor does not have the necessary wiring in place to support the devices we're using on the other floors. Since I already had some experience with Z-Wave, I decided to look for a Z-Wave gateway.

Our home server is in the basement, out of reach for Z-Wave. I started to look for LAN gateway and stumbled upon the “A1 Smart Home Gateway”, a Z-Wave/ZigBee gateway with WiFi and LAN. According to A1, it's locked to A1 and the devices can only be used with A1 Smart Home. Out of curiosity (and, of course, disbelief), I bought a used starter pack for cheap and started to hack around.

To my delight the gateway contains a MediaTek SoC, enough RAM and NAND to run OpenWrt and has an open bootloader! There is a recovery procedure, but the image format is unknown. For now, serial console needs to be added.

A bit later, I also bought a NA502S gateway which has some additional, nice features:

 NA500 NA502S CPU MT7621S MT7621S 256MiB 512MiB 128MiB 128 MiB 1xGBit 1xGBit MT7662EN + MT7603EN MT7662EN MT7603EN yes yes yes yes no yes no yes no yes

## OpenWrt

Porting OpenWrt was relatively straight-forward and almost all devices are working properly. In fact, I have three of these (two NA502, one NA502S) in production use as Z-Wave gateway at different locations, at home and in the office.

The integrated wireless radios can be used by installing ser2net on the NA502. Then, zwavejs2mqtt or ZHA can directly connect via TCP/socket to the radio module. This is working properly and should now also work reliably.