Hi Luxonis team,
I’m trying to use an OAK camera from inside WSL2, but device discovery does not work there, even though it works from Windows.
My setup:
$$
Host OS: Windows 10 22H2, build 19045
WSL version: 2.7.3.0
WSL distro: Ubuntu 22.04, WSL2
Camera connection: OAK camera connected via physical Ethernet adapter
Internet connection: Wi-Fi
Windows Ethernet adapter has static IP, e.g. 192.168.137.50
WSL uses NAT/vEthernet, e.g. 172.21.x.x
oakctl tools v 0.20 (also tried 0.23 in WSL and it also fails)
$$
What works:
$$
oakctl device list
$$
works correctly on Windows and detects the camera.
The camera can also be pinged by IP from inside WSL.
What does not work:
$$
oakctl device list
$$
inside WSL returns no devices.
I do not want to connect by manually specifying the camera IP. I need discovery to work from inside WSL.
What I tested:
Basic WSL networking works.
UDP packets sent manually from WSL are visible in tcpdump.
Dummy UDP packets from WSL can also be seen on Windows.
Firewall rules for ports 11490 and 11491 are already added.
HNS/WSL networking reset did not help.
WSL1 is not an option for my setup.
Windows 10 is fixed and cannot be upgraded, so WSL mirrored networking is not available.
Interesting finding:
Running strace on WSL showed that oakctl device list appears to use mDNS/DNS-SD discovery, sending queries to:
$$
224.0.0.251:5353
oakagent.tcp.local
robothub-agent.tcp.local
$$
When I run oakctl device list on Windows, I can see related discovery traffic in Wireshark on the physical Ethernet adapter.
When I run oakctl device list inside WSL, I do not see that traffic on the Windows physical Ethernet adapter. So it looks like the mDNS multicast packet is staying inside WSL/vEthernet and is not being forwarded onto the physical Ethernet interface.
My question:
How to make OAK discovery work inside Windows 10 WSL2 NAT networking?
Note however that this worked few days ago (so it is possible) but due to other issues with development tools I made a lot of changes to the whole setup, and now discovery inside WSL does not work anymore.
Thanks!