Beetle ESP32 C3 USB connection issue
Am I the only one having such pain getting this board to consistently connect via USB? My PC doesn't recognize it (anymore). I got it working sort of yesterday.
The information is scant. I have updated drivers according to this with no luck:
https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32c3/get-started/establish-serial-connection.html
Using a Windows 10 dell laptop
Same issue using Arduino IDE and VSCode with Platformio
Had the same issue with the USB connection breaking, and the only way to restore it was by connecting the reset pin to GND. The sketch I imported made a clear difference in my situation, though. I became inquisitive, so I conducted some experiments, and the results have convinced me that the issue is software-related rather than a hardware one<a href="https://classicgolfclub.net/best-practice-balls-for-golf/">.</a> A division by zero error in the sketch, which results in some NAN-value being posted back to the serial port and choking it, is the primary culprit. Try this straightforward piece of code to reproduce the problem:
Robert.RebelHi all,
Had the same problem of losing the USB connection and only being able to recover it through connecting the reset pin to GND. However, in my case it was clearly depending on the sketch I loaded. So, got curious and after some experiments I'm convinced now that the issue is software related and not a hardware problem. The root cause is a division by zero error in the sketch (inducing some NAN-value) that is posted back to the serial port and makes it choke. Just try this simple code that reproduces the issue:
/*
Not crashing USB UART Beetle
*/
unsigned int points = 1;
void setup()
{
Serial.begin(9600)
}
void loop() {
points = 3/1;
Serial.println(points);
}
This does not cause any problem. Next try this code:
/*
Crashing USB UART Beetle
*/
unsigned int points = 1;
void setup()
{
Serial.begin(9600);
}
void loop() {
points = 3/0;
Serial.println(points);
}
This induces the problem.
So, my take is that when you encounter this issue, carefully check your code for a division by zero situation (or division by an undefined variable).
Rudolph.DwarsAre there any solutions yet? Am having the same port problem with a Macbook M1.
Worked fine for a couple of days but can't connect again.
thier.ens
Make sure your cable is also data - many USB-C cables these days only have the power connected for charging.https://ectipakistan.com/factors-of-3/
RobertWingateCheck to see if your cable includes data as well; many USB-C cables sold now only have a power connection for charging https://ectipakistan.com/factors-of-3/
RobertWingateSame problem here. Unable to get either of the units that I purchased working
RyanCaslerThe best solution for you would be to replace the USB drive. When I had this problem, I tried updating the drivers, but it did not help. Also, I tried using different computers, but none of the computers recognized my USB drive. I realized that the problem was not with the computer but the USB drive itself. Then, my friend advised me to contact the Data Recovery service https://www.salvagedata.com/ . I was very satisfied with their work. They recovered all the data from my USB drive and transferred it to my computer. Maybe they can help you.
dougobrantleySo I was recommended (on esp forum) to short pins GND and GPIO9 during unplugging/replugging. This has worked for me. Now it connects.
AlexRossouwI think I have the same problem. I bought two Beetle ESP32 C3 and they both behave the same way.I connect them to my windows 10 laptop and I get a new COM port called “USB Serial Device”. Then it disconnects and disappears. Then it does the same again over and over again.
I have an ESP32 DevKit M1 as well and that works fine, both with the onboard USB port and the USB pins.
I have tested two different cables and they both detect my phone when i plug it in.
KlasThanks for the information, I will try to figure it out for more. Keep sharing such informative post keep suggesting such post.
https://www.livetheorangelife.net/
OconnellMarkPleased to see your issue as I think I have the same problem, I am also confused and in need of light on this same issue.
OrmanKenneth
If the serial port keeps connecting and then disconnecting repeatedly, please connect pin 9 to GND and power on again.
PS - I also just remembered - one of my units did something similar, and it was the cable not being fully in - in far enough for power, but not for data…
PiiePythonMake sure your cable is data as well - you get alot of usb-c cables nowadays that only have the power connected for charging.
PiiePython