Skip to content
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

Support USB HID devices (including keyboard emulation) #306

Open
jflamy opened this issue Feb 9, 2022 · 8 comments
Open

Support USB HID devices (including keyboard emulation) #306

jflamy opened this issue Feb 9, 2022 · 8 comments
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features

Comments

@jflamy
Copy link

jflamy commented Feb 9, 2022

When emulating a USB keyboard, it would be nice to have a monitor of some sort to see the key presses being sent.

Conversely, a virtual keyboard to send keypresses (and perhaps mouse interaction) would be nice.

@jflamy jflamy added the enhancement New feature or request label Feb 9, 2022
@kartben
Copy link

kartben commented Feb 9, 2022

Or maybe similar to wokwi-gdbserver, perhaps there could be a wokwi-usbipserver which exposes the device's USB port over USB-IP? It would then be reasonably straightforward to mount it on the host machine. See e.g. https://docs.microsoft.com/en-us/windows/wsl/connect-usb

@jflamy
Copy link
Author

jflamy commented Feb 9, 2022

@kartben yes, some form of USB proxy, with the ability to peek what goes in and out.

@urish
Copy link
Contributor

urish commented Feb 9, 2022

Than @kartben! As far as I can tell, usbipd-win does the opposite: it will enable sharing of Windows USB devices with whatever is running in the simulator, in case we implemented USB Host support.

By we need here the other end of the USB-over-IP connection: use a shared USB device in windows. Do you know if such thing exists (and is maintained)?

@jflamy
Copy link
Author

jflamy commented Feb 9, 2022 via email

@urish urish changed the title Simulated USB with monitoring USB-over-IP gateway (connect simulated USB devices to your machine) Feb 10, 2022
@urish urish added the open for vote Vote at https://wokwi.com/features label Feb 10, 2022
@urish
Copy link
Contributor

urish commented Feb 10, 2022

Thanks for the link @jflamy. Yes, seems like using USB-over-IP might be a good solution. I changed the title accordingly and opened this request for voting

@ftab
Copy link

ftab commented Feb 11, 2022

There's also WebUSB API

https://wicg.github.io/webusb/

@jflamy jflamy changed the title USB-over-IP gateway (connect simulated USB devices to your machine) Support USB HID devices (including keyboard emulation) Feb 15, 2022
@jflamy
Copy link
Author

jflamy commented Feb 15, 2022

https://wicg.github.io/webhid/ is interesting. This would be sufficient to simulate cases where the ESP32 is acting as a keypad, or conversely receiving key presses/mouse

@urish
Copy link
Contributor

urish commented Feb 15, 2022

From my experience with WebHID, a few months ago, it's very limited. It doesn't let you use any HID device, and specifically excludes mice, keyboards, etc. You can learn more here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features
Projects
None yet
Development

No branches or pull requests

4 participants