Sending data using RawHID

Status
Not open for further replies.

Razyre

Member
Hi there.

I've been doing a fair deal of reading into the RawHID library since it will allow me to create an HID UPS battery for my project.

I've so far managed to get the Arduino to be recognised as a power device by a host computer, the battery icon comes up in the taskbar on Windows, but I'm not passing any information to the system because I'm not totally sure what I'm supposed to send in the packets.

I have the USB HID descriptor tool, which is great because it has a built in power HID which so far as I can tell is fine to copy and paste the raw hex values into "usb_rawhid.c" under the "raw_hid_report_desc" section.

So now I guess the system knows what the device is, but I don't really know what specifically goes in each packet, how the packets need to be ordered and split up etc.

I also don't know if I need to make any changes to the other descriptors (i.e. config, interface, endpoint etc.)

Any pointers and specific areas of USB documentation I should read would be very much appreciated :)
 
You might want to look at the various Linux UPS drivers that connect to various UPS systems and can shut down the system when the battery says it has low voltage. The one I use is NUT (Network UPS Tools):

Note, most of NUT is licensed under the GNU General Public License (GPL) version 2, though some python scripts are licensed under the GPL v3, and some perl scripts are licensed under a dual license (GPL v1 and artistic licenses).
 
Status
Not open for further replies.
Back
Top