• Hardware
  • Configure Raspberry Pi 4 with OAK-D Pro W POE + Pi Ethernet port

Hi,

I wonder how to configure Raspberry Pi 4 to be able to access the POE device which is connected to Pi's ethernet port?

The Raspberry Pi is connected to external network via WiFi. I want to connect the POE device to the Pi's ethernet port and can only be accessible by this Pi, not exposed to other in the externet network.

Currently the "ifconfig eth0" shows that the device is assigned IP 169.254.20.25 which is not accessible.

    Hi kle
    I think you can't connect POE device to the LAN without it being exposed to other devices on the same network. You would need to directly connect POE device with raspberry pi through a poe injector. This way the device is isolated from the rest of the network, but so is the raspberry pi (unless you are also using wifi).
    You can configure POE device IP with a device manager.

    Thanks,
    Jaka

    • kle replied to this.

      Hi jakaskerl ,

      Yes, I actually connect the POE device to Raspberry Pi ethernet port (eth0) via an POE injector (for power supply).
      "ifconfig eth0" shows that the device is assigned IP 169.254.20.25 which is not accessible from the Pi.

      My question is how to configure the Raspberry Pi to be able to access the POE device.

      Thank jakaskerl

      I follow the document

      • POE Device: bootloader vesion 0.0.22

      • Pi's /etc/dhcpcd.conf added

        ---

        interface wlan0
        metric 10

        interface eth0
        metric 100
        static ip_address=192.168.5.10/24
        static ip6_address=fd51:42f8:caae:d92e::ff/64
        static routers=192.168.5.1
        static domain_name_servers=192.168.5.1 8.8.8.8 fd51:42f8:caae:d92e::1

        ---

      Command ifconfig shows eth0 has IP 192.168.5.10.

      I can ping the device with this IP
      Q1: But running the example in the document (Manually specify device IP) with IP 192.168.5.10, with output of device info, gives below error ???


      DeviceInfo(name=192.168.5.10, mxid=, X_LINK_ANY_STATE, X_LINK_ANY_PROTOCOL, X_LINK_ANY_PLATFORM, X_LINK_SUCCESS)
      Traceback (most recent call last):
      File "test.py", line 17, in <module>
      with dai.Device(pipeline, device_info) as device:
      RuntimeError: Cannot find any device with given deviceInfo


      Q2: There is a note under the example code above but give no instruction how to do it?
      "Note that if OAK is already running flashed pipeline, you need to change device info XLink state to X_LINK_FLASH_BOOTED in order to reach flash booted OAK camera."

        Hi kle
        Q1, the device is now connected through a router I assume (192.168..) and not directly to the PI. When connecting the device directly to the host and can't connect, set a static IP on your host (e.g. with static IP: 169.254.1.10 and netmask: 255.255.0.0). Usually the host will be automatically set to the same subnet as the device, so you can connect right away.

        Q2, imo that's not important since you have not flashed a pipeline to the device. Also, in my experience it works without the setting as well.

        Thanks,
        Jaka

        • kle replied to this.

          Hi jakaskerl,

          Q1:

          • Yes, the device is connected to the Pi's ethernet port.
          • The static IP 192.168.5.10 on the host (Pi) is set in the file /etc/dhcpcd.conf as stateed above.

          But still problem to find the device from the host!?!

            Hi kle
            I thought 192.168.5.10 was OAK IP. These addresses have to be set differently.

            1. Find the IP of OAK device - if no DHCP server is used, this will usually be the default static address 169.254.1.222.
            2. Set the raspberry pi IP address to something inside the same subnet (like 169.254.1.10 or anything that falls under the 255.255.0.0 subnet mask). Write this information under dhcpcd.conf - make sure to change the mask to 16 as well: eg: static ip_address=169.254.1.10/16
              Your script should now be able to find the device. Make sure you don't confuse your host (pi) IP with the device (oak) ip.

            Hope this clears things out 🙂

            Thanks,
            Jaka