Happy to see a solution arose that was able to maintain internet connection while connected to the camera! Playing around with some of the above, the summary I've extracted from this is the following:

Configuring Network Settings

In network settings, not only do you need to make sure you "Manually" specify the IP address to something within the 169.254.XXX.XXX range with a 255.255.0.0 subnet, but you need to also make sure that the Router value is set to the same. So for example, for me, this looks like:

You will then need to check/change the service order, found in the overflow menu here:

Case 1: With Dongle at the TOP of the service order

If you set the dongle as the first-most item in the service order as described in my earlier answer, the issue becomes that MacOS also automatically sets it as the default route for your network traffic. In this case, you need to remove this entry from your routing table and add back your wifi (or wired) internet connection as the default.

So, you would need to do:

>>> sudo route delete default -interface <dongle-interface>
>>> sudo route add default <gateway-ip>

You need to add the second line even if your internet interface (e.g. eth0) appears at the top of the nestat -nr output. For some reason, these prior entries don't seem to kick in automatically when you remove the dongle as the default. Also, at least for me, it doesn't seem necessary to add any additional entries to route relevant traffic directly to the dongle if you do the above.

Case 2: With Dongle at the BOTTOM of the service order

An alternative solution is to do the opposite of what's recommended by my earlier reply and place the dongle at the very bottom of the service order. In this case, you need to add an additional entry to the routing table to route relevant traffic directly to the dongle.

This simply requires a:

>>> sudo route add -net 169.254 -interface <dongle-interface>

Personally, I much rather the second solution (Case 2), because the Oak-D has a tendency to completely disconnect and reconnect to the Mac if you run some pipeline and then exit - this means that you have to repeat the routing table changes every time. On the other hand, the change made with the second approach seems to persist across reconnects.

a year later

Hello @jakaskerl
Hello there I am facing a similar problem with my oak4 d camera I dont have an ethernet internet connect on the device just wifi on my laptop, I can ping to the device ssh into it and all its also listing in adb but when i run any program with depth ai while also specifying its ip it shows no devices detected. I don't know what to do now, also keep in mind I cant get ethernet connected to the camera in any way, now is there a reason why this problem exists. The camera is all fully set up with blue light ok

    Hi KevinSani
    I assume it's not really related to the above thread. I would try to restart the depthai_gate.service on the device. It listens for incoming connections, maybe it died?

    1. ssh or adb into the device
    2. check the status - systemctl status depthai_gate.service
    3. restart - systemctl restart depthai_gate.service
    4. depthai -l (on your host) should now show the device

    Or reboot should do as well.

    Thanks,
    Jaka