Attempted to use the serial port to read data from the SparkFun Thing Plus - ESP32 WROOM’s (v2.0) on Ubuntu Linux 20.04 but it only outputs gibberish until the board is reset using the reset button built into the board and then it outputs correct data for one serial session. Once that serial session is disconnected and you start a new serial session the output is gibberish again until you reset the board using the reset button. This can be easily recreated by running the blink code with serial prints that print when the LED turns on and off, then opening the arudino serial monitor and seeing the gibberish data, then, while still in the serial monitor, reset the board and watch it output the correct data. If you close the serial monitor and open it again it will output gibberish again. I tested this with a simple python script as well, even when closing the serial port correctly using serial.close() it still wouldn’t output correct data when opening the serial port again. Tried this on at least 3 of the v2.0 boards, all straight out of the box, with the same result across all of them, also tested it with 2 different USB cables with the same results. Any help would be appreciated, thank you!
You might try a different serial terminal emulator program, I’ve seen the little burst of garbage that ESP’s and other microcontrollers sometimes output trick Linux into thinking you’ve sent a command to change what kind of terminal you’re using and then Linux tries to “help” by altering the serial stream to what it thinks is the new format. When that happens you end up with output that looks similar (but not always the same as) to the image below.
https://www.cyberciti.biz/media/new/tip … rminal.pngHi Chris, thanks for the response. I tried the arduino IDE, Putty, and also tested it with python, all three had the same behavior.
That’s really weird, I’ve not seen this before.
If you try a PC running Windows does the same thing still happen? I’m wondering if something in Linux isn’t somehow causing this.
With a fresh install of Arduino, and downloading the driver mentioned in the hook-up guide it works on Windows. Is there a specific driver to be installed for Ubuntu 20.04, I need it to work on linux.
Don’t think you need any special driver, I think it’s just a quirk in Linux/Ubuntu.
Unfortunately I don’t have a solution for you but I imagine someone that has done a lot of serial work in Linux would probably be able to give you an explanation on what causes this and how to work around it.
For anyone with the same issue looking for a fix, I have tried using the CP210x VCP driver on linux using the driver listed on the website for 3.x.x/4.x.x/5.x.x kernels and that did not fix the issue
Is this “gibberish” not the debug log data that gests spit out on startup (it may be gibberish because your baud settings are different that what the logs are being outputted at)
Try tying GPIO pin 15 to ground [on startup] (I do it via a 10K resistor) and see if the startup log messages go away.
I have an identical problem on macOS, but interestingly it works fine on Linux.
It does look like a baud rate or serial settings issue, but I can guarantee it’s not a user error or firmware error - it’s either USB driver or hardware, and as the OP saw it on Linux and I see it on macOS, my suspicion is hardware. I have flashed many types of board with many types of USB to serial, and this is the first time I’ve ever seen this particular issue. Like the OP my boards were straight out of the box
Specifically, the symptoms are:
-
I am able to flash the board properly (using platformio) - this process pulls down the reset line first, so the boards come up in a good state.
-
When the board resets after flashing it comes up in this “gibberish” state; the content read (through “screen /dev/cu.SLAB_USBtoUART 115200”) is incorrect.
-
If I press the reset button while the board is still connected and screen is still running, it resets and starts outputting the correct text.
-
If I then close screen, leave the device connected, and reopen screen with the same settings, I see gibberish again.
I have two Macs, a Linux box, two Sparkfun ESP32 Wroom boards and bunch of other CP2102 or CP2108-based boards, include NodeMCU, TTGo Lora, Heltec Cubecell. The ONLY combination that causes me problems is the Mac (either one) and the Sparkfun ESP32 Wroom (either one). I’ve reinstalled the macOS CP2102 driver, no change. The problem is 100% repeatable. The firmware is nothing more than ```
Serial.start(115200); while(1) { Serial.println(“Hello”); delay(1000) }
It feels very much like something to do with the CP2102 reset circuitry to me.
I'm sure you've got a mac there at Sparkfun, this should be repeatable for you with that combination.
Going through the forums I see a lot of reports of this:
That four different users, three on Linux and me on macOS.
Sparkfun team, could someone please take a look?
This is a Mac/Linux issue, sparkfun can’t do anything about it.
You must have missed the bit where I said I’d tested several other CP2102 based boards without problems on the same computers, and where I pointed out that as it’s reproducible across 2 different operating systems, it’s highly unlikely to be a driver issue.
I’m not asking Sparkfun to fix my computer. I’m asking them to double-check the reset circuit on this board and to test locally with a Mac, because as Mac hardware is fixed I would expect this to be reproducible.