what types or classes of USB device will show in the system tray removal list? - usb

I want to know what kind of USB device or USB class will show in the system tray "safe to remove device" list in Windows. I thought the OS put certain classes of USB device such as a storage or media device in the system tray, but I found my Aardvark I2C/SPI Host Adapter and a hub are also listed in the tray. Any comment is appreciated, thank you very much!

Related

How to use a custom USB device (WinUSB) on Microsoft HoloLens 2?

I made a custom USB sensor device that runs on a Windows 8.1 / 10 desktop computer using the WinUSB driver (I implemented Microsoft extended USB descriptors in device firmware to automatically install the driver when the device connected).
Can I use a WinUSB device on HoloLens2? Or, if there is no WinUSB support on HoloLens2, how can I use my USB device with a “custom USB device class”?
At the moment, I do not have a hololens2, but I need to understand how the USB works on it.
Edit: I found this link: https://learn.microsoft.com/en-us/hololens/hololens-connect-devices#hololens-2-connect-usb-c-devices
It says that hololens2 supports the following device classes:
Mass storage devices (such as thumb drives)
Ethernet adapters (including ethernet plus charging)
USB-C-to-3.5mm digital audio adapters
USB-C digital audio headsets (including headset adapters plus charging)
Wired mouse
Wired keyboard
Combination PD hubs (USB A plus PD charging)
My device does not implement any of these classes (custom class). Is there a chance to make it work on hololens2?
I finally tested my code and USB device on real Hololens 2. The USB device works great there because Hololens2 supports WinUSB! The WinUSB driver was installed automatically (my device has WinUSB descriptors).
According to the documentation you referred, all classes HoloLens2 supports have been listed, and unlisted classes are not supported.
Could you provide more information about your business request and submit a feature request via feedback hub on new feature request to be considered in future releases of HoloLens OS and devices?
If it’s a hot impacted feature, it will be possible to be given priority to jump in the development schedule. Actually, the existing classed on HoloLens 2 are also based on user’s feedback in such way.
For how to post feedback request, you can follow this doc: Send feedback to Microsoft with the Feedback Hub app.

STM32F04 in DFU mode recognized only when powered from battery (Win10)

I made a STM32F042k6, battery powered device, that I would to flash vi DFU protocol.
In order to do so I disconnect the battery, I pull BOOT0 to VCC, and then plug the device in USB3 port of PC (no USB2 available). The device is not recognized and showed
VID:0000 PID:0002 (case I)
However, when I first connect battery, and then connect the device to PC it is recognized without a fuss (case II).
The problem I face is that I would like to initiate jump to bootloader program by command in software - but then I reach exactly the same condition as in case I.
Could you help me to identify what conditions for proper boot I am violating?
EDIT:
The way I have discovered the problem was when I implemented software jump to bootloader. It seemed not to work at all (VCP device dissapeared, and erroreous <> device appeard in system PID:0002 VID:0000).
I wanted to enter bootloader by pulling up BOOT0 pin, but I could see that I sucseed only when battery-power cycled. USB power cyccle resulted in the same "failed descriptor" device.
I suspect that when powered on via USB, the booloader has som ecommunication problems and cannot establish proper PID and VID. When powered via battery - this problem is not existing.
Do you have a discovery board?
I read in the STM32F042x4/x6 Reference Manual (DocID025832 Rev 5):
The STM32F042x4/x6 embeds a full-speed USB device peripheral compliant
with the USB specification version 2.0.
(part 3.19, p.27).
In the AN2606 (Rev 33), a table shows the USB configuration which is used by the DFU Bottolader in USB FS (Full-speed):
I assume that the USB in the bootloader is the 2.0, but USB 3.0 must be USB 2.0 compliant. So it is possible to use an USB 3.0 port.
I suggest you use the DfUSe Demo from ST. Its interface consists of a tab where the DFU devices available are displayed when detected. I try it on another STM32x by following these steps:
Open DfuSe Demo software.
Plug BOOT0 to Vdd to put the micro on DFU mode.
Plug the USER USB to your computer port.
The name of your device should appear in “Available DFU Devices” field.
You could try to use directly PA11 and PA12 as well (according to Table 12) instead of the USB port of your board.
EDIT:
Another solution to upgrade your firmware without driving boot0 is to jump directly into the DFU bootloader of ST inside your firmware. Else you could design your own IAP bootloader (In-Application Programming).
I hope that helps.
I faced this same issue with the STM32 Mini F401 and dug into it for several days. Unlike the OP I was unable to find any electrical conditions which reliably got the bootloader to do the right thing. I was able to program my board maybe once every 20 tries, which was really slowing down my process.
In the end I discovered that I can go to the Windows device manager, show hidden devices, and there will be an entry in Universal Serial Bus Devices called STM32 BOOTLOADER. When the issue is happening the board is connected in dfu mode but that device is not marked active in the device manager.
To resolve the issue consistently, you can manually delete the hidden STM32 BOOTLOADER entry, uninstalling the device (no need to delete the driver, just uninstall the device). Then reboot your board in DFU mode and it should connect as expected every time. Unfortunately I need to do this process every time I want to program, but that's far better than the inconsistent/intermittent failures before.

how can the computer distinguishes between keyboard USB and mouse USB?

Wondering how can the PC distinguish among multiple USBs. For example, when i plug my flash drive USB into my computer how can it know that it is a flash drive USB not a keyboard USB ?
Thanks in advance.
in the USB standard there are USB classes a memory stick is USB mass storage class, keyboard, mouse, joystick are USB HID class (Human Interface Device), cameras implement USB PTP (picture transfer protocol), USB-to-serial (virtual COM ports,...) is USB CDC ACM class ,...
the following link lists all USB classes for that windows has drivers https://msdn.microsoft.com/en-us/library/windows/hardware/ff538820%28v=vs.85%29.aspx
when the USB device is plugged in there is a communication between the MCU on the USB device (firmware) and the PC (USB host) . in this communication the device says which USB class it it and the host loads the fitting driver
you can sniff this communication using wireshark or see dmesg (on linux)
this communication is very low-level and not easily human-readable. there are tools like wireshark or lsusb -v for this
a USB device has to implement a special hierarchy of descriptors in which information of the internal structure of the USB device is contained. the hierachy is:
device descriptor -> configuration descriptor -> interface descriptor -> endpoint descriptor
EP0 is reserved for control transfers, else any transfer has to go to or come from an endpoint (OUT endpoint / IN endpoint)
see http://www.beyondlogic.org/usbnutshell/usb1.shtml
USB is a higly complex standard because it implements a wide functionality for a large number of different devices in one physical interface. i think the most complicated USB class standard is USB audio...

How to use usb flash or virtual drive to act as a plug and play device?

I am trying to find a way to mimic a USB device being connected without actually having it available. I am trying to develop an additional feature to software that is only fully unlocked when the USB device is connected to the computer. Because the client is unable to provide a demo device for me to use here shortly, I'd like to find a way to emulate or mimic the connectivity of the device so I can finish development. Can I do this with a flash drive perhaps? Find someway to copy the files so that when I insert the flash drive it acts as a plug and play device?

Using Arduino to connect Android tablet to USB Accessory

I have an Arduino-compatible board with USB Host Shield. It is connected to an Acer A100 Android tablet running "Ice Cream Sandwich" (Android 4.0.3) with Kernel 2.6.39.4. (The tablet has a USB micro connector and does not support USB HOST mode and therefore cannot connect directly to a USB accessory device.)
This picture shows what I have been able to do successfully (but with my tablet in place of the phone).
http://www.seeedstudio.com/wiki/File:SeeeduinoADK_Setup.jpg
I would like to find an example of using an Android tablet connected to a USB Accessory (such as a keyboard or flash drive) via Arduino.
Connecting the USB accessory to the Arduino's USB micro connector (using an external power supply) does not work.
Can anyone provide me with such an example?
Theoretically it should work, I haven't tried it yet though.
Arduino should act as the middle man and should relay signals both from your tablet and the accessory.
What code are you use?
This is: adk_release_20120606?
And what board are you use SeeeduinoADK?
I use board Seeeduino ADK, but unfortunately I could not make it work in USB accessory mode. My board work in only ADB (MicroBridge mode). See my work example
My tablet is Ainol Aurora with Android version 4.0.4 (CyanogenMod 9)