Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6554 Discussions

[Error 7] Toolkit Error: USB Failure. Code: Error opening device

idata
Employee
12,249 Views

If I plug the NCS directly into one of the USB 3.0 ports on my Ubuntu 16.04 x86_64 machine (native) I get the USB Failure error when doing "make example01", and if I run "ncs-check -1" it fails with the error message "OpenDevice 11 failed, rc=-2"

 

In USBView it shows the Movidius MX2X5X device with the vendor ID of 03e7, and product ID of 2150. But, oddly it shows the USB version as 2.0 and the speed as 480Mb/s (high). Which I find odd because by appearance it's a USB 3.0 device. It's also only reporting needing 500ma. So is the NCS device a USB 2.0 device or USB 3.0 device?

 

What I find truly odd is if I use a USB 2.0 extension cable everything appears to work correctly. As far as I can tell all the information under USBView is the same.

 

There could be something about my machine that's messed up. Previously I was using it for Camera testing with the Aravis project, and that uses the libusb. But, I don't remember changing anything.

0 Kudos
56 Replies
idata
Employee
2,944 Views

@znmeb You can emulate a USB device unplug/plug cycle using 'virsh detach-device' and virsh attach-device' with pre-written XML like this:

 

$ sudo cat /etc/movidius-ncs-usb2.vmxml <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x03e7'/> <product id='0x2150'/> </source> </hostdev> $ sudo cat /etc/movidius-ncs-usb3.vmxml <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x040e'/> <product id='0xf63b'/> </source> </hostdev> $

 

There's a GUI for it in virt-manager too.

 

I tried to automate it using the following udev, but I'm yet to test it properly:

 

$ sudo cat /etc/udev/rules.d/90-libvirt-usb.rules ACTION=="add", \ SUBSYSTEM=="usb", \ ENV{ID_VENDOR_ID}=="03e7", \ ENV{ID_MODEL_ID}=="2150", \ RUN+="/usr/bin/virsh attach-device ncs /etc/movidius-ncs-usb2.vmxml" ACTION=="remove", \ SUBSYSTEM=="usb", \ ENV{ID_VENDOR_ID}=="03e7", \ ENV{ID_MODEL_ID}=="2150", \ RUN+="/usr/bin/virsh detach-device ncs /etc/movidius-ncs-usb2.vmxml" ACTION=="add", \ SUBSYSTEM=="usb", \ ENV{ID_VENDOR_ID}=="040e", \ ENV{ID_MODEL_ID}=="f63b", \ RUN+="/usr/bin/virsh attach-device ncs /etc/movidius-ncs-usb3.vmxml" ACTION=="remove", \ SUBSYSTEM=="usb", \ ENV{ID_VENDOR_ID}=="040e", \ ENV{ID_MODEL_ID}=="f63b", \ RUN+="/usr/bin/virsh detach-device ncs /etc/movidius-ncs-usb3.vmxml" $
0 Kudos
idata
Employee
2,944 Views

If it goes well it will not be a basic solution.

 

Let's wait for manufacturer's response.
0 Kudos
idata
Employee
2,944 Views

I have a little more data. The machine is now dual-booted Arch and Ubuntu 16.04 LTS.

 

     

  1. The device works every time on the machine when booted Ubuntu 16.04.
  2.  

  3. For both KVM/Virtual Machine Manager and VirtualBox 5.1.30 Ubuntu guests running on the machine when booted in Arch, I can run an example once successfully. After that, some kind of disconnect happens and the error message is shown when I run the example.
  4.  

  5. On the VirtualBox case, the GUI shows the device has been disconnected. I can re-connect it and I will get one more successful run, then it will disconnect again. With Virtual Machine Manager the device shows up still connected. Disconnecting it and reconnecting it doesn't help.
  6.  

 

Given that the VirtualBox USB 2.0 / 3.0 code is not open source, I'm not planning to do any more testing with VirtualBox. I would like to get KVM/Virtual Machine Manager to work because all of my other machine learning / data science workflow is built around Arch. But I will probably move to Ubuntu 16.04 LTS at the cost of a week of hacking my workflow; dual-booting is a pain.

 

I doubt very seriously if this is a bug in the Movidius software. I think it's some kind of edge case in the Linux kernel USB code.

0 Kudos
idata
Employee
2,944 Views

Is there a way to get the SDK on Arch? I am getting frustrated at the l;ack us use of my neural sticks and I honestly hate the ides of UBUNTU on any of my main machines

0 Kudos
idata
Employee
2,944 Views

@fpex The SDK could be ported to Arch - I think it would take me a week. But I'm not sure it's worth the effort; Fedora is way more popular than Arch, for example. And parts of the SDK aren't open source - Intel would have to change the licenses.

 

I hop around from distro to distro; right now I'm dual-booted Antergos (Arch with a nice installer layer) and Ubuntu. The Movidius stick runs on Ubuntu but I can't make my AMD GPU run OpenCL on it. The AMD GPU runs OpenCL on Antergos but the Movidius doesn't. Neither of them work on Fedora ;-)

 

And, of course, I have plenty of virtual machines.

0 Kudos
idata
Employee
2,944 Views

i hate hopping because i need stability (but modern stuff support) for development plus one mac and one winVM for cross coding. If things stay like this, for as much as i would love to use these kits and possible instead of my nvidia cuda stuff, i will just sell them and move on. i truly did hope they would work on my ubuntu joule, they do not.

 

I hate the idea of setting an ubuntu vm on arch (like for my win pass through) …. i am really too simple minded :-)
0 Kudos
idata
Employee
2,944 Views

Running Ubuntu 16.04 in Virtualbox on a Macbook pro. The Movidius stick is connected via a hub and viewable in USB viewer. Ive added the two usb filters as per this thread . However I get the error No devices found. Any advice for my configuration - perhaps due to use of hub?

 

https://ibb.co/cUKJXw - USB config

 

https://ibb.co/bVmhsw - USB viewer

 

Note: apologies for posting image links, can't get this forum to post the images directly..

0 Kudos
idata
Employee
2,944 Views

Some more diagnostics data: when running ubuntu 16.04 on virtual box 5.2.4, I get the same USB error regardless of whether the port is in USB 2.0 or 3.0 mode, or using an external USB 3.0 hub. The NCS seems to attach but then fails as soon as the make examples script hits attempts to attach.

 

When running in VMware fusion 10.1.0 with the same version ubuntu, directly attached to laptop ports it fails with the same error message. When running with an external USB 3.0 hub under fusion with the same VM it works reproducibly.

0 Kudos
idata
Employee
2,944 Views

I am facing the same problem on Virtual Box too. Hopefully someone can give an answer soon

0 Kudos
idata
Employee
2,944 Views

I ended up putting Ubuntu onto an old MacBook, which is a move I am happy about with hindsight!

0 Kudos
idata
Employee
2,944 Views

Windows 7 / Virtual Box 5.2.4 r119785 (Qt5.6.2) / Ubuntu 16.04. Windows cannot locate driver for MA2X5X, but also same error after Make Examples.

0 Kudos
idata
Employee
2,944 Views

I am running Ubuntu 16 on VBox and I managed to solve error "Toolkit error USB failure :No devices found" encountered when running "$ make examples" by performing the following : At VirtualBox Manager ->Settings ->USB->USB Device Filters-> highlight existing "Movidius VSC Loopback Device"->right click->

 

Add Filter from Device->select "Movidius Ltd.Movidius MA2X5X->OK. Then I go to Ubuntu, reboot and rerun "~/workspace/ncsdk $ make examples" and it ran smoothly ! Hope this helps others who encountered the same issue.
0 Kudos
idata
Employee
2,944 Views

Thanks hiking1. This really helps to resolve the issue. I have been debugging this for weeks…

0 Kudos
idata
Employee
2,944 Views

hiking1.

 

I have no options available at the VirtualBox Manager -> Settings -> USB-> USB Device Filters->

 

Where did the "Movidius VSC Loopback Device" come from?

 

Windows can't even read my compute stick, no driver available.

 

I'm wondering if my stick has a defective software load.
0 Kudos
idata
Employee
2,944 Views

ThomasLafay

 

Try inserting your neural stick in the VM environment. It should be able to detect something.

 

Did you manage to see Movidius MA2X5X in your selection?

0 Kudos
idata
Employee
2,944 Views

During the initial loading of VBOX/Ubuntu, Windows would at least attempt to locate a driver for the MA2X5X and I could see the MA2X5X with Windows Explorer, now I get nothing. Tried inserting the Compute Stick in a different machine running Windows 10 to determine if the MA2X5X was at least visible on the USB port, no acknowledgement or attempt to load a driver. I have zero visibility of the MA2X5X in any layer, Windows 7, Vbox or Ubuntu.

0 Kudos
idata
Employee
2,944 Views

This is a known existing issue between Windows 7 and VBox. After installing the Virtualbox Expansion pack that provides support for USB 2.0 and USB 3.0,; I then reinstalled the VBox USB drivers detailed at this link --> https://forums.virtualbox.org/viewtopic.php?f=6&t=39104

 

Hope it helps.

0 Kudos
idata
Employee
2,944 Views

@hiking1 Do you know what are the steps for vmware workstation? I spent several hours trying to figure out the settings that you mentioned for VirtualBox but I couldn't get them.

0 Kudos
idata
Employee
2,944 Views

@Tome_at_Intel : Do you have any suggestions on the issue I posted in my previous comment?

0 Kudos
idata
Employee
2,944 Views

@kodukulav Have you tried the solution at https://ncsforum.movidius.com/discussion/comment/1782/#Comment_1782?

0 Kudos
idata
Employee
2,944 Views

@Tome_at_Intel : Thank you. That solution works for me.

0 Kudos
Reply