-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 S2/S3 Host USB HID, feature report read/write (IDFGH-7795) #9330
Comments
#9191 |
@AristarchosOfSamos Thank you for the feature request. We'll try to prioritize HID class in future development, unfortunately we don't have official support for HID yet. (I've seen some community solution, if that interests you) @FanhuaCloud The PR you linked is for USB HID device |
@tore-espressif thanks for replying to the post. There are many little USB devices out there with sensors that are accessed via HID with simple 'feature reports' and not need class drivers. |
Seen that in a latest commit, at least a HID device example is given I hope that now consideration can be turned to where a similar example will be given from the side of a HID host. |
I'm also very keen to see a USB HID host example. Is there any update on the progress for this? |
Actually, implementing a mere example for keyboard/mouse is easier, because we don't have to implement all the features and flexibility that HID class defines. I'd suggest that we provide a simple example for keyboard and mouse combo, and later we can provide a fully-featured HID driver. Does it make sense to you? @mrweaver do you have a specific device in mind? |
This would be amazing! A keyboard /mouse combo is perfect I think. I'm looking at a Chinese wireless remote (G20s Airmouse), which is essentially a combination keyboard and mouse as I understand it. |
Host USB HID to read joysticks & Co would be amazing. Will the S2/S3 also support USB Hubs when in Host mode? |
I was just wondering if there are any updates on the development of this HID host implementation? |
@mrweaver The first version of the HID Host Class driver is already in review internally, so we should have something on master for you to test soon. However, the first version will only support HID Boot protocol (basically standard Keyboards an Mice) but we have plans to expand it to full HID support (see below). @relaxibus @AristarchosOfSamos Joy sticks (and other non-boot protocol HID devices) will take longer to support due to the need to parse HID report descriptors. Currently, there is already some logic in the
As for USB Hubs in Host mode, that is also in our roadmap. But, unfortunately I can't offer a release date for that yet. |
@Dazza0, that's great news! Thanks for getting back to me so quickly - looking forward to testing it out :D |
@Dazza0 thats great news! Thanks for keeping up this USB Host HID topic. Let us know when there are new updated on this topic. :-) |
Hi to AristarchosOfSamos and tore-espressif |
Hi @shlomo-edu, Have you checked that example: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid ? |
As a side question: is HOST USB HID now working for gamepads, joysticks etc? |
As it was said before by @Dazza0:
Integration with |
Thanks, keep us updated regarding "Integration with esp_hid is still under a discussion." |
Our software developer (Viki) compiled roma-jam's code, but the problem that it works only for Keyboard and Mouse. |
Our software developer (Viki) compiled roma-jam's code, but the problem that it works only for Keyboard and Mouse.
We need the same HID driver that can work with raw data.
Please note, our device uses HID for communication with a PC app using our proprietary protocol.
How can we convert this example to work with raw data.
https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid
|
Hi @shlomo-edu, For disabling, it is possible to remove HID_SUBCLASS_BOOT_INTERFACE comparison statement in the file hid_host.c, line 282 FYI, there is a pull request to the idf-extra-components with the version of HID driver which provides a better interface of the HID host. Also, there is a fully support HID host requests, that you can easily use them for the proprietary protocol implementation over the HID. |
Thanks.
I run the hid_host_Example, and I removed the line 282 and I still don’t see incoming data.
What I do to see the incoming data is:
I connected my HID device to the ESP232-S3 and run the example.
The device sends data in a loop.
In: app_main
In the “do” loop after line 468: EventBits_t event = xEventGroupWaitBit
I added a log line: ESP_LOGI(TAG, "xEventGroupWaitBits %d",(int) event);
And what I see in the terminal: every second 1 line of:
I (525846) example: xEventGroupWaitBits 0
So I assume it didn’t see the any incoming data.
I looked in PR definition and I don’t think that I need all the functions there because I have only one device that I want to connect to the ESP232-S3
So please help me make this example work (for raw data protocol).
Thanks,
Shlomo.
From: Roma Jam ***@***.***>
Sent: Monday, June 19, 2023 11:02 AM
To: espressif/esp-idf ***@***.***>
Cc: Shlomo Aran ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/esp-idf] ESP32 S2/S3 Host USB HID, feature report read/write (IDFGH-7795) (Issue #9330)
Hi @shlomo-edu<https://github.com/shlomo-edu>,
In the current version there is a verification of the USB device descriptor field such as bInterfaceSubClass. Device is available only if there is a HID_SUBCLASS_BOOT_INTERFACE.
For disabling, it is possible to remove HID_SUBCLASS_BOOT_INTERFACE comparison statement in the file hid_host.c, line 282<https://github.com/espressif/esp-idf/blob/master/examples/peripherals/usb/host/hid/components/hid/hid_host.c#L282>
FYI, there is a pull request to the idf-extra-components with the version of HID driver which provides a better interface of the HID host. Also, there is a fully support HID host requests, that you can easily use them for the proprietary protocol implementation over the HID.
PR can be found here: [USB Host] HID driver component <espressif/idf-extra-components#175>
—
Reply to this email directly, view it on GitHub<#9330 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AT6RBWOPVDCD3CTIZHTMAXDXMABQLANCNFSM53IIZXKA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi @shlomo-edu, May I ask you to open a new ticket with the issue description and debug output log attached? If you want to change the example to be able to get raw data from the HID device, It is better to move that discussion to a new thread. Thanks. |
Yes, I will do it now.
From: Roma Jam ***@***.***>
Sent: Monday, June 19, 2023 12:26 PM
To: espressif/esp-idf ***@***.***>
Cc: Shlomo Aran ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/esp-idf] ESP32 S2/S3 Host USB HID, feature report read/write (IDFGH-7795) (Issue #9330)
Hi @shlomo-edu<https://github.com/shlomo-edu>,
May I ask you to open a new ticket with the issue description and debug output log attached?
If you want to change the example to be able to get raw data from the HID device, It is better to move that discussion to a new thread.
Thanks.
—
Reply to this email directly, view it on GitHub<#9330 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AT6RBWPWNH3NA5IJ5AU2XF3XMALJDANCNFSM53IIZXKA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi Roma.
I submitted a new issue named:
Example for ESP32-S3 as HID Host communicate with HID device
From: Roma Jam ***@***.***>
Sent: Monday, June 19, 2023 12:26 PM
To: espressif/esp-idf ***@***.***>
Cc: Shlomo Aran ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/esp-idf] ESP32 S2/S3 Host USB HID, feature report read/write (IDFGH-7795) (Issue #9330)
Hi @shlomo-edu<https://github.com/shlomo-edu>,
May I ask you to open a new ticket with the issue description and debug output log attached?
If you want to change the example to be able to get raw data from the HID device, It is better to move that discussion to a new thread.
Thanks.
—
Reply to this email directly, view it on GitHub<#9330 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AT6RBWPWNH3NA5IJ5AU2XF3XMALJDANCNFSM53IIZXKA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi,
Seen the nice work that is currently underway for USB host drivers as CDC or MSC in new S3/S2 ESP32 variants.
A very nice though addition, that could open up more potential is the presence of a host USB HID example.
Well, for my purpose it could suffice an example that simply opens and interacts via 'feature reports' read and written to a simple (classless) HID device.
That could be a first easy approach to the host USB HID world for ESP32 S2/S3, whereas after that we could proceed to class devices eg keyboard or rmouse if they are a bit more complicated.
So, it could be a good idea if such a simple HID feature report driver could be implemented as it would give a better completeness in the host USB range of device drivers for ESP32 S2/S3 whereas the HID is now missing.
Is there any hint if this has been done already ?
Thanks in advance,
The text was updated successfully, but these errors were encountered: