• DepthAI
  • DepthAI Microsoft VS solution

Hello,

I am trying to get the C++ DepthAI code examples up and running in Microsoft Visual Studio on my Windows 10 PC. The Python examples ran without a hitch, but we also code in the C++ world. Right now I can't get past the very first line of code:
dai:😛ipeline pipeline;
I've spent two days trying all of the tricks I can think of and always end up with "Couldn't initialize XLink: X_LINK_ERROR". I am trying to connect to the OAK camera via LAN. Any help or sample Visual Studio Poject/Solution files would be appreciated to help get me off of the ground.

Thank you,

Mark Miller

erik changed the title to DepthAI Microsoft VS solution .

I have been working today with the files you pointed me at. I am further along. I was missing file libusb-1.0d.dll even though I am connecting via LAN and not USB.

However, the code (C++ or Python) is no longer able to find the camera. I can ping the camera, but

the following line of code no longer finds the camera
std::vector<dai:😃eviceInfo> vDeviceInfo = dai::XLinkConnection::getAllConnectedDevices();

Any suggestions? I have power cycled the camera twice now.

I wonder if this might be the problem:

@themarpe
@alex-luxonis
I'd really like to try this DEPTHAI_WATCHDOG=0 feature, but I don't see the develop_embedded branch you mentioned. I see a connect_timeout_override branch where @alex-luxonis is working on WATCHDOG things. Is that branch usable for disabling the watchdog timeout? If so, how can it be used?

  • erik replied to this.
    5 days later

    @MarkMiller

    DEPTHAI_WATCHDOG env variable is already available.

    You may set it as such from powershell terminal (or specify it under Visual Studio, Debugging -> Environment: DEPTHAI_WATCHDOG=0):

    $env:DEPTHAI_WATCHDOG = '0'

    afterwards the device will have its WD disabled and you'll be able to debug your code without the device being reset. Note, a power cycle will be required if an unclean shutdown will happen with this mode enabled.