diff --git a/depthai-core b/depthai-core index 79cdb20cc..2cfb31061 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 79cdb20ccea2f158b370c5c207a4e178c377c3b3 +Subproject commit 2cfb31061d3c23db34167b1fe4b838c91b1d02e9 diff --git a/src/DeviceBindings.cpp b/src/DeviceBindings.cpp index 7f94027d1..ac4d10e4a 100644 --- a/src/DeviceBindings.cpp +++ b/src/DeviceBindings.cpp @@ -9,6 +9,7 @@ #include "depthai-shared/device/CrashDump.hpp" // std::chrono bindings +#include #include // py::detail #include @@ -41,8 +42,14 @@ static auto deviceSearchHelper(Args&&... args){ auto numConnected = DEVICE::getAllAvailableDevices().size(); if(numConnected > 0) { throw std::runtime_error("No available devices (" + std::to_string(numConnected) + " connected, but in use)"); - } else { - throw std::runtime_error("No available devices"); + } + auto numDevicesAnyPlatform = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_ANY_PLATFORM).size(); + auto numDevicesRVC2 = dai::XLinkConnection::getAllConnectedDevices( + X_LINK_ANY_STATE, false, X_LINK_MYRIAD_X) + .size(); + auto nonRVC2Devices = numDevicesAnyPlatform - numDevicesRVC2; + if(nonRVC2Devices > 0) { + throw std::runtime_error("No available RVC2 devices found, but found " + std::to_string(nonRVC2Devices) + " non RVC2 device[s]. To use RVC4 devices, please update DepthAI to version v3.x or newer."); } } diff --git a/src/XLinkBindings.cpp b/src/XLinkBindings.cpp index bb5475fd3..b76ac864f 100644 --- a/src/XLinkBindings.cpp +++ b/src/XLinkBindings.cpp @@ -133,7 +133,7 @@ void XLinkBindings::bind(pybind11::module &m, void *pCallstack) .def(py::init >()) .def(py::init()) .def(py::init()) - .def_static("getAllConnectedDevices", &XLinkConnection::getAllConnectedDevices, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevices") = true) + .def_static("getAllConnectedDevices", &XLinkConnection::getAllConnectedDevices, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevices") = true, py::arg("platform") = X_LINK_MYRIAD_X) .def_static("getFirstDevice", &XLinkConnection::getFirstDevice, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevice") = true) .def_static("getDeviceByMxId", &XLinkConnection::getDeviceByMxId, py::arg("mxId"), py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevice") = true) .def_static("bootBootloader", &XLinkConnection::bootBootloader, py::arg("devInfo"))