Hello everyone,
I am working on a project where the final goal is:
Take physical USB mouse input
Process or modify it (optionally via serial input from any language)
Send the result to a PC as a USB HID mouse
Essentially a mouse passthrough / proxy device
My current concern (ESP32-S3)
I am considering ESP32-S3, but I am not fully confident because I am hearing that:
ESP32-S3 USB works in only one role at a time (Host or Device)
Even though OTG exists, Host + Device simultaneously may not be reliable
Some people say it works on paper but fails on real hardware
So my first question:
Is it actually possible to reliably use ESP32-S3 as USB Host (mouse input) AND USB Device (HID mouse to PC) at the same time?
Or is this fundamentally limited by the single USB controller?
Arduino Leonardo / ATmega32u4 experience
I already tested Arduino Leonardo (ATmega32u4):
It works as HID, but the USB polling rate is ~16 Hz
This causes noticeable input lag and low responsiveness
For mouse passthrough, this is not acceptable
So while Leonardo works functionally, it is too slow for my use case.
Other options & limitations
I looked at Teensy boards, but:
Very high cost
Not easily available in my region
I also saw mentions of other controllers, but:
Either not available locally
Or very expensive to import
What I want to know
Is there any way to increase mouse polling rate on Arduino-based boards like Leonardo?
Or is it a hard USB hardware limitation?
Is there any Arduino-compatible MCU that:
Can do USB Host + USB HID Device simultaneously
Supports high polling rate (125 Hz / 500 Hz / 1000 Hz)
Is realistically available and not extremely expensive?
Would a dual-MCU setup (one as host, one as device) be a practical solution, or does latency make it pointless?
Is there any architecture where:
Physical mouse input
Serial commands from software (any language)
HID output to PC
can all coexist without lag?
Final clarification
This is not for cheating, automation abuse, or fraud.
It is a hardware input processing project focused on USB behavior and latency.
Any guidance from people who have real hardware experience with ESP32-S3, USB OTG, or high-performance HID implementations would be greatly appreciated.
Thank you.