I'm trying to get a device name for a USB Bluetooth transceiver to use with CreateFile, but I don't know the file path. I've tried the USB file path but always return SHARING_VIOLATION.
In order to understand if that's the correct device path, how can I get Windows registered device names? Is there a standard device path for a Bluetooth transceiver?
The most straight-forward is likely USBDeview to find the exact device name.
And I'm not aware of a standard name for the BT transceiver.
Related
I am writing the firmware for a USB HID device. When it is connected to a Windows PC (running Windows 8.1, if that makes any difference) it gets listed in Device Manager, under "Human Interface Devices", as "HID-compliant vendor-defined device". For obvious reasons it would be preferable for a nicer description to be shown.
I'd have guessed that the description would be taken from the USB string descriptor table, perhaps from the entry specified in the device descriptor as containing the product name. This doesn't appear to happen. Perhaps there is an error in my descriptors, but when I connect a USB analyser during enumeration it correctly identifies the manufacturer name, product name, and serial number string.
A little googling suggests that the Device Manager's descriptions can be controlled from a driver's .inf file, but this device doesn't have its own drivers.
Am I out of luck, or is there a way for an HID device to determine how it is described by the Device Manager? If there is, what is it?
(Related prior SO question: Rename a USB HID device under Windows. An answer to that question says that you need to write a Windows device driver to do this, but comments on the answer indicate that this shouldn't apply to HID devices, and the answerer concedes this. Unfortunately no further suggestions are to be found there. That question may actually be trying to ask essentially the same thing as I am, but if so it's ill-titled; I am not trying to rename anything.)
As the title, I want to get iManufacturer number of a webcam, how can I do?
If I install special driver of libusb module to get iManufacturer number, I can get the number, but the webcam became a disk on my computer, and I can not use it as a camera. How can I do without installing the special driver of libusb module?
The iManufacturer number is contained in the usb device descriptor. You can get the device descriptor in user mode by using DeviceIoControl with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX. Take a look at the usbview microsoft example, which does this in its enum code.
http://code.msdn.microsoft.com/windowshardware/USBView-sample-application-e3241039
I am wondering whether it is possible to display a message to the user when he connects a USB device. For example, I want to program the USB so that any PC that the device is connected to displays the pop-up window, saying Please leave the usb on this place.
It is NOT possible;
You wrote: " I want to program the usb so that any PC that the device is connected "
You'd rather program the PC not the USB
USB is a storage device only. Unfortunatelly you can't program all the PC's that USb might get into
The ONLY way this might be (yes it won't work in every case I guarantee) be tweaked is to have autorun.inf file in the USB pointing to a program on the USB that displays the message you want.
[Autorun]
Open=msg.exe
Due to most modern operating systems have tons of blocking mechanism to stop autorun programs this message has very slight chance to appear
You will need to first register for device notification. Then, you can implement a callback to detect when your USB device is inserted or removed. Within that callback you can do your messaging to the users based of your inspection of which device was inserted or removed.
This is only possible if the computer already has a driver installed for this device that implements this behavior. If, as I suspect, the device is actually a standard USB storage device, this is not possible.
How can you check if an MIDI device is also an USB device?
Seems that checking for this string "\\?\\usb" in the device identifier is not enough all the time.
Use CM_Get_Parent (recursively) to find out whether the MIDI device is connected beneath a USB root port.
Let's say that I have already determined the following device path for a certain bridge device:
\Device\USBSER000
How would I be able to programatically look up its device entry in the registry, i.e.,
HKLM\SYSTEM\CurrentControlSet\Enum\USB\Vid_xxxx&Pid_xxxx\xxxxxxxxxx
Thanks in advance.