frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Error - Could not open NCS device

I am running Ubuntu 16.04 on Virtualbox.
I've downloaded SDK version 1 and version 2 seperately to see if my NCS works.
When ever I run "make example", I hear USB being unplugged. Then, the make process stops with Error 7.
When running "make run" in hello_ncs_py directory. I again hear USB being unplugged.

I have followed the instructions (https://movidius.github.io/ncsdk/vm_config.html) but it did not help out.

Any pointers? Thanks in advance.

PS. I've read through most of "Error 7" related or "cloud not open NCS device" threads here. My devices is working fine. ran though "lsusb" and "dmesg" to check.

Comments

  • 16 Comments sorted by Votes Date Added
  • SOLVED - Release of VirtualBox 6 fixed this issue.

    $ make examples fails
    Update to VirtualBox 6
    Use existing Unbuntu image and changed nothing.
    Ran $ make examples - worked
    Shut down Virtual Box
    Ran $ make examples again - worked

    So it was either:
    Running it in a non VirtualBox once fixed it
    Updating to VirtualBox 6 fixed it.

    So I will put this one down to a VirtualBox issue.

  • Hi @spencer, @hackstockpie,
    Seems like our previous suggestions didn't work for you guys. Just so you are aware I went through the entire install and config of the NCSDK in VirtualBox, so I'll share the details of my setup and the steps I followed to fix.

    My test environment:

    • Windows 10 Host Machine
    • VirtualBox Version 6.0.0 r127566 running Ubuntu 16.04 LTS
    • VirtualBox Extension Pack 6.0.0r127566
    • Intel Movidius NCS1
    • NCSDK1

    Similar to what @spencer mentioned, I noticed the USB tone of the device being unplugged when compiling/running the examples, and that is sort of expected as the NCS device is initializing. When this occurs in my setup, there is a "new" device that shows up in my VirtualBox devices list as "Movidius VSC Loopback Device [0100]", and the execution fails. The filters mentioned in our guide do work most of the time, but there are strange cases where it doesn't behave as expected. I have seen other users report similar problems, these are my own observations/findings:

    • USB filters not working properly
    • VirtualBox extension pack is missing
    • A combination of both

    I attempted few different things without success, however these are the steps that fixed for me and I hope it does the trick for you.

    1. Download and install Extension Pack from https://www.virtualbox.org/wiki/Downloads. Once installed make sure it reflects as Active in VirtualBox: File > Preferences > Extensions
    2. Make sure to Enable USB Controller and USB3.0 (xHCI) Controller is selected in VM Manager > Settings > USB
    3. Install NCSDK v1 (v2 should work too) with make install and make examples (may not be required if already done so)
    4. Unplug NCS from host machine and remove, if any, all USB filters in VM: Devices > Settings > USB > USB Settings > Remove Selected Filters
    5. Plug NCS to host machine and add a new USB filter in VM: Devices > USB > USB Settings > Add new USB filter with all fields set to values of selected device... > Movidius Ltd. Movidius MA2X5X [0001]. Click OK to apply changes
    6. Unplug NCS stick from host machine and plug it back in
    7. Run hello_ncs_py found in the examples <<path-to>>/ncsdk/examples/apps/hello_ncs_py by executing make run. This should trigger the USB being unplugged noise, just let it do it's thing and DO NOT unplug the NCS
    8. Add a new USB filter in VM: Devices > USB > USB Settings > Add new USB filter with all fields set to values of selected device... > Movidius VSC Loopback Device [0100]. Click OK to apply changes
    9. Repeat items 6 and 7

    Please note that I am not 100% certain if this would continue to work with multiple NCS devices, my theory is that you may have to repeat the process for each NCS device individually. Hope you find this helpful, let us know your results.

    Regards,
    Luis

  • edited December 2018 Vote Up1Vote Down

    Just tried it on USB2 on the hub

    $ making run
    python3 hello_ncs.py;
    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 0

    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 1

    D : [ 0] ncDeviceOpen:524 File path /usr/local/lib/mvnc/MvNCAPI-ma2450.mvcmd

    I: [ 0] ncDeviceOpen:530 ncDeviceOpen() XLinkBootRemote returned success 0

    I: [ 0] ncDeviceOpen:568 XLinkConnect done - link Id 0

    D : [ 0] ncDeviceOpen:582 done

    I: [ 0] ncDeviceOpen:584 Booted 2-ma2450 -> VSC

    I: [ 0] getDevAttributes:383 Device attributes

    I: [ 0] getDevAttributes:386 Device FW version: 2.8.2450.16e

    I: [ 0] getDevAttributes:388 mvTensorVersion 2.8

    I: [ 0] getDevAttributes:389 Maximum graphs: 10

    I: [ 0] getDevAttributes:390 Maximum fifos: 20

    I: [ 0] getDevAttributes:392 Maximum graph option class: 1

    I: [ 0] getDevAttributes:394 Maximum device option class: 1

    I: [ 0] getDevAttributes:395 Device memory capacity: 522059056

    Hello NCS! Device opened normally.
    I: [ 0] ncDeviceClose:776 closing device

    E: [ 0] dispatcherEventReceive:236 dispatcherEventReceive() Read failed -1

    E: [ 0] eventReader:254 Failed to receive event, the device may have reset

    Goodbye NCS! Device closed normally.
    NCS device working.

  • Hi @spencer

    Did you setup the USB filters in the VirtualBox machine settings? I found that I also had to install the VirtualBox Extension Pack on Virtualbox. Once the extension pack was installed, I also loaded guest additions to the guest machine.

    1. Start the Guest Machine
    2. Devices -> Insert Guest Additions CD image...
    3. Follow the prompt instructions
    4. Reboot the Guest Machine

    Hope this helps!

    Regards,
    Jesus

  • Thanks Jesus.

    I've followed your instructions but did not work. I couldn't find a way around with this issue.

  • Hi @spencer
    Are you using a USB hub? If you are, try using a powered USB hub or plugging into a different port.

    Since you verified your NCS device is working, this might be a device re-enumeration bug with the NCSDK and VM that we are working on at the moment. We will let you know as soon as we figure out a solution!

    Regards,
    Sahira

  • I'm running Ubuntu 16.04 natively and I'm also getting the same error "Error - Could not open NCS device."
    There are numerous suggestions scattered all over and none of them seems to work.
    This is a deal-breaker. Kindly fix it and also give us a central place to find WORKING instructions on getting this stuff to work.
    I was so excited to purchase one, but now...

  • And just like @spencer , I see the device listed when I run lsusb or dmesg.
    Also, I'm able to use the api to enumerate device but I get the same error message when I invoke 'open' on the device.

  • edited December 2018 Vote Up0Vote Down

    I have all the information in both filters as above.

    Tired on USB3 computer ports
    Tried on powered USB3 hub.

    $ making run
    python3 hello_ncs.py;
    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 0

    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 1

    D : [ 0] ncDeviceOpen:524 File path /usr/local/lib/mvnc/MvNCAPI-ma2450.mvcmd

    I : [ 0] ncDeviceOpen:530 ncDeviceOpen() XLinkBootRemote returned success 0

    W : [ 0] ncDeviceOpen:565 failed to find device

    Error - Could not open NCS device.

  • USB2

    $make examples

    Blob generated
    USB: Transferring Data...
    E: [ 0] dispatcherEventSend:820 Write failed -1

    E: [ 0] dispatcherEventReceive:236 dispatcherEventReceive() Read failed -1

    E: [ 0] eventReader:254 Failed to receive event, the device may have reset

  • edited December 2018 Vote Up0Vote Down

    Update:
    To eliminate the use of Virtualbox as a problem, I unplugged all drives, installed a new SSD installed Unbuntu 16.4

    $ apt-get install git
    $ git clone -b ncsdk2 http://github.com/Movidius/ncsdk
    $ cd ncsdk
    $ sudo update-usbids
    $ lsusb
    $ make install

    Same error but this time, but it got further than before.

    Under VirtualBox failed here:
    Network Input tensors ['data#24']
    Network Output tensors ['prob#38']
    Blob generated
    USB: Transferring Data...
    Time to Execute : 97.19 ms
    USB: Myriad Execution Finished
    Time to Execute : 92.61 ms
    USB: Myriad Execution Finished
    Output is in Channel Minor format
    USB: Myriad Connection Closing.
    USB: Myriad Connection Closed.
    Network Summary

    Detailed Per Layer Profile

    Under clean install of Unbuntu 16.4 USB3 powered hub
    Network Input tensors ['data#143']
    Network Output tensors ['prob#227']
    Blob generated
    W: [ 0] ncDeviceOpen:528 ncDeviceOpen() XLinkBootRemote returned error 3

    [Error 7] Toolkit Error: USB Failure. Code: Error opening device
    Makefile:65: recipe for target 'profile' failed
    make[3]: *** [profile] Error 255
    make[3]: Leaving directory '/home/michael/ncsdk/examples/caffe/GoogLeNet'
    Makefile:12: recipe for target 'GoogLeNet' failed
    make[2]: *** [GoogLeNet] Error 2
    make[2]: Leaving directory '/home/michael/ncsdk/examples/caffe'
    Makefile:12: recipe for target 'caffe/.' failed
    make[1]: *** [caffe/.] Error 2
    make[1]: Leaving directory '/home/michael/ncsdk/examples'
    Makefile:57: recipe for target 'examples' failed
    make: *** [examples] Error 2

  • edited December 2018 Vote Up0Vote Down

    $ making run
    python3 hello_ncs.py;
    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 0

    D : [ 0] ncDeviceCreate:308 ncDeviceCreate index 1

    D : [ 0] ncDeviceOpen:524 File path /usr/local/lib/mvnc/MvNCAPI-ma2450.mvcmd

    I: [ 0] ncDeviceOpen:530 ncDeviceOpen() XLinkBootRemote returned success 0

    I: [ 0] ncDeviceOpen:568 XLinkConnect done - link Id 0

    D : [ 0] ncDeviceOpen:582 done

    I: [ 0] ncDeviceOpen:584 Booted 9.2-ma2450 -> VSC

    I: [ 0] getDevAttributes:383 Device attributes

    I: [ 0] getDevAttributes:386 Device FW version: 2.8.2450.16e

    I: [ 0] getDevAttributes:388 mvTensorVersion 2.8

    I: [ 0] getDevAttributes:389 Maximum graphs: 10

    I: [ 0] getDevAttributes:390 Maximum fifos: 20

    I: [ 0] getDevAttributes:392 Maximum graph option class: 1

    I: [ 0] getDevAttributes:394 Maximum device option class: 1

    I: [ 0] getDevAttributes:395 Device memory capacity: 522059056

    Hello NCS! Device opened normally.
    I: [ 0] ncDeviceClose:776 closing device

  • edited December 2018 Vote Up0Vote Down

    Installed all get updates
    Installed NVIDIA Driver
    Restarted
    Plugged into USB3 port

    Finally COMPLETED $ make examples

    Later I will.
    Re-run to see if it was a fluke
    If its working, I will try it back in the USB3 hub to see if that's why it failed first time (after clean install not runing in VirtualBox)
    If its working on both.
    I will try VirtualBox again
    Previously I did get updates in the VirtualBox
    The only thing I didn't do was install NVIDIA Driver (but don't see how that could be related)

  • Hi Everyone,

    Jumping in on this thread because of the thread subject, [Error 7] Toolkit Error: USB Failure. Code: No devices found

    I'm running:
    VirtualBox 6.0.4
    Ubuntu 16.04 desktop (clean install)

    Please let me know if there are any suggestions.

    Thank you for your help.

  • Hi @Jeff_Blumenthal

    Thank you for reaching out. Looking at your lsusb output Bus 001 Device 004: ID 03e7:2485, I can see that you are using an Intel Neural Compute Stick 2 (NCS 2). The Neural Compute SDK only has support for the original Neural Compute Stick. You will need to use the OpenVINO toolkit with your NCS 2.

    Take a look at the getting started page for the NCS 2.

    Regards,
    Jesus

  • Hi @Jesus_at_Intel,

    Thank you for your help. I'm up and running on windows 10. Thank you for your help.

    Regards,
    Jeff

This discussion has been closed.