Custom HID device recommendation

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mike808
 
Posts: 74
Joined: Sat May 25, 2013 10:22 pm

Custom HID device recommendation

Post by mike808 »

I'd like to learn more about firmware and wanted to know if Adafruit has a dev board that could help me do the following:

CLIENT_CODE <---- USB communication ----> SOME_HID_DEVICE

where:
CLIENT_CODE: i plan to write in either rust, c/c++, or python
SOME_HID_DEVICE: i would like a recommendation on what boards can operate like this. I would then try to write/extend/augment code (language agnostic) to be able to send/receive custom data over USB

does anyone have recommendation for SOME_HID_DEVICE?

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Custom HID device recommendation

Post by Franklin97355 »

What does the communication look like? Are they just keypresses or do you need strings?

User avatar
mike808
 
Posts: 74
Joined: Sat May 25, 2013 10:22 pm

Re: Custom HID device recommendation

Post by mike808 »

i was thinking communication would like like custom messages. perhaps something like.

client to server example message.
SetRGBColor - 64 bytes
byte[0] = msg type
bytes 1 = device index
byte's 2 and 3= length of data
bytes 4-63 = data

ResetDevice - 8 bytes
byte[0] = msg type
byte[1] = device index
bytes2-7 = data

etc...

server to client.
ResponseMessage = 128 bytes
byte[0] = error code
byte 1-127 = error message

once i get that done, maybe move on to different types of messages. i really don't have anything in mind at the moment, but that was my initial thoughts when i posted the earlier question

User avatar
tannewt
 
Posts: 3304
Joined: Thu Oct 06, 2016 8:48 pm

Re: Custom HID device recommendation

Post by tannewt »

You can do custom USB with the latest 7.0.0 alpha: https://learn.adafruit.com/customizing- ... -3096573-5

It should work on all CircuitPython supported boards.

User avatar
tomeku
 
Posts: 19
Joined: Wed Jul 21, 2021 6:51 am

Re: Custom HID device recommendation

Post by tomeku »

Hey @tannewt, how would that work for BLE HID? The shared linked/example seems to be very explicit about USB...

Thanks,
Cheers,
Tom

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”