How to change USB device manufacturer name and type - usb

I want to change the name and type of a wireless USB dongle, so the OS (Windows in this case) recognize it as a keyboard for example but work as a wireless USB dongle, I know about USB mass production tools for USB removable devices but my devices is a wireless USB dongle, is it possible?
I want to hide the device from some reporting software, the software is sensitive to some USB devices and with this trick, so I am looking for the software sees it as a keyboard, so won't give an alert.

How to change USB device manufacturer name and type
By replacing the firmware of the device.
In other words, that's impossible for you.
I want to hide the device from some reporting software, the software is sensitive to some USB devices and with this trick, so I am looking for the software sees it as a keyboard, so won't give an alert.
Is your device a keyboard? Otherwise, presenting it to the operating system as keyboard will mean it does nothing useful. Even if that were possible, you would hide a device, but make it useless. Nothing works like this.
You try to convince parts of windows that something isn't there. That means: You want to write a rootkit for Windows. Good luck! This is an old field, and a lot of people with experience in writing malware are playing it. You need to be smarter than the next windows update, potential virus scanners and the software you're trying to trick.

Related

Human Interface Device sharing [HIDAPI]

I have a Human Interface Device (HID) that I'm trying to talk to with HIDAPI and I am having some difficulty talking to it when another program has a handle on the device; namely the device vendor's development software.
The device in question is an RFID Reader which behaves as an HID (not to be confused with HID Corporation, which manufactures RFID products).
I cannot get a handle on the device upon calling hid_open() from HIDAPI only when the vendor's software is open. Otherwise, I have no apparent issues talking to the device. Normally I would think that the device can only be opened by one program at a time. However, considering that a keyboard and a mouse are also considered HIDs (which are shared among multiple programs all the time), I feel like I should be able to access the reader from both my software and the vendor's software.
I don't know much about HIDs, nor USB in general, so I'm sure this is bit of a newb question, but I'm sure somebody will find this useful in the future.

C++ Issue creating a mouse simulator

I have been given the following project to do:
create a program that runs on computer 1. The program will simulate mouse movements and pass that information through a usb cable from computer 1 to computer 2. Computer 2 must believe the information being passed to it is coming from a mouse-device.
Basically computer 2 has to believe that a mouse is connected to its usb-port, when actually it is another computer (computer 1), and computer 1 basically simulates mouse movements. Which movements the computer simulates doesn't really matter because that would probably be the easy bit, the harder bit is actually making the software that makes that possible.
QUESTION: Is there any program that currently does that? If so please tell me which one it is. If there isn't any program you know of, how would I go about making it myself?
PS: I would assume that this project is theoretically possible. I mean the computer 1 would just have to send signals to computer 2 that are similar to the normal signals sent to a computer by an ordinary mouse.
The ability to act as a USB host as well as a client (keyboard, mouse, etc.) is not typically part of the USB chipset in PCs. The ability to serve either role requires something unique like USB OTG; which you can find in some mobile phones.
So no, this is generally not possible with two random PCs and a USB cable. In any case, you can find a discussion on this here:
Emulate USB Device with USB Host
The thread mentions that you could make a proxying device with active electronics in it to sit between two host-only devices and be capable of translating to appear as a client to one. But with just a plain old USB cable you can't.
Since you're so specific about wanting it to be done with USB and no need to install special software you are probably not interested in something like Synergy:
https://en.wikipedia.org/wiki/Synergy_(software)
...but someone else finding this question might be.

What's the best way to determine if a HID device driver can be written in user space on OSX?

I need to write a number of drivers for both HID USB devices as well as some old serial devices. The drivers are to pull data off the device and then send the data over to an application that then consumes it. Since the Apple Docs mention that a lot of USB and HID communication can be done from the user space I had assumed that I would not need to write a kernel extension, at least not for the HID devices. Could some one tell me a more solid way to determine this?
Thanks!
If you're writing a single application that must talk to one or more USB HID devices you may well find you can just access the devices straight from the application using the application-level USB APIs.
A kernel driver would be more for something like a networking or mass storage device that needed to integrate with the kernel to be be available to multiple applications.
This Apple document Common QA and Roadmap for USB Software Development on Mac OS X goes into some detail on the matter and links to example code too.

Turn on PC with USB-device

I want to be able to turn my PC on and off using an IR-remote sensor that is connected via USB to the PC. The sensor is a custom PCB implemented with an AVR microprocessor and V-USB software USB-implementation.
Now, turning off the PC is no problem with software, but is there any way to turn ON the PC using USB?
(Please note, I'm not talking about booting from USB-stick or USB-power supply ...)
There seem to be two problems:
keeping the USB powered on while the PC is off. It seems that most mainboard have a jumper for this functionality.
bringing the PC back to life. There seems to be no standard functionality for this. The solution is to "press" the PCs power button through the AVR on the USB board. I know, this means extra cable from the USB to the PC, but it seems to be the easiest solution.
Another workaround could be to send the power-on signal to the PC over ethernet. But I guess this will be more complicated than the power button solution and it involves extra cables too.
This Microsoft knowledgebase article describes how to enable "wake on USB" for a USB mouse. I just checked, and my keyboard device entry (on Windows Vista) has the same choice, already checked.
So, if your AVR is emulating a USB keyboard or mouse, it should be possible to wake the computer by sending the proper data.
there must be a way to do this with USB, since some PCs can be switched on with the keyboard. I think this will be some looking whether your mainboard/BIOS support it (it may be you need to turn it on in BIOS, this will probably also ensure your device gets power from USB although the PC is switched off), and whether that V-USB (unknown to me) can send the "wakeup"-signal.
good luck !
How "off" does the PC need to be? Is waking from sleep/suspend enough? The USB standard describes "remote wake-up".
Aside from enabling remote-wakeup, like unwind mentions, software on the PC is not involved in making this work.

Is USB power always enabled ? And if not, how to write a driver

I have a device that came with an AC power adapter where the connector is a mini USB plug. The device however doesn't seem to power itself from a computer's USB port (using a standard USB-mini USB cable) unless a specific driver is installed. The driver is only available for Windows. I would like to charge the device from USB plugs on different platforms.
My question is: why isn't power getting to the device without the driver? Is a driver always required for a USB port to start giving power? Or is it this device that's specifically made not to take a charge unless some software routine triggers it to do so?
I guess my question can be summarized as: Is power not present on the USB cable or is it present but the device ignoring it. If the answer is the former, I'll be trying to figure out how to write software that will enable the voltage to always be present.
Thanks
Why isn't power getting to the device without the driver?
USB ports are always powered when the computer is on and the USB control software hasn't detected current overdraw.
Is a driver always required for a USB port to start giving power?
No, the USB port is always required to start off providing power to the device, otherwise the device could never initiate a connection.
Or is it this device that's specifically made not to take a charge unless some software routine triggers it to do so?
This can be complex. To meet the USB spec a device cannot pull more than a few mA until it's registered with the computer.
However, nearly every computer allows the USB port to pull the full 500mA (and more) before it'll shut the power off.
The device you're charging is being nice by not pulling any significant power until the computer gives permission.
Writing software won't help, the device has to register with the USB bus, which will best be done with the driver.
However, the plug in charger doesn't do that. It likely has shorted the two data lines of the USB plug together, which signals the USB device that it's not connected to a computer and can pull the full 500mA without waiting.
Take a USB extension cable, cut off the jacket, and short the data lines (green and yellow, sometimes) together on the end going to the USB device, and leave them cut without touching anything on the end going to the PC, and leave the read and black power wires connected through.
It might work. If not, take the wall charger apart and find out what it's doing with each of the four USB wires, and see if you can duplicate that.
This might be helpful if you are targeting a linux system.
This seems to be platform-specific. In Linux, USB ports are always energized, while on Windows they don't. Thumbdrives with LEDs turn off when unmounted in windows, but in Linux they stay lit. My cellphone's manual says that it can't be charged by a PC, but I regularly do on my linux machine, I guess that's because they don't have a driver and windows won't power up without one.
Have you tried plugging it into a 'dumb' USB port - like the one on a car charger? Those ports are pure power and don't create a USB network. I think.
Unless you have the hardware specs from the manufacturer, I think you are out of luck. You could try reverse engineering the driver to see what it does, but I'd expect it would be cheaper and easier just to buy one with cross platform drivers or charges without the driver.