Trevor Bowen

how to access CW USB tap inside VirtualBox guest?

Discussion created by Trevor Bowen on Oct 30, 2012
Latest reply on Apr 2, 2013 by Alexandru Popa

Hi,

 

I am trying to update the NOR flash on a P2020 based board, and it works fine for me using CodeWarrior Pro v8.8.5 in Windows XP and Windows 7 on a native OS install.  However, if I install the same CW-IDE edition inside of a VirtualBox guest on a Linux host, the protocol log complains of "USB open failure", "Connection refused", and "Network fault":

 

CCS: 0000    :    ccs_open

CCS:        :        ipaddr = 127.0.0.1

CCS:        :        port = 41475

CCS:        :        timeout = 60

CCS:        :        serverh = 0

CCS:        :    ccs_open; ccs_error = 10

CCS:        :        Error message:

Connection refused

 

CCS: 0000    :    ccs_open

CCS:        :        ipaddr = 127.0.0.1

CCS:        :        port = 41475

CCS:        :        timeout = 60

CCS:        :        serverh = 0

CCS:        :    ccs_open; ccs_error = 0

CCS: 0000    :    ccs_get_connection_count

CCS:        :        serverh = 0

CCS:        :        count = 1

CCS:        :    ccs_get_connection_count; ccs_error = 0

CCS: 0000    :    ccs_available_connections

CCS:        :        serverh = 0

CCS:        :        count = 0

CCS:        :    ccs_available_connections; ccs_error = 0

CCS: 0000    :    ccs_available_connections

CCS:        :        serverh = 0

CCS:        :        count = 0

CCS:        :    ccs_available_connections; ccs_error = 0

CCS: 0000    :    ccs_config_cc

CCS:        :        serverh = 0

CCS:        :        config_string = utap:0

CCS:        :    ccs_config_cc; ccs_error = 0

CCS: 0000    :    ccs_available_connections

CCS:        :        serverh = 0

CCS:        :        count = 1

CCS:        :    ccs_available_connections; ccs_error = 0

CCS: 0000    :    ccs_available_connections

CCS:        :        serverh = 0

CCS:        :        count = 1

CCS:        :    ccs_available_connections; ccs_error = 0

CCS: 0000    :    ccs_set_timeout

CCS:        :        serverh = 0

CCS:        :        timeout = 60

CCS:        :    ccs_set_timeout; ccs_error = 0

CCS: 0000    :    ccs_config_server

CCS:        :        serverh = 0

CCS:        :        cc = 0

CCS:        :        server_config = 0

CCS:        :        value = 500

CCS:        :    ccs_config_server; ccs_error = 25

CCS:        :        Error message:

USB open failure

...

CCS: 0000    :    ccs_delete_cc

CCS:        :        serverh = 0

CCS:        :        count = 0

CCS:        :    ccs_delete_cc; ccs_error = 7

CCS:        :        Error message:

Invalid handle

 

CCS: 0000    :    ccs_close

CCS:        :        serverh = 0

CCS:        :    ccs_close; ccs_error = 0

CCS: 0000    :    ccs_open

CCS:        :        ipaddr = 127.0.0.1

CCS:        :        port = 41475

CCS:        :        timeout = 60

CCS:        :        serverh = 0

CCS:        :    ccs_open; ccs_error = 10

CCS:        :        Error message:

Connection refused

 

CCS: 0000    :    ccs_open

CCS:        :        ipaddr = 127.0.0.1

CCS:        :        port = 41475

CCS:        :        timeout = 60

CCS:        :        serverh = 0

CCS:        :    ccs_open; ccs_error = 3

CCS:        :        Error message:

Network fault

 

 

It appears that VirtualBox cannot completely access the host's USB connection to the USB tap.  I've tried the following:

 

  1. Created a USB filter for VirtualBox, so the guest grabs the tap as soon as it is available.

  2. Verified that the guest captured the USB tap:

    $ VBoxManage list usbhost
    Host USB Devices:

    UUID:               44474934-f764-490a-acda-9d739f521b88
    VendorId:           0x15a2 (15A2)
    ProductId:          0x50b3 (50B3)
    Revision:           0.0 (0000)
    Port:               1
    USB version/speed:  2/2
    Manufacturer:       Freescale Semiconductor Inc
    Product:            CodeWarrior USB TAP   
    SerialNumber:       11270583   
    Address:            sysfs:/sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.0/usb3/3-2//device:/dev/vboxusb/003/004
    Current State:      Captured
  3. Disable guest's (WinXP) firewall to ensure that it is not blocking any connections.

  4. Bump guest's available CPU's down from 4 to 1.

  5. Add deprecated usbfs pseudo-fs to host's /etc/fstab:

    none /proc/bus/usb usbfs devgid=85,devmode=666 0 0

  6. Opened read-write to everyone in udev rules:

    $ cat /etc/udev/rules.d/10-vboxdrv.rules
    KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0666"
    SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0666"
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0666"
  7. Ensured that my host user was in groups: plugdev, vboxusers, wheel, usb (85), and sudo - and rebooted several times.  :)

  8. Tried running VirtualBox as root!

 

None of these helped or produced different error messages.  I have run out of options and experiments to try. Any suggestions?


Thanks!


Trevor


Outcomes