Go Down

Topic: Hiding Arduino Device in Device Manager... (Read 364 times) previous topic - next topic

Healy06062

On my Mac I was able to find the Boards.txt file that the Arduino IDE uses, copied an existing board name and then modified it to a new board name, then compiled and uploaded my program using the new board name.

When I plug my Arduino board into my Windows 7 PC USB port, go to Device Manager, I see my Arduino board show up under "Other Devices" with the new name.  So far so good.

Now I want to take this to the next level.  I want to know how to "Hide the Device from the Device Manager" when I plug my Arduino device into my Window 7 PC.

I started looking on the internet to find what Driver parameter needs to be set to hide the device and found "NoDisplayInUI" under Device Capabilities.  Please take a look at the following link https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/hiding-devices-from-device-manager

Now I looked in the Boards.txt, Programmers.txt, and the Platform.txt files to see if there was a similar parameter as "NoDisplayInUI" that I could use and reset, no such luck.

I even looked at the HID.h & USBCore.h programs but now I'm getting in over my head if I try to modify those.

My Question:  Does anyone know how to set the "NoDisplayInUI" parameter to True or False on the Arduino Board driver, or use some other parameter to achieve the same result.

westfw

Your link says:
Quote
There are two ways to mark your device as hidden: within the device's driver or by using the ACPI BIOS.
I'm pretty sure that means that you can't control it from the "device" itself.  You'd have to modify the drivers on the PC, and since most Arduino applications use standard drivers (HDI, Serial, etc), it probably isn't possible.


Healy06062

Thank you for your input but couldn't it be possible to communicate to the PC Driver when plugging into the USB port using some compiled code in the Arduino microprocessor or sending some type of Driver parameters ?? 

If Arduino is using standard drivers there must be a way of communicating with the drivers at enumeration, perhaps some C code ?

westfw

Not unless the "standard driver" includes a method of negotiating such a thing.   Ie, it's NOT part of the USB enumeration specification, so a driver would have to have some sort of hack installed "if usb->hid->countrycode == CODE_USSR {make_invisible};"


Healy06062

Hmmm, in the link (Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/hiding-devices-from-device-manager), second bullet under "Hiding Devices from within a Driver" it says "On Windows XP and later versions of the Windows operating systems, a bus driver or bus filter driver can hide any device, started or otherwise, by responding to the IRP_MN_QUERY_CAPABILITIES IRP. When the IRP arrives, the driver must set the Parameters.DeviceCapabilities.NoDisplayInUI member to TRUE in the driver's dispatch routine."

When I click on the link for IRP_MN_QUERY_CAPABILITIES (Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/irp-mn-query-capabilities), this function provides "Input Parameters" to access the IO_STACK_LOCATION (Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_io_stack_location).

Question:  How can I communicate with the IRP_MN_QUERY_CAPABILITIES IRP ?  Could this be done via Arduino when I plug my Arduino device into the PC ?  or could this be done executing separate code (program) by using the IO_STACK_LOCATION ?  What is a Bus Filter Driver, is that the hook to get into the Bus Driver ?

I am not a C developer or a Windows operating system expert but looking for someone who is that could help walk me through this challenge. Perhaps I'm going where no man has gone before in the Arduino world but that doesn't mean it can't be done.

westfw

I dunno.  I'm pretty sure that things like IRP_MN_QUERT_CAPABILITIES are PC-side Windows Driver Programming details, which is a pretty obscure area of windows programming.  So this tells you HOW to write the windows-side driver so that it can hide devices, which is no help at all in getting an existing driver to hide a device based on code or data in the device.  Unless you find a back-door in the existing driver (documented or otherwise.)

Coding Badly

#6
Mar 19, 2018, 06:34 am Last Edit: Mar 20, 2018, 01:20 am by Coding Badly
...a bus driver or bus filter driver...
Those would be NT (Windows) kernel drivers.

Quote
...by responding to the IRP_MN_QUERY_CAPABILITIES IRP...
That would be the message sent TO YOUR KERNEL DRIVER that allows you to hide a device.

Quote
...walk me through this challenge...
...I am not a C developer...
You're a long way from home yuppie boy.

Quote
Hiding Arduino Device in Device Manager...
Is there a legitimate reason to do such a thing?


Go Up