Skip to content

apply the same USB descriptor's iSerialNumber logic for ESP32-S2 as t… #7563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cores/esp32/USB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define USB_PRODUCT ARDUINO_BOARD
#endif
#ifndef USB_SERIAL
#if CONFIG_IDF_TARGET_ESP32S3
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The USB bootloader inside ESP32-S2 uses Serial "0". This is here for that exact reason. Please revert this change and set it manually if you need something specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 537dc7c

#define USB_SERIAL "__MAC__"
#else
#define USB_SERIAL "0"
Expand Down Expand Up @@ -160,7 +160,7 @@ ESPUSB::~ESPUSB(){

bool ESPUSB::begin(){
if(!_started){
#if CONFIG_IDF_TARGET_ESP32S3
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
if(serial_number == "__MAC__"){
StreamString s;
uint8_t m[6];
Expand Down