Home App: Support Connections over Cellular via VPN to devices.

jxrxme

Active member
Joined
Feb 29, 2024
Messages
138
If the phone isn’t connected to WiFi the WiiM Home App doesn’t allow to connect my devices. Even if I‘m connected to my home network (via cellular using VPN/WireGuard) and the devices are reachable via IP.
The App should check if the devices are available rather then checking if the phone is connected to a WiFi network.
The WiFi check might make sense for the initial setup but not later while usage.
 
If the phone isn’t connected to WiFi the WiiM Home App doesn’t allow to connect my devices. Even if I‘m connected to my home network (via cellular using VPN/WireGuard) and the devices are reachable via IP.
The app uses mDNS for discovery - as do most of the casting protocols e.g. Spotify/TIDAL/Chromecast - which WireGuard doesn't support (Layer 2 vs 3).
 
Behavior is the same when using VPN/IPsec. The App refuses to do anything if no WiFi connection is detected.

IMG_9439.jpeg
 
The simple solution here would be for the WiiM app to allow manually adding a device using it's IP address, or remembering a previously discovered device, rather than relying on discovery every time but unfortunately this is not the case.

This is the same reason that the WiiM app running on an android VM doesn't find the device as the VM network is NATed through the host interface rather than directly bridged to the network.

To get discovery to work you need to repeat the discovery packets between the two networks.

I have no specific experience with mDNS repeaters over VPN connections, but have done this locally across network VLAN segments with several router makes however this is more simple as only one router is involved.

I don't know the specific network equipment you are using, but I found this guide for repeating mDNS over a microtik wireguard VPN which may point you in the right direction.

 
Last edited:
The simple solution here would be for the WiiM app to allow manually adding a device using it's IP address, or remembering a previously discovered device, rather than relying on discovery every time but unfortunately this is not the case.

This is the same reason that the WiiM app running on an android VM doesn't find the device as the VM network is NATed through the host interface rather than directly bridged to the network.

To get discovery to work you need to repeat the discovery packets between the two networks.

I have no specific experience with mDNS repeaters over VPN connections, but have done this locally across network VLAN segments with several router makes however this is more simple as only one router is involved.

I don't know the specific network equipment you are using, but I found this guide for repeating mDNS over a microtik wireguard VPN which may point you in the right direction.

Adding by ip would be perfect
 
The app uses mDNS for discovery - as do most of the casting protocols e.g. Spotify/TIDAL/Chromecast - which WireGuard doesn't support (Layer 2 vs 3).
mDNS [1] uses a link-local multicast address (224.0.0.251) which by definition doesn't get forwarded across a subnet boundary. So, say your home LAN is 192.168.0.0/24, mDNS won't get forwarded to 192.168.1.0/24 or across a WireGuard NAT since these are different subnets. This is all at layer 3.

At the mikrotik example [2] elsewhere in the thread, there is a filter being added to do subnet forwarding of link-local mDNS multicast to another subnet (wireguard) which is being done for a specific MAC address. It may work, but it's getting hacky and is very bespoke code -- just because you can, doesn't mean you should.
Code:
/interface bridge filter
add action=accept chain=forward comment="Allow mDNS" dst-address=224.0.0.251/32 \
    dst-mac-address=01:00:5E:00:00:FB/FF:FF:FF:FF:FF:FF dst-port=5353 \
    ip-protocol=udp mac-protocol=ip out-interface=EoIP src-port=5353
add action=accept chain=forward comment="Allow SSDP" dst-address=239.255.255.250/32 \
    dst-mac-address=01:00:5E:7F:FF:FA/FF:FF:FF:FF:FF:FF dst-port=1900 \
    ip-protocol=udp log-prefix=SSDP mac-protocol=ip out-interface=EoIP
add action=drop chain=forward out-interface=EoIP
add action=drop chain=output out-interface=EoIP

As a test, I enabled Tailscale (disabled WiFi, so only connecting to home network by 5G) which I use to connect to all my home services. The WiiM app complains about not having WiFi enabled. So, even if one can forward mDNS, the WiiM app may not co-operate.

[1] https://www.ietf.org/rfc/rfc6762.txt
[2] https://forum.mikrotik.com/viewtopic.php?t=194842
 
So, even if one can forward mDNS, the WiiM app may not co-operate.
That’s what I was trying to say…
The Home App needs a fix (it should only check and require a connected WiFi while new device setup).
 
The WiiM app complains about not having WiFi enabled. So, even if one can forward mDNS, the WiiM app may not co-operate.

WiiM does state Wi-Fi in its specs, and given that so many of its features will be crippled I don't see it changing.

Does any other mainstream system work over VPN? What's the use case?
 
Back
Top