Skip to content

feat: discover Mi Box devices - #9

Merged
EndLess728 merged 1 commit into
EndLess728:mainfrom
rootux:feat/discover-mi-box
Nov 9, 2026
Merged

EndLess728 merged 1 commit into
EndLess728:mainfrom
rootux:feat/discover-mi-box

Conversation

@rootux

@rootux rootux commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Discovery skipped Mi Boxes. They advertise _googlecast._tcp like Mi TVs, but with md=MIBOX4 (and a MIBOX4-… service name), so the mitv prefix check dropped them, even though they run the same MiLink service on port 6091.

  • Discovery now accepts the mibox prefix as well as mitv, in the macOS app and in the iOS and Android native modules.
  • The README's discovery note mentions md=MIBOX…, and the compatibility table lists the Mi Box S.

Tested end to end on macOS

On a Mi Box S (MIBOX4), same Wi-Fi as the Mac, with the macOS app built from this branch (./build-app.sh):

Before (main) After (this branch)
Connect sheet: No Mi TV found Remote connected to the Mi Box over MiLink, 61 ms
"No Mi TV found", even with the box on The box shows up under "Found on network"; connected over MiLink, no pairing, 61 ms

How to test

  1. Check what the box advertises (it should list md=MIBOX4):
    dns-sd -B _googlecast._tcp local.                    # note the MIBOX4-… instance name
    dns-sd -L "<MIBOX4-… instance>" _googlecast._tcp local.
  2. Check that MiLink is open: nc -z -w 3 <box-ip> 6091 && echo "MiLink open".
  3. Build and run the macOS app from this branch: cd apps/macos && ./build-app.sh && open "dist/Mi Remote.app".
  4. Open the remote from the menu bar and press Rescan. The box appears under "Found on network"; pick it.
  5. The status line turns green with the box's IP and a latency readout, and the remote's keys act on the box.

The mobile changes are the same one-line check and haven't been run on a device.

Mi Boxes advertise _googlecast._tcp with md=MIBOX…, so the "mitv" name
filter dropped them, even though they run the same MiLink service.
Accept the "mibox" prefix too, in the macOS, iOS and Android apps.

Tested on a Mi Box S (MIBOX4) with the macOS app: found on the network
and controlled over MiLink.
@EndLess728
EndLess728 merged commit d9122dc into EndLess728:main Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants