Page 1 of 1

Best approach to interface with another device via USB MTP?

Posted: Fri Jun 06, 2025 3:43 am
by spety91
I'd like to plug in my Garmin watch into my ESP32 via USB and have the ESP32 upload a file to the Garmin filesystem upon connection.

The Garmin supports MTP, i've found two options for USB libraries:

[*] https://github.com/libmtp/libmtp
[*] https://github.com/cherry-embedded/CherryUSB

LibMTP looks really easy to understand and has great examples, but is not in the Espress IF repo and depends on LibUSB. I could try and get it to build, but I'm not sure if the underlying stack is api compatible with libusb.

CherryUSB supports MTP but all the docs are in Chinese and very limited sample code for MTP, however it's in the component repo

I'm curious if anyone has thoughts / advice as to the best approach here. Thank you!