espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.33k stars 7.2k forks source link

USB Remote Wakeup is ignored (Example project "tusb_hid") (IDFGH-12837) #13804

Open kerryland opened 3 months ago

kerryland commented 3 months ago

Answers checklist.

IDF version.

5.2.1 and git master (commit 4523f2d67465373f0e732a3264273a8e84a1a6d1)

Espressif SoC revision.

ESP32-S3 (QFN56) (revision v0.1)

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

CMD

Development Kit.

ESP32-S3 WROOM FREENOVE, and Custom Board

Power Supply used.

USB

What is the expected behavior?

The example project "tusb_hid" (https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/device/tusb_hid), which illustrates the ability to wake a host device, should work.

What is the actual behavior?

The application moves the mouse around, and simulates pressing the letter 'a', but the configuration descriptor TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP on line 52 is ignored, i.e. Pressing the BOOT button, when the host computer is in sleep mode, does not wake the computer.

If you examine Device Manager you see that the ESP32 device does not support any power management or "wake' functionality:

image

Steps to reproduce.

Using Visual Studio Code...

Build and flash logs attached. I tried 5.2.1 and git master (commit 4523f2d67465373f0e732a3264273a8e84a1a6d1) build-and-flash-5-4-dev.txt build-and-flash-5-2-1.txt

This forum post describes the same issue, with a proposed fix, but I couldn't find the code mentioned in the posting.

Debug Logs.

No response

More Information.

No response

roma-jam commented 3 months ago

Hi @kerryland,

thanks a lot for such a detailed description!

I will take a look and return back asap.