Click here to Skip to main content
15,898,373 members
Everything / USB/HID

USB/HID

USB/HID

Great Reads

by Orphraie
An overview of what STM32 development boards have to offer
by Andre van Dun
Reading the temperature using the Temper USB thermometer by pcsensor.com
by Orphraie
This article will help you to understand how to communicate with the USB devices using WinAPI in C#
by Jason Stern2
A demonstration of how to use Windows' RawInput API to manually process MultiTouch data.

Latest Articles

by Orphraie
This article will help you to understand how to communicate with the USB devices using WinAPI in C#
by Orphraie
An overview of what STM32 development boards have to offer
by Andre van Dun
Reading the temperature using the Temper USB thermometer by pcsensor.com
by Jason Stern2
A demonstration of how to use Windows' RawInput API to manually process MultiTouch data.

All Articles

Sort by Score

USB/HID 

16 Jul 2021 by Orphraie
An overview of what STM32 development boards have to offer
7 Mar 2013 by Michael Haephrati
The question is about preparing a USB stick (thumb drive) to run an application whenever it is inserted to a computer without previous preparation on the PC to which it is inserted to.
8 Mar 2013 by Michael Haephrati
One interesting solution would be using an HID device[^], which looks like a USB Thumb drive but in fact is recognized as a keyboard. When you attach a new keyboard to your PC, installation takes place immediately. Here is an example:...
7 Mar 2013 by OriginalGriff
You can't, without the users express permission, not since mid-2011 anyway - MS removed it from all OS's to prevent the spread of malware.
28 Sep 2015 by Maciej Los
Google is your Friend! Here is a set of links:http://www.developerfusion.com/article/4392/deviceiocontrol-usb-using-managed-c-c/5/[^]https://channel9.msdn.com/coding4fun/articles/Is-that-you-Writing-Better-Software-for-Cool-USB-Hardware[^]http://www.beyondlogic.org/usbnutshell/usb5.shtml[^]
21 Dec 2016 by CPallini
I suppose you have to go to driver level, see, for instance: How to write your first USB client driver (KMDF) (Windows Drivers)[^] (assuming you are using Windows)."Was not able to find simple code."I hope you intended 'sample code', for it wouldn't be simple by no means. :-)
21 Dec 2016 by Jochen Arndt
USB driver chips are integrated circuits with built-in support for handling the USB protocol. Therefore, they have no commands to set the data lines directly. That would make no sense at all because the USB protocol uses specific signal states upon initial connections to select the speed.For...
28 Sep 2017 by Jochen Arndt
Quote: - serial port number changes sometimes That might happen when plugging the USB-to-Serial converter into a different connector. But it should not happen when not unplugging the converter. Quote: - another application can "steal" the port and kill the communication COM ports are...
1 Oct 2018 by Member 14002991
I don't know if you still need this, but I found the solution to your problem. I'm just starting a project where I need to do the same. The BBB sets up the USB clients in /opt/scripts/boot/am335x_evm.sh And it seems that after this, you can no longer disable the UDC in order to install your...
16 Feb 2019 by Dave Kreskowiak
You're going to have to contact the people you got that code from to get an answer on this. They are the only ones that are going to know what they did with the USB bus and how they did it in the code. Better yet, they're also going to be the ones with the rationale behind what they did.
16 Aug 2012 by Kenneth Haugland
Can really tell unless you show us some code. Perhaps youll find something useful in these articles:http://www.developerfusion.com/article/84338/making-usb-c-friendly/[^]http://www.usbhidnetclass.org/[^]Good luck :)
16 Aug 2012 by __John_
Thanks Kenneth, I am having second thoughts about it not being the device.Snoopy shows the packets going out.
24 Nov 2012 by Abhishek Pant
have a look at these article they can help you a little..Detecting USB Drive Removal in a C# Program[^]Detecting when drives are added or removed[^]Working with USB devices in .NET and C#[^]
11 Feb 2013 by Transitional
I'm writing an application to read a USB Cardreader. I'm using the FileStream.BeginRead Async method to read the usb CardReader. but it doesn't seem to return. I was wondering what I am doing wrong here? The PC sees the cardreader as a keybord hid device, I wonder if that is the problem. Can...
18 Feb 2013 by Transitional
I have a usb cardreader that is recognized by my PC like a keyboard. I wrote a small app to read the data from the card, but it doesn't work I dont get any data in my filestrteam. I was wondering if the hid class works for keyboard like devices.
18 Feb 2013 by CPallini
Quote:I was wondering if the hid class works for keyboard like devices.Yes, see, for instance HID at Wikipedia[^].
22 Aug 2013 by bigcdh
Ok, so I'm playing around with some code I found at this link which has a great tutorial and download for a hid wrapper in VS2010.http://helmpcb.com/software/usb-hid-template-for-visual-basic-2005[^]I've created the template and currently trying to read from my hid, which is a USB sim...
22 Aug 2013 by bigcdh
Ok, so i'm using the following code to spit out the connected USB devices to the system: Private Sub btn_Show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Show.Click Dim USBClass As New ManagementClass("Win32_USBHub") Dim USBCollection...
4 Jun 2014 by Afnan Arshad
18f4550 interfacing with pc on usb port
4 Jun 2014 by CPallini
At product's page[^] on the Microchip website you may find application notes and software libraries.
20 Nov 2014 by Richard MacCutchan
Take a look at https://www.google.com/search?q=usb+printer+to+the+android[^].
5 Dec 2014 by nitinpai2000
I ran into similar problem. Here is the snippet of problem code.static void Main(string[] args) { FileStream stream = new FileStream("test.txt",FileMode.Open); byte[] data = new byte[2]; var result = stream.BeginRead(data, 0, 2, ReadSuccess,...
5 Dec 2014 by vitalplant001
I have the same problem and I expect an answer to this problem:) Thanks
6 Feb 2018 by Member 11051697
Hi guys,I am a newbie to USB HID device control.I'm having a problem with getting an access to endpoint 0.My device has 3 endpoints 0, 1 and 3.I see the devices only for ep1 and 3 in Device manager of Windows Control Pannel, and access them.I don't see the ep0 device from the...
21 Jan 2015 by User 59241
Read this:http://www.developerfusion.com/article/84338/making-usb-c-friendly/[^]Then this article has a working example:C# USB HID Interface[^]
7 Aug 2015 by webmaster442
Have a look at #USBLib. It's built over libusb, it has device detection based on VID & PID. download: http://sourceforge.net/projects/sharpdevelop/files/SharpUSBLib/1.0.0.1/[^]
31 Aug 2015 by Mehdi Gholam
Search for "HID protocol using java" in Google you will get your answer : https://www.google.com/search?q=HID+protocol+using+java&ie=utf-8&oe=utf-8&client=ubuntu&channel=fs&gws_rd=ssl[^]
1 Sep 2015 by mayooran99
I have made a simple app that reads and writes to a HID device when connected to a Windows machine. The code is written in Java. But is it possible to run the same java code to get the hid device information connected to an android device? Will the hidapi work in android devices? I was unable to...
20 Mar 2016 by Member 12405206
Hi,I am looking for a component for DELPHI XE6 to compunicate with a HID USB Device.Can you help me please or do you know where I could get such a tool?(could be also commercially.)Reference: Thanks a lot!WalterWhat I have tried:I have tried to google for this WTB and got...
1 Sep 2016 by Member 11543226
I am writing program for one of my project in which i want to disable wired mouse and wired keyboard to restrict its input events(like mouse movements , keypress events) , instead of that i will use bluetooth mouse and bluetooth keyboard. so help me to disable those. ThanksWhat I have...
1 Sep 2016 by DimitriStPi
Hi ! I think you can give a look to this link :Hardware Helper Library for C#[^]It contains a way to enable disable your devices.
1 Feb 2017 by yucaroldeng
Hello,I am trying to map the volume letter to USB device Id. For example, there is a USB hub connecting several USB devices. I can get the list of the logical drives, say "C", "D", ......, but not the mounted USB volumes. And I also can get the details of the devices that are connected to...
1 Feb 2017 by Suvendu Shekhar Giri
You try filtering USB drives from all the devices such as-(example using c#)List usbDrives = new List()foreach (DriveInfo drive in DriveInfo.GetDrives()){ if (drive.DriveType == DriveType.Removable) { usbDrives.Add(drive.VolumeLabel); }}Not...
28 Sep 2017 by Ivan Ivanov 83
Hi All I'm currently working on a touchscreen keyboard project where the BBB displays images on a screen, receives the touch events form the touch panel and has to send them to the main PC as key events. So the BBB has to present it self as a HID (keyboard) device to the PC. What I have to do...
28 Sep 2017 by Member 12254962
I am trying to create a programmable Keyboard with an Arduino. It was actually pretty easy, just using the keyboard library, printing a character when a button is pressed: no problems. I also created an application on the PC to communicate over the serial port with the Arduino, I can send a new...
29 Oct 2017 by Member 13492707
Add before the print method final BroadcastReceiver mUsbReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (ACTION_USB_PERMISSION.equals(action)) { synchronized (this)...
16 Feb 2019 by nigel wright
I have designed a usb pc oscilloscope using a PIC32MX microcontroller. The C# pc software is from www.waitingforfriday.com This works great and has no problems. I have now ported this across to a PIC32MZ microcontroller. Again this works great. However, if I exit the pc program 5 seconds...
19 Feb 2021 by Violet Heath
I would like to know: 1. time, when my Android phone was turned on/off (not just the last time), what events/activities happened (if possible) 2. time, when my USB flash drive (Windows) and files on it were accessed (not just the last time),...
11 Jun 2021 by mohammed abdu
Hello, I have a multi touch frame that I want to communicate with and maybe write some code to do something when multi touch is active (this is for a work project). I have no idea what to do or how to do it (or if it is even possible). I...
11 Jun 2021 by Richard MacCutchan
Google has many links that will help you: Nexio HID Multi-Touch ATI0320-10 - Google Search[^]
9 Aug 2021 by OriginalGriff
The problem is that USB scanners are generally shipped set to emulate a keyboard - and once any character of the code has been received nothing in the system (including the operating system itself) has any idea if it was typed or scanned. It may...
18 Oct 2021 by Asad Baig 2021
I want to get the scanned result in my android app . the situation is that. I have a USB QR device connected with my android tablet. I have to scan some QR that has large data like 600 - 1000 characters. By default, Qr was in USB HID Keyboard...
3 Jul 2022 by IT PRASUMA
Hi Gary Doo, I'm also finding the solution for the same problem. But I have one question, as you said you are successfully printing to thermal printer from android phone over the network, can you please tell me the solution to print over the...
7 Jul 2015 by Andre van Dun
Reading the temperature using the Temper USB thermometer by pcsensor.com
26 Sep 2023 by Orphraie
This article will help you to understand how to communicate with the USB devices using WinAPI in C#
9 May 2012 by Jason Stern2
A demonstration of how to use Windows' RawInput API to manually process MultiTouch data.
29 Oct 2017 by GaryDoo
Hi,I need to print to a thermal printer via usb from an android tablet, my first question is, can this be done?I am working with sending data to a thermal printer from my application. I already have it working correctly over the network and my data prints correctly. There is now an...
28 Sep 2017 by Jochen Arndt
I have not done such so far. So this might not help. As far as I understand, /sys/class/udc/ is created / filled by the preceding script commands (does not exist before or is empty). So I would wait some time (sleep) before accessing that directory (not busy anymore). You can also do the last...
21 Dec 2016 by Member 12915728
~ How to access USB ports using C++/cpp ? ~I would like to be able to read and write to pins (D+ & D-) on an USB port using C++/cpp on Windows 10.Assemble code greatly appropriated.Thank UWhat I have tried:Was not able to find simple code.
5 Aug 2015 by dinesh_redhawk
Hello Everyone,I have to write a small tool to test a LED device which will be connected to PC via USB.I did my research and found that there are 2 widely used libraries for USB communication: LibUSBDotNet & WinUSBDotNetUnfortunately, i cant use these 2 libraries in my case,...
17 Mar 2022 by PBSG
I have product ID and vendor ID using these i need to access the comport and also display the port name and number in c++ can anyone help in this topic there are many examples in c# but i need them in c++ for the project What I have tried: i...
9 Aug 2021 by Arsalan Khan 2
Hello guys, i have a situation where i would like to use barcode scanner exclusively using c#, i have a USB barcode scanner i want it to scan barcode behind the scene and print barcode anywhere the cursor is with some additional information with...
16 Aug 2012 by __John_
I have a usb hid device under development.When I send a report with WriteFile() (Win32) only every other report is received. WriteFile returns report len + 1 in the lpNumberOfBytesWritten parameter, which is correct (+1 for the report id, which I set to zero).I am 99% sure its not a device...
24 Nov 2012 by rajy mamdouh
How to connect between C# and USB ?how to send data by clicking on a button from a C# form to USB ??
20 Nov 2014 by Santhoshpettacode
iam new to this programming interface where i like to know is can we able to connect usb printer to the android device using OTC cable and make in print direct form the android device.If it is possible please help me with sample coding the application is about receipt printing and end...
31 Aug 2015 by mayooran99
I am totally new to this area. I have a requirement of connecting USB devices to my machine through HID protocol using java. What are the available libraries and where do I start from?
28 Sep 2015 by Member 11840132
Hello. I have tried alot of codes to detect USB insert, every thing I found did not detect a portable device connection.I dont need to get information from the device, only to know if somthing has been connected.any of the following languages will do:C#, java, python.any idea's?...