- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to use NCS in multiple ROS nodes and was wondering if there is any way to check via OpenVino if NCS device is already in use. Thanks.
Umer
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Currently OpenVINO API does not provide any kind of query capabilities with respect to backend devices. However you can do it if you have access to Xlink API via ncsdk https://github.com/movidius/ncsdk. For example you might use XLinkGetDeviceName() function and further do parsing of returned device name, or just parsing lsusb output. Booted device, has a different VID-PID pair, than unbooted one, and if device is booted there is a high chance that is is being used, in some cases device also might be stalled.
for (int i = 0; ; i++) { char name[256]; auto err = XLinkGetDeviceName(i, name, sizeof(name), 0); if (err != X_LINK_SUCCESS) { break; } name[sizeof(name)-1] = 0; std::string device = name; auto pos = device.find("-"); if (pos != string::npos && pos + 1 != device.size()) { cout<<"unbooted: " << device.substr(pos + 1) << "\n"; } else { cout<<"booted\n"; } }

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page