ESP3D icon indicating copy to clipboard operation
ESP3D copied to clipboard

⏸️[FEATURE REQUEST]🦄USB serial support on ESP32-S2/ESP32-S3 for systems using CP210x, FTDI FT23x or CP34x

Open luc-github opened this issue 2 years ago • 8 comments

Idf 5.1 has recently implemented multiple drivers registration support for USB CDC-ACM Virtual Com , it is implemented in ESP3D-TFT project

I have tested the feature with ESP3D-TFT and several boards (end3/ ender5/ FYSTEC E4, ESP32 boards...) and so far so good, but the esp board still need external power supply because USB port do not power esp, but no need to find serial port connections on printer/cnc anymore, just use right cable to connect printer/cnc USB port to ESP32-S2/S3 and they can communicate, this long time request finally come true ^_^

Arduino core dev team is working on IDF 5.1 implementation - https://github.com/espressif/arduino-esp32/blob/esp-idf-v5.1/ Once merged / released I will port ESP3D to this version and implement the USB-OTG support on ESP32-S2 and ESP32-S3.

luc-github avatar Jan 20 '23 04:01 luc-github

It is wonderful!!I'm looking forward to this function

liqijian101 avatar Jan 20 '23 05:01 liqijian101

@luc-github any update on this? Did you merge in ?

khayamgondal avatar Feb 11 '24 13:02 khayamgondal

no, core 3.0 is.not released

luc-github avatar Feb 11 '24 14:02 luc-github

Working on porting USB-OTG from ESP3D-TFT to a ESP3D I have realized that IDF 5.1.2 release updated the USB drivers before:

## IDF Component Manager Manifest File
dependencies:
  usb_host_ch34x_vcp: "^1"
  usb_host_cp210x_vcp: "^1"
  usb_host_ftdi_vcp: "^1"
  usb_host_vcp: "^1"
  idf: ">=5.1.0"

to

## IDF Component Manager Manifest File
dependencies:
  usb_host_ch34x_vcp: "^2"
  usb_host_cp210x_vcp: "^2"
  usb_host_ftdi_vcp: "^2"
  usb_host_vcp: "^1"
  idf: ">=5.1.0"

which bring some minor API change but also a RX buffer with configurable size

image

So I will update the code to handle driver update in ESP3D-TFT first and review the porting code I have already did which consist in an additional arduino library using idf usb-otg component

luc-github avatar Feb 13 '24 07:02 luc-github

First step is now done, I have created an arduino library https://github.com/luc-github/esp32-usb-serial I need now to prepare esp3d code to support 5.1 IDF code from esp32-arduino 3.0.0-alpha 3, I won't test platformio until 3.0.0 is released for esp32-arduino

luc-github avatar Feb 16 '24 06:02 luc-github

Hi, esp32-arduino has been releases. Are there any updates on this? Can I help in implementing somewhere?

not-jan avatar Jun 17 '24 14:06 not-jan

this feature was not in release so I did a library https://github.com/luc-github/esp32-usb-serial

I have ported also the ssdp library because arduino 3.0 is a breaking change but platformio seems having issue to support the arduino esp32 3.0 so I have put on hold the porting of esp3d 3.0 for the moment

luc-github avatar Jun 17 '24 14:06 luc-github