USB Host OTG library for ESP32-P4

andromeda92
Posts: 34
Joined: Tue Nov 18, 2025 5:24 pm

USB Host OTG library for ESP32-P4

Postby andromeda92 » Thu Apr 09, 2026 4:36 pm

Hi,
Is there a USB host OTG library for the ESP32-P4?

For use with the Waveshare ESP32-P4 Basic Kit board under Arduino.
IDE 2.3.8, core 3.3.7
Thanks for your help.

lbernstone
Posts: 1131
Joined: Mon Jul 22, 2019 3:20 pm

Re: USB Host OTG library for ESP32-P4

Postby lbernstone » Thu Apr 09, 2026 9:43 pm

The Arduino library is a work in progress
The esp-idf library works fine under Arduino, but requires significant understanding of the protocol, and how to translate code from C to C++. USB-host examples

andromeda92
Posts: 34
Joined: Tue Nov 18, 2025 5:24 pm

Re: USB Host OTG library for ESP32-P4

Postby andromeda92 » Fri Apr 10, 2026 12:20 am

Thanks for your response.
I tried it on an Arduino using esp-idf, but not the examples from the link. It initializes the host correctly and is detected,
but the problem I'm encountering is that the keyboard isn't getting power.

I'm wondering if I need to enable a GPIO pin for USB power.
The board I'm using is a Waveshare ESP32-P4 Module Dev-Kit. It has four USB-A ports, and one seems to be dedicated to USB-HOST, connected directly to the two D+ and D- pins, but I have no idea about the power supply.

andromeda92
Posts: 34
Joined: Tue Nov 18, 2025 5:24 pm

Re: USB Host OTG library for ESP32-P4

Postby andromeda92 » Fri Apr 10, 2026 3:24 pm

My question is why the Waveshare ESP32-P4 module dev-kit board is not sending 5V to the USB-A port?

Who is online

Users browsing this forum: PetalBot and 4 guests