Use Espressif ESP8266 to control MT7530 switches through MDIO bus so that we can get more functionality on a cheap dumb switch.
This project currently supports configuring VLAN (including saving VLAN settings) and show link status changes.
The code here uses the official ESP8266_RTOS_SDK which can be found here:
https://github.com/espressif/ESP8266_RTOS_SDK
I'm using the master branch (currently v3.1) and you can find compiling guide there.
- Set your MDIO/MDC GPIO in components/mdio_gpio/mdio_gpio.c and flash the binary into ESP8266 board.
- There is a simple serial console available on UART0. Currently you should set everything using that.
LwIP http stack is used and I wrote a spiffs wrapper for custom wwwroot.
- Clone mkspiffs here: https://github.com/igrr/mkspiffs
- Build mkspiffs: make dist CPPFLAGS="-DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1"
- Create your spiffs image: ./mkspiffs -c YOUR_WWW_ROOT -b 4096 -p 128 dest.img
- Flash it on your board: esptool.py write_flash 0x100000 dest.img
I took a lot of work from Linux kernel and OpenWrt so I guess at least the mdio and mt7530 module should be GPL.
- Create a webui for this.
- Add more functions supported by MT7530 like QoS and ACL.