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.
6404 Discussions

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

idata
Employee
7,209 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
3,607 Views

Generally the NCS stick is a USB 3.0 device. There could be some incompatibility between NCS and your particular USB3.0 adapter (no matter it is onboard or card on slot). Please try to use another adapter or even different computer to see the behavior of NCS stick and sort the issue.

0 Kudos
idata
Employee
3,607 Views

So I tried a different machine, and got nearly the same result.

 

The machine I tried today is a Dell 7040 running Linux 16.04 x86/64.

 

If I use the built in USB3 ports (that go to the Intel Controller) it gives me the USB error message. If I use a USB2 extension cable then it works.

 

If I use a USB 3.0 PCI-Express adapter (with a Renesas USB 3.0 controller) it does work, BUT according to usbview it's only running at USB 2.0 speeds.

 

I haven't been able to get the NCS to work on an Intel Controller based USB 3.0 port at USB 3.0 speeds.

 

Note: It was a clean install of Ubuntu 16.04 with all the updates.

0 Kudos
idata
Employee
3,607 Views

@S4WRXTTCS according to your statement

 

"If I use a USB 3.0 PCI-Express adapter (with a Renesas USB 3.0 controller) it does work, BUT according to usbview it's only running at USB 2.0 speeds."

 

When NCS plugged in USB port and idle it behaves as USB2.0 device but when blobs(graph) files are uploaded to stick during operation it must switch to USB3.0 for faster transfer since blob files are relatively big, hundreds of megabytes depending on the CNN used. After that switching again to USB2.0 is a normal behavior.

0 Kudos
idata
Employee
3,607 Views

Thanks for the explanation that it switches to USB3. That's important information to have, and I hope it gets added to the getting started guide.

 

Here is what dmesg reports when I try "make example01" with the NCS plugged directly into the Renesas based USB 3.0 adapter.

 

[ 251.242864] usb 3-2: USB disconnect, device number 3

 

[ 251.493819] usb 4-2: new SuperSpeed USB device number 3 using xhci_hcd

 

[ 251.515078] usb 4-2: New USB device found, idVendor=040e, idProduct=f63b

 

[ 251.515085] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 251.515090] usb 4-2: Product: USBVSC

 

[ 251.515093] usb 4-2: Manufacturer: Movidius

 

[ 251.515096] usb 4-2: SerialNumber: DATAC

 

[ 252.037138] usb 3-2: new high-speed USB device number 4 using xhci_hcd

 

[ 252.171282] usb 3-2: New USB device found, idVendor=03e7, idProduct=2150

 

[ 252.171290] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 252.171294] usb 3-2: Product: Movidius MA2X5X

 

[ 252.171297] usb 3-2: Manufacturer: Movidius Ltd.

 

[ 252.171300] usb 3-2: SerialNumber: 03e72150

 

[ 252.541354] xhci_hcd 0000:02:00.0: Cannot set link state.

 

[ 252.541361] usb usb4-port2: cannot disable (err = -32)

 

[ 252.541365] usb 4-2: USB disconnect, device number 3

 

The transfer time reported was 114.04ms

 

If I try it with the NCS plugged directly into the built in USB 3.0 ports of the OptiPlex 7040 it reports the following.

 

[ 504.922544] usb 1-3: USB disconnect, device number 5

 

[ 505.243265] usb 2-6: new SuperSpeed USB device number 2 using xhci_hcd

 

[ 505.260374] usb 2-6: New USB device found, idVendor=040e, idProduct=f63b

 

[ 505.260381] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 505.260385] usb 2-6: Product: USBVSC

 

[ 505.260389] usb 2-6: Manufacturer: Movidius

 

[ 505.260392] usb 2-6: SerialNumber: DATAC

 

It never goes past this, and it fails with [Error 7] Toolkit Error: USB Failure. Code: Error opening device

 

To compare USB3 versus USB2 speeds it's too close to call on the make example01.

0 Kudos
idata
Employee
3,607 Views

I have exactly the same problem. I though it was related to my system, this is why I changed header to ask an other question:

 

https://ncsforum.movidius.com/discussion/134/hello-first-question-how-can-we-get-the-detection

 

but now it seems that there an issue with the STICK & USB3.

 

So basically I switched o a USB2 port, but we need to have a resolution.

0 Kudos
idata
Employee
3,607 Views

When the NCS is first plugged in, the only code running on it is a bootloader which operates in USB2.0 mode and waits for a download of firmware from the host. When the host connects to it and opens a connection, it downloads operating firmware into the NCS, which then does a virtual disconnect of the device and reconnects the NCS in USB3.0 mode. You can watch this using dmesg on the host machine and monitoring the system log. If it hangs in this transition, try using the NCS in a USB 2.0 hub. For whatever reason, it seems quite reliable this way.

0 Kudos
idata
Employee
3,607 Views

@S4WRXTTCS Can you please provide more details regarding your host machine?

0 Kudos
idata
Employee
3,607 Views

@Tome_at_Intel

 

I tested it out on four different setups.

 

Failed -> Internal USB 3.0 ports on a Dell OptiPlex 7040.

 

Passed -> Renesas/NEC UPD72020 Adaper card inside OptiPlex 7040

 

Failed -> Internal USB 3.0 ports on a Gigabyte Z270 based computer with an Intel i7-7700K 4.2GHz Processor

 

Passed -> Internal USB 3.0 ports on a baseboard for a Congatec TCA3 COM-Express Module with an Intel ATOM E3845

 

All the testing was done running Ubuntu 16.04 x86/64bit with the latest updates. Where I've verified that a USB 3.0 flash drive works at USB 3.0 speeds on the USB port. I'm also not using a powered HUB.

 

The failure was the inability to switch to USB 3.0 speeds. Where if I used a USB 2.0 extension cable it would work.

 

The Dell OptiPlex 7040 has the Q170 chipset, and has an Intel Core I7-6700 3.4GHz processor.

0 Kudos
idata
Employee
3,607 Views

I have the same problem also saying : No devices found.

 

I am running a Core i5 with a Dual Boot - Windows 10 and Ubuntu

0 Kudos
idata
Employee
3,607 Views

@Tome_at_Intel My system is a Dell Latitude E5420 running Ubuntu 16.04

0 Kudos
idata
Employee
3,607 Views

We appreciate your patience and I want you to know that we are working on a release candidate with consideration to this problem. Thanks.

0 Kudos
idata
Employee
3,607 Views

I have the same problem, i am running on a joule directly or via a hub. No luck

0 Kudos
idata
Employee
3,607 Views

@fpex Just to be clear, which version of the SDK are you currently using? What are you trying to run (mvNCCompile, mvNCProfile, mvNCCheck) and can you post the error message here? Please also include the version of the OS you are using. Thank you.

0 Kudos
idata
Employee
3,607 Views

I am using UBUNTU 16.04 on joule latest version. I am still at the beginning. So after managing to install the latest SDK as from the start web page, i try make examples and get [Error 7] Toolkit Error: USB Failure. Code: Error opening device

 

I tried with USB2 and USB3 hubs (since the joule has only one USB I need an hub)
0 Kudos
idata
Employee
3,607 Views

I have the dongle working in an Ubuntu 16.04 VM running in VirtualBox on Windows 7 Ultimate.

 

If I reboot that same machine into Debian unstable x86_64, without re-arranging its USB configuration, then I either:

 

     

  • Run a QEMU/KVM guest with Ubuntu 16.04 + NCS SDK, or
  •  

  • Run a Docker image with Ubuntu 16.04 + NCS SDK
  •  

 

in both cases passing the USB devices (or the whole bus) into the VM/container as required, then run "make examples" in the container/VM, I get:

 

 

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

 

 

dmesg on the host contains a succession of stanzas like this, where the device transitions to its USB 3 VID/PID, but then something evidently goes wrong:

 

[ 4981.864126] usb 5-2: USB disconnect, device number 2 [ 4982.113033] usb 6-2: new SuperSpeed USB device number 2 using xhci_hcd [ 4982.134428] usb 6-2: New USB device found, idVendor=040e, idProduct=f63b [ 4982.134429] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4982.134430] usb 6-2: Product: USBVSC [ 4982.134431] usb 6-2: Manufacturer: Movidius [ 4982.134431] usb 6-2: SerialNumber: 9B3656CFE4A617 [ 5002.522874] usb 5-2: new high-speed USB device number 3 using xhci_hcd [ 5002.668011] usb 5-2: New USB device found, idVendor=03e7, idProduct=2150 [ 5002.668012] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 5002.668013] usb 5-2: Product: Movidius MA2X5X [ 5002.668014] usb 5-2: Manufacturer: Movidius Ltd. [ 5002.668014] usb 5-2: SerialNumber: 03e72150 [ 5003.019583] xhci_hcd 0000:07:00.0: Cannot set link state. [ 5003.019586] usb usb6-port2: cannot disable (err = -32) [ 5003.019588] usb 6-2: USB disconnect, device number 2 [ 5009.191022] usb 5-2: USB disconnect, device number 3 [ 5009.439699] usb 6-2: new SuperSpeed USB device number 3 using xhci_hcd [ 5009.461198] usb 6-2: New USB device found, idVendor=040e, idProduct=f63b [ 5009.461199] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 5009.461200] usb 6-2: Product: USBVSC [ 5009.461200] usb 6-2: Manufacturer: Movidius [ 5009.461201] usb 6-2: SerialNumber: 9B3656CFE4A617 [ 5025.422851] usb 5-2: new high-speed USB device number 4 using xhci_hcd [ 5025.568085] usb 5-2: New USB device found, idVendor=03e7, idProduct=2150 [ 5025.568087] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 5025.568088] usb 5-2: Product: Movidius MA2X5X [ 5025.568089] usb 5-2: Manufacturer: Movidius Ltd. [ 5025.568089] usb 5-2: SerialNumber: 03e72150 [ 5025.922887] xhci_hcd 0000:07:00.0: Cannot set link state. [ 5025.922890] usb usb6-port2: cannot disable (err = -32) [ 5025.922893] usb 6-2: USB disconnect, device number 3 [ 5029.165706] usb 5-2: USB disconnect, device number 4

 

Do you want me to capture USB traffic while this is happening using usbmon and send it to you?

 

Next, I'll try to get the SDK examples working in a VirtualBox VM running under Linux. That would eliminate QEMU/KVM as the cause. I don't know where to go from there.

 

In case it's relevant, in my configuration the NCS is plugged into a USB3 header attached to the motherboard, driven by a Renesas USB3 controller. But as I say it works just great under Windows.

0 Kudos
idata
Employee
3,607 Views

@Tome_at_Intel so what can i do? I have two devices both unusable … not very happy about it.

0 Kudos
idata
Employee
3,607 Views

@fpex You could capture USB traffic, maybe. I don't know whether it would be useful though.

0 Kudos
idata
Employee
3,607 Views

I am also using UBUNTU 16.04 with Jules latest version.

 

-->Linux takejoule-570x-DVT2 4.4.0-1000-joule #0+joule21-Ubuntu SMP PREEMPT Thu Mar 16 14:46:45 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

 

-->BIOS GTPP1J2A.X64.0143.B30.1706270056

 

Examples TEST.

 

 

take-joule@takejoule-570x-DVT2:~/workspace/ncsdk/examples/caffe/GoogLeNet$ ./run.py

 

Device 0 Address: 2.4 - VID/PID 03e7:2150

 

Starting wait for connect with 2000ms timeout

 

Found Address: 2.4 - VID/PID 03e7:2150

 

Found EP 0x81 : max packet size is 512 bytes

 

Found EP 0x01 : max packet size is 512 bytes

 

Found and opened device

 

Performing bulk write of 905640 bytes…

 

Successfully sent 905640 bytes of data in 93.952265 ms (9.192813 MB/s)

 

Boot successful, device address 2.4

 

Found Address: 2.4 - VID/PID 040e:f63b

 

done

 

Booted 2.4 -> VSC

 

------- predictions --------

 

prediction 0 (probability 0.99609) is n03272010 electric guitar label index is: 546

 

prediction 1 (probability 0.0035095) is n02676566 acoustic guitar label index is: 402

 

prediction 2 (probability 0.0) is n02396427 wild boar, boar, Sus scrofa label index is: 342

 

prediction 3 (probability 0.0) is n02391049 zebra label index is: 340

 

prediction 4 (probability 0.0) is n02389026 sorrel label index is: 339

 

 

But the same phenomenon is happening.

 

I also tried with USB2 and USB3 hub.

 

There is a case that it operates normally without an error due to the way of inserting the stick.

 

However, I have to try it many times.

 

Apparently I think there is a problem with the connector of many Movidius stick.

 

Is not it a kind of defect?
0 Kudos
idata
Employee
3,607 Views

@fpex At the moment, we are trying to reproduce the issue on a Joule and as soon as we find the issue, I'll let you know.

0 Kudos
idata
Employee
2,929 Views

I've got the same problem, or a variant of it. Setup:

 

Arch Linux host, Ubuntu 16.04 guest using Virtual Machine Manager (kvm). The stick is plugged into a host USB 2 port. USBView in the guest sees the stick as

 

Movidius MA2X5X

 

Manufacturer: Movidius Ltd.

 

Serial Number: 03e72150

 

Speed: 12Mb/s (full)

 

USB Version: 2.00

 

Device Class: 00(>ifc )

 

Device Subclass: 00

 

Device Protocol: 00

 

Maximum Default Endpoint Size: 64

 

Number of Configurations: 1

 

Vendor Id: 03e7

 

Product Id: 2150

 

Revision Number: 0.01

 

Config Number: 1

 

Number of Interfaces: 1

 

Attributes: 80

 

MaxPower Needed: 500mA

 

lsusb sees it too.

 

Now comes the fun part. I can cd to "examples/caffe/SqueezeNet" and run "make profile" and it works - once. But if I try to repeat it it errors with "[Error 7] Toolkit Error: USB Failure. Code: Error opening device". USBView and lsusb still see the device! And if I unplug the device and plug it back in again, it works again - once.

 

Is there some kind of command I can issue in the guest to emulate the process of unplugging and replacing the device?

 

guest dmesg after an unplug - replace cycle:

 

[ 2171.029089] usb 1-4: USB disconnect, device number 22

 

[ 2186.356167] usb 1-4: new high-speed USB device number 23 using ehci-pci

 

[ 2186.672271] usb 1-4: New USB device found, idVendor=03e7, idProduct=2150

 

[ 2186.672275] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 2186.672278] usb 1-4: Product: Movidius MA2X5X

 

[ 2186.672281] usb 1-4: Manufacturer: Movidius Ltd.

 

[ 2186.672283] usb 1-4: SerialNumber: 03e72150

 

guest dmesg after the successful "make profile"

 

[ 2263.161786] usb 1-4: USB disconnect, device number 23

 

[ 2264.240155] usb 1-4: new high-speed USB device number 24 using ehci-pci

 

[ 2264.564037] usb 1-4: New USB device found, idVendor=040e, idProduct=f63b

 

[ 2264.564042] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 2264.564045] usb 1-4: Product: USBVSC

 

[ 2264.564048] usb 1-4: Manufacturer: Movidius

 

[ 2264.564050] usb 1-4: SerialNumber: 5CB83DCF146C0E

 

[ 2264.861850] usb 1-4: USB disconnect, device number 24

 

[ 2265.856171] usb 1-4: new high-speed USB device number 25 using ehci-pci

 

[ 2266.195199] usb 1-4: New USB device found, idVendor=03e7, idProduct=2150

 

[ 2266.195206] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 2266.195210] usb 1-4: Product: Movidius MA2X5X

 

[ 2266.195213] usb 1-4: Manufacturer: Movidius Ltd.

 

[ 2266.195216] usb 1-4: SerialNumber: 03e72150

 

guest dmesg after the unsuccessful second attempt

 

[ 2466.680984] usb 1-4: USB disconnect, device number 25

 

[ 2468.496173] usb 1-4: new high-speed USB device number 26 using ehci-pci

 

[ 2468.812400] usb 1-4: New USB device found, idVendor=03e7, idProduct=2150

 

[ 2468.812404] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

 

[ 2468.812408] usb 1-4: Product: Movidius MA2X5X

 

[ 2468.812410] usb 1-4: Manufacturer: Movidius Ltd.

 

[ 2468.812413] usb 1-4: SerialNumber: 03e72150
0 Kudos
Reply