USB device detection problems: using Compact Flash card reader and QNX (Virtual Machine) - virtual-machine

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 OS image of QNX 6.6.0 to put on a Compact Flash card. This card is plugged in an USB adapter which is connected to my host pc. I'm running Neutrino in a VM (VMware/VirtualBox) for which I enabled USB support. Generally, the adapter works fine under Win (current host) 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).
See also "ls /dev" screenshot.
The processes devb-umass and io-usb are running. So I expect that the adapter is detected automatically.
Any suggestions what went wrong?

OK, it seems that I had to restart the usb driver 'devb-umass' (several times). When the card reader is already plugged-in during the booting the driver will not detect it autoamtically. Thus one has to unplug and plug it in again after the devb-umass was getting re-started. It also might have been that the Host Controller Driver (HCD) was set to 'ohci' instead of 'ehci'.
Everything is working now as expected.
(Thanks Tim from the OpenQNX forum! ;) )

Related

USB CDC-ACM on STM32 device not registering on Linux

Working with the STM32L062 Cortex-M0 and CubeMX the generated USB CDC-ACM code works fine in Windows. With loopback code running on the STM32 and TerraTerm running on Windows characters typed in the terminal window correctly echo back. However, when this same system is then plugged into a laptop running Ubuntu, the device fails to enumerate. Even worse, the system doesn't appear to respond to the connection whatsoever- no new messages appear via dmesg that even a failed enumeration is going on. Given that the code used is generated by CubeMX wizards it is difficult to know what to start to troubleshoot. Any suggestions?
As an aside, this isn't the first issue presented by CDC-ACM drivers. Implementing a USB CDC-ACM stack for a PIC32MM processor, data can be sent to the host but not received from the host, however, if the driver is switched to plain vanilla CDC then data can be sent both ways no problem. So it seems maybe Ubuntu has some issues with the default USB drivers, but either way, it's very odd that the ST driver gets zero response at all from the system.

How to emulate USB-device as "alive" on VM?

Step by step:
My PC has connected printer via USB (I know VID:XXXX and PID:YYYY)
I took image of my PC and put inside virtual machine (VMWare)
Of course image on my VM doesn't has connected USB-printer (because real printer is connected to my real USB-port on my real PC).
One program is running and checking accessibility of printer by check connection with the printer via USB (I don't know how exactly - maybe via WMI, maybe via other way).
Results:
a) on my real PC this program works
b) on image doesn't work
QUESTION: is possible to emulate on VM-side that USB-port (VID:XXXX and PID:YYYY) is alive?
Thanks.
P.S. I don't want to install USB-redirect-via-TCP or similar approach.
You should switch to the QEMU emulator and to Linux to do that. VMWare probably doesn't support this of thing especially in a Windows environment.
If you are already on Linux, QEMU has hardware emulation of the xHCI and you can assign the host USB devices to KVM (read here: https://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest).
On Windows, I don't think this will be possible.

Does an HID device need libusbx Windows backend driver on Windows 7?

Current status:
I have developed some USB based device and have developed a driver on Linux using libusb. I am now porting the driver to Windows 7.
Device details
My device is a touch screen with two interfaces, one for the OS to communicate with the touch screen and the other for some vendor communication.
Old Stack Overflow post:
libusb_open returns 'LIBUSB_ERROR_NOT_SUPPORTED' on Windows 7
Here I was stuck with a problem that my libusb_open returned with an error. I learnt that I need Windows backend drivers. But I also learnt that it is for devices which are not recognised by the operating system.
Action taken
I tried installing a driver for my device using the Zadig tool, but I am not able to override the driver used by the OS with the new driver.
Do i really need a libusbx Windows backend driver for a device which has been identified and working well on windows 7? (The touch screen works perfect as a multitouch device)
What is the way forward as the device just can't be opened?
If you really use libusbx then you should be able to at least open the device for sure.
Make sure you did not mess the default HID driver for your device while playing with Zadig tool. Go to Control Panel/Device Manager/Hid section (is your device listed there?), search your device and remove the driver. Then try again.

"Unidentified USB Device" on Win CE 6.0

Quite a while I am struggling with a problem regarding the installation of certain USB device driver in Windows CE 6.0.
The device is some kind of Digital and Analog IO device that connects to the USB port.
It is the LabJack U3.
I followed all instruction and put the driver (labjackusb.dll) and coresponding registry entries into the Windows CE image but the device is not detected correctly.
On every boot up a small Message box came up with the Title "Unidentified USB Device"
and the message "Enter the name of the driver for this USB device:"
Whatever name I put into it want work. I tried the name of the dll. Some title in from the registry and so on but never succedes.
The driver does not work nor the device.
The customer support can not help me so I am asking here somebody to help me at least
with a steps to follow to try to find a solution.
Why the OS does not matches the USB device with the corresponding driver?
I checked everything one million times and everything is in place.
There are a load of reasons this might fail. First:
Is the driver definitely a Windows CE driver?
Is it built for CE 6.0 (not 5.0 or something else)?
Is it built for the same processor architecture you have?
The way to really debug this is to hook up KITL, put in a debug version of device.exe and see what the device managet is actually doing when you plug in the device. A way better and way more reliable mechanism than just trying to guess.

USB HOST mode in ICS

I'm trying to connect a usb sensor (see Toradex) to an android phone (Desire Z) running android 4.0.3.
To test this, I wrote a small app to enumerate the attached device(s).
This supposed to have USB HOST mode implemented and to power the usb sensor (HID)... but it doesn't.
I got a USB OTG cable and now, when I attach the cable, a small icon appears in the status bar (car mode).
I'm disappointed since I waited for this feature for awhile now...
Any thoughts? I read almost everything out there related to this (Sven work and whatnot) but I might have missed something...
Thanks!
I have worked a lot in the past year and a half to build custom android platform. Some was under Froyo but mostly on Gingerbread. Most on the hardware I added was on either a UART or on USB, which is what you want to do. Unfortunately, it is not as easy to add a USB peripheral on an Android device than on a PC or a MAC. PCs and MACs have virtually unlimited memory space (hard drive). They can hold the drivers of a very large number of devices. That makes it possible to do auto-detection and automatic loading of drivers. On an Android device, it is a lot more lean therefor, just the required drivers are stored on the device. Every time I added a new device, I had to compile the driver for my platform and make some modification in my configuration. It is also possible to load the driver as a module instead of compiling it with the kernel (gives a file.ko output). Although, the driver must have been written accordingly. But, you will have to install it by modifying the "init.rc" which requires root privilege.
here is a few link of question/answer about about drivers in Android. That should give you a little bit more info:
USB touchscreen driver
Hope it helps but unfortunately, it is quiet a lot of work do do.