luc-github / ESP3D

FW for ESP8266/ESP8285/ESP32 used with 3D printer
GNU General Public License v3.0
1.78k stars 465 forks source link

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

Closed luc-github closed 1 month ago

luc-github commented 1 year ago

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.

liqijian101 commented 1 year ago

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

khayamgondal commented 9 months ago

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

luc-github commented 9 months ago

no, core 3.0 is.not released

luc-github commented 9 months ago

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 commented 9 months ago

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

not-jan commented 5 months ago

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

luc-github commented 5 months ago

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 commented 1 month ago

Working slowly on implementation due to busy life, I moved from PIO to community PIO to get support of esp32 3.0.4~5 the library is integrated and the new client is almost implemented https://github.com/luc-github/ESP3D/tree/usb-otg so it is WIP

luc-github commented 1 month ago

done with https://github.com/luc-github/ESP3D/commit/b40937122a4b41740897f13530dc9625f5612805

luc-github commented 1 month ago

Note: Configurator need to be updated to add

/* Optional Output 
 * Instead of Serial, you can use USB Serial
 * USE_USB_SERIAL //for ESP32  S2/S3 Only
 */
#define USB_SERIAL_FEATURE

Edit: Done

github-actions[bot] commented 3 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.