I recently acquired an OAK-D CM4 device. However, I can only run the depthai-demo.py script when connected via VNC to the Raspberry Pi CM4. Whenever I attempt to run it through the DepthAI app on Windows, I encounter the "no DepthAI device found" error. I'm wondering if there is a solution to this issue.

  • erik replied to this.
  • jakaskerl Thanks @jakaskerl now it is working completely on headless configuration. Here are the steps I followed:

    1. Removed HDMI cable
    2. Removed export DISPLAY=:0.0from .bashrc usingsudo nano ~/.bashrc
    3. Installed xming X server
    4. In PuTTY, I changed SSH setting -> X11 -> Enable X11 Forwarding

    and on windows side set display for CMD, I followed following steps from this guide

    1. set DISPLAY=127.0.0.1:0.0
    2. ssh-Y<your_user_id>@<server_address>

    Thanks for the support!

    Hi NickNikzad ,
    Due to how the device is designed (VPU connected directly to CM4), it's not possible to connect to the VPU from your computer. So you always need to connect to the CM4 to access VPU, just like having RPi + OAK, you'd need to connect to RPi and then connect to OAK from RPi.

      erik Thanks for your response. How about the OAK-D CM4 PoE camera model? Does it have a similar design and limitation in terms of the direct connection between VPU and CM4?

      • erik replied to this.
        4 months later

        erik when I ssh into CM4 using -x tag and try to run any examples it gives opencv related errors.

        • erik replied to this.

          erik This example is working fine on CM4 itself, when I SSH through windows OS it shows the errors as mentioned in screenshot.

          • erik replied to this.

            jakaskerl Hey, I solved the issue by following the instructions on the issue. I edited the .bashrc and added the following in the last line export DISPLAY=:0.0.

            But I want the GUIs to run on my windows, the demo is running on the raspberry pi GUI instead of launching on the windows side.

              Hi AnshumanFauzdar
              What about using putty ? To my knowledge it should support x11 forwarding (there should be a checkbox to enable it), while the regular command prompt might not support it directly.

              Thanks,
              Jaka

                jakaskerl I tried putty and also ran Xming server on windows to enable X11 forwarding but still there is no GUI on putty or cmd.

                  Hi AnshumanFauzdar
                  I'm not sure the GUI is going to work with X11 forwarding then. Could you try with a simple example (like rgb_preview) to check if standard CV frames go through? If this works, then I guess the forwarding does not support GUI.

                  Thanks,
                  Jaka

                    Hi AnshumanFauzdar
                    I'm a bit confused as to what you are really doing here. I don't think you shoud VNC into the pi if you wish to forward the display.
                    I think that since adding the export DISPLAY=:0.0. you are telling the scripts to use PI as the display, so when you also VNC, the x11 won't work properly.

                    Could you try maybe disabling the DISPLAY, exiting the VNC and running the example (rgb_preview) with -X?

                    Thanks,
                    Jaka