AirPlay server and Time Machine backup on MTK routers (and not only)
Once upon a time, having acquired a Hi-Fi system and a modern laptop of a well-known brand, I completely switched to digital sound, and transmit it wirelessly. And of course in the house there was always a router for "connection with space", with linux inside. In order not to produce essence, it easily turns into a music box and data warehouse, but for some reason Apple users are undeservedly ignored.
There is, for example, the practically cheap router Xiaomi Mi Wi-Fi Mini, which, in addition to supporting 2 Wi-Fi bands, can easily overpower the plan (and any other source code on the Web).
Almost any USB sound card (it should be able to play audio in PCM 44100Hz / 16bit format) or USB speakers is suitable for AirPlay on the router. I use a Muse USB DAC on the PCM2704 digitally connected to a Yamaha receiver.
For backups, Time Machine is suitable for any USB HDD / SSD, but to be able to recover from a drive connected directly to the Mac, it must be formatted as HFS +. A disk may have several partitions with different file systems.
You will also need MI-WRT firmware : a repository with source code.

Many probably well-known project for ASUS rt-n56u routers is taken as the basiswhose author, using the same Transmission and placing the GPL in the root of the source code of the project, by hook or by crook impedes its development, considering it its property.
Currently MI-WRT implements:
- drivers for working with HFS + partitions
- drivers for supporting USB audio cards / speakers / DAC
- AirPlay audio streaming server (shairport-sync 2.8.0)
- AppleShare file server (AFP) (netatalk 3.1 .8)
AiPlay and AFP configuration file editor is available through the WEB interface - section “Administration” - “Other services”.
The firmware is under development, and the full functionality of all functions is not guaranteed, it may damage your router, so use it at your own risk!
Current shortcomings :
- AirPlay has audio delays when playing video from VLC, VOX also works poorly when switching audio output through it. As a solution for VOX - leave the default output in it, and switch to AirPlay at the system level (System Settings - Sound - Exit)
- AFP allows you to connect to disks only in guest mode. Since mdns is not used, in order for OS X to see the disk for Time Machine and allow it to be selected as the disk for backup, you must first connect to it in Finder from the "Transition" - "Connect to Server" menu, indicating the address as afp: // router_name_or_IP In the future, this disk will be mounted automatically.
If you suddenly have a router on MTK7620, MTK7621 - you can download the finished assembly for ASUS RT-N14U, RT-N56U, RT-N56U B1, Xiaomi Mi Mini in the Downloads section of the BitBucket repository.
Firmware for other supported routers (RT-N65, AC51U, AC54U ...) is available on request.
Feature suggestions and error messages are welcome .
PS Installing shairport-sync and netatalk is also possible on other devices through the entware-ng repository .
Good listening!