A
Abstraction

  • Jul 30, 2024
  • Joined Oct 10, 2023
  • 2 best answers
  • 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.

  • @CodeGenius

    When you say "configured the IP address with the router's", do you mean you set it to your router's IP address? If so, that's not correct. The two values should be the same, but they should still be link-local address, e.g. 169.254.XXX.XXX

    Can you post an image of your network settings for the particular dongle you're using? Along with the service order?

    • Following up here, I have now tested this with three different dongles and can rule out, with relative confidence, that the issue isn't dongle related.

      Thankfully, I have managed to nonetheless solve this issue to some extent so hopefully this will help others facing similar problems in the future. Two main things you need to make sure when setting up the connection with the dongle:

      1. 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:

      2. You need to make sure that the Dongle you are using to connect to the PoE camera is the first connection in the "Service Order" within MacOS settings. This is the only way I have found for it to work reliably. In my experience, if you don't ensure this order is kept, you might be able to connect to the bootloader on occasion, but even if you succeed, you'll generally get Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND.


        To view and reorder the Service Order, click on the ellipsis button at the bottom of the settings and reorder the entries until your dongle comes out on top:

        NOTE: When you reorder the Service Order in this way, you will lose access to the internet until you place an actual internet connection back above the dongle.

      This is how I have gotten to work, if anybody digs into this any further and figures out how to get this to work without having to simultaneously lose access to the internet, I'd be grateful if you could share back.

      • Hi jakaskerl ,

        Ahh, right - smart! Just gave it a go through the router and it does indeed seem to be working, so that's great. All evidence therefore points to the dongle being the culprit. I'll report back once I test out the new ones I will receive!

      • Hi jakaskerl , thanks for the reply!

        I'm a little confused though as I didn't think the OAK-D-POE had the ability to push images over Wifi? Can't see it in the docs unless you're referring to the OAK-D-IoT?

        Are you using some PoE over Wifi adapter or something to achieve this? With a separate network card/dongle on your laptop (so as to remain connected to the internet simultaneously)?

        • Yehp, went through all the troubleshooting steps except for the factory resetting (I know the camera works from my experience with it on Ubuntu).

          One thing I've noticed is that the camera will appear occasionally, but the moment it tries to get accessed, it disappears. More precisely, a simple way to reproduce the situation I'm observing is as as follows:

          1. I start the device_manager.py from the utilities folder in depthai-python
          2. The camera shows up as one of the devices from the dropdown menu
          3. I hit the search button
          4. Not only does the camera not show up on the list, but it disconnects entirely from the system, i.e. the Network settings in MacOS shows it as "Not Connected".
          5. A little while later, the Network adapter dongle reappears connected to the laptop

          Have you noticed problematic USB-C dongles being an issue across OSs or only particularly for MacOS? In this case, I'm using the same dongle when I'm booted into Ubuntu or Mac, and it works on the former but not on the latter.

          • One potential difference between the OSs is that on Ubuntu you can explicitly set IPv4 to Link Local Only (which I've observed is preferable for the stability of the connection, otherwise Ubuntu occasionally will also fail to find the camera when set to) whereas on MacOS, that explicit option is only available for IPv6 but IPv4 you need to manually configure or use DHCP (and so to achieve the same you set the IP address in the 169.254 range + mask)
          • I was happy to see a thread about someone going through precisely the same problem I'm currently be confronted with, but was disappointed to see that the conclusion was "I changed Operating System and it worked" 😅

            To avoid creating a new thread and keep this issue consolidated in the same place for future viewers, I'm hoping maybe @jakaskerl & @erik could perhaps help further debug issue here?

            I'm in exactly the same situation as OP was. I'm using a 2019 Intel MacBook Pro, with macOS 13.2.1 (22D68). The screenshots posted by @CodeGenius are identical to what I'm seeing. In essence, I can ping 169.254.1.222, but it doesn't show up as any of the devices in Hardware Info or when running system_profiler SPUSBDataType.

            More context:

            • I have used the camera successfully on the same laptop whilst running under Ubuntu 22.04.03 (it is a dual-boot system)
            • I have tried to specify the device whilst initialing the camera via its IP, i.e. depthai.Device("169.254.1.222"), to no avail
            • I'm using a USB-C dongle to connect the PoE signal line to the laptop
            • erik replied to this.