USB device detection: CF card reader & QNX (VM) [solved]

HI,

First of all, there’s a similar thread on OpenQNX posted years ago but the solutions don’t really apply for me.

Having said that. I want to create an image of SDP660 on a Compact Flash card using an USB adapter. I’m running Neutrino in a VM (VMware/VirtualBox) for which I enabled USB support. Generally, the adapter works fine under Win and Linux.

The (apparently out-dated) tutorial I was following stated to search for devices named umass* or hd* after connecting the USB adapter. But there aren’t any (except for hd0). devb-umass and io-usb are running.

ls /dev

Any suggestions what went wrong?

PS: I posted this also on StackExchange.

First, It’s easier to use the ‘df’ command to list just the disks rather than every device in the system.

Second, what version of QNX are you running in your VM?

Third, I’ll assume that you have your CF card inserted in your USB adapter :slight_smile:

Fourth, what do you see if you enter the command ‘usb -vvv’. This is what I see in my VMWare box (no USB drives attached in my case)

USB 0 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk, Isoch, Low speed, Full speed

Device Address : 1
Upstream Host Controller : 0
Upstream Device Address : 0
Upstream Port : 0
Upstream Port Speed : Full
Vendor : 0x0e0f (VMware)
Product : 0x0003 (VMware Virtual USB Mouse)
Device Release : r1.02
USB Spec Release : v1.10
Serial Number : N/A
Class : 0x00 (Independant per interface)
Max PacketSize0 : 8
Languages : 0x0409 (English)
Current Frame : 86 (1024 bytes)
Configurations : 1
Configuration : 1 (VMware)
Attributes : 0xc0 (Self-powered)
Max Power : 0 mA
Interfaces : 2
Interface : 0 / 0 (VMware)
Class : 0x03 (HID)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Interrupt/IN
Max Packet Size: 8
Interval : 1 ms
Interface : 1 / 0 (VMware)
Class : 0x03 (HID)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 2
Attributes : Interrupt/IN
Max Packet Size: 8
Interval : 1 ms

Device Address : 2
Upstream Host Controller : 0
Upstream Device Address : 0
Upstream Port : 1
Upstream Port Speed : Full
Vendor : 0x0e0f
Product : 0x0002 (VMware Virtual USB Hub)
Device Release : r1.00
USB Spec Release : v1.10
Serial Number : N/A
Class : 0x09 (Hub)
Subclass : 0x00
Protocol : 0x00
Max PacketSize0 : 8
Languages : 0x0409 (English)
Current Frame : 194 (1024 bytes)
Hub Number Ports : 7
Hub Characteristics : 0x0009 (Individual power, Individual over-current)
Hub Power On->Good : 100 ms
Hub Power Requirements : 100 mA
Configurations : 1
Configuration : 1 (VMware Virtual USB Hub)
Attributes : 0xe0 (Self-powered, Remote-wakeup)
Max Power : 0 mA
Interfaces : 1
Interface : 0 / 0 (VMware Virtual USB Hub)
Class : 0x09 (Hub)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Interrupt/IN
Max Packet Size: 1
Interval : 255 ms

USB 1 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk, High speed

Do you recall the options you started io-usb with? You may want to manually specify all 3 USB types: ‘io-usb -duhci -dohci -dehci’ as I am not sure which one VMWare is emulating.

Just a guess but I suspect VMWare isn’t presenting the USB CF card to QNX. Is this card and USB adaptor already plugged in when you start your QNX VM? I ask only because when I plug in USB drives VMWare asks if I want to make them available to the guest OS. Until I do that they don’t show in QNX.

Tim

Thanks Tim for taking the time…

That was actually intentionally in case I’m overlooking something disk unrelated but I will keep that in mind. ;)

I’m using 6.6.0.

Confirmative… I tried several combinations including booting with the adapter attached and then inserting the CF card or having it already inserted… a.s.o.

For full print see here. It seems that the CardReader is detected and the correct configutation is chosen.
[size=75]
USB 0 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk(SG), Isoch(Stream), High speed

Device Address : 1
Upstream Host Controller : 0
Upstream Device Address : 0
Upstream Port : 1
Upstream Port Speed : High
Vendor : 0x0bda (Generic)
Product : 0x0151 (USB2.0-CRW)
Device Release : r51.95
USB Spec Release : v2.00
Serial Number : 20060413092100000
Class : 0x00 (Independent per interface)
Max PacketSize0 : 64
Languages : 0x0409 (English)
Current Frame : 12920 (1024 bytes)
Configurations : 1
Configuration : 1 (CARD READER)
Attributes : 0x80 (Bus-powered)
Max Power : 500 mA
Interfaces : 1
Interface : 0 / 0 (Bulk-In, Bulk-Out, Interface)
Class : 0x08 (Mass Storage)
Subclass : 0x06 (SCSI)
Protocol : 0x50
Endpoints : Control + 2
Endpoint : 0
Attributes : Control
Max Packet Size: 64
Endpoint : 1
Attributes : Bulk/OUT
Max Packet Size: 512
Endpoint : 2
Attributes : Bulk/IN
Max Packet Size: 512
[/size]

VirtualBox only emulates EHCI and I’ve chosen the same for VMware (i.e. I selected USB2.0 compatibility support within the VM settings).
And yes I made them available to connect (i.e. by selecting ‘Connect…’) to the VM. In both cases (VBox and VMware) I made sure that the USB devices are passed to the VM by the respective GUI client (little blinking icons are signalling that the adapter is detected by the clients when plugging in :stuck_out_tongue_winking_eye: )

Ted

Ted,

I’m not familiar with 6.6 but it shouldn’t be worse than than earlier versions like 6.3 and 6.5!

I wonder if the card reader itself isn’t recognized properly by QNX (though the class/subclass looks fine). If you plug a plain USB thumbdrive (Fat32 only) into your machine is that passed correctly by the VM to QNX?

I’m also curious what you see if you ‘slay devb-umass’ and manually start it when your CF reader is attached with your card in it. There are some options to devb-umass to manually specify what to connect to in terms of vendor. You can also use ‘sloginfo’ to look at the system error logs to see if anything is being logged there when you manually start devb-umass.

Tim

For autodetection,

  1. devb-umass must be running
  2. mcd must be running and be able to find it’s configuration file
  3. The “fs-*.so” for the filesystem you want to mount must also be present.