REPL serial showing gibberish on a custom ESP32-WROVER board

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
hossam
Posts: 3
Joined: Tue Feb 26, 2019 10:35 am

REPL serial showing gibberish on a custom ESP32-WROVER board

Post by hossam » Tue Feb 26, 2019 11:00 am

Hi,

I made a custom PCB board for the ESP32-WROVER, after flashing the board with micropython successfully as shown here (http://docs.micropython.org/en/latest/e ... sp32-intro), I tried accessing the REPL shell but it only shows gibberish and it is not responsive to any input.

My Baud rate is : 115200

Is there any special connection that should be made for me to correctly communicate with the REPL shell on micropython. Knowing that I flashed arduino and the serial on it works perfectly. Therefore, I think it's not a hardware problem, but something specific to micropython. Also I tried to do the same thing on ESP8266 and it shows the same behavior of an unresponsive REPL shell.

Did anyone have behavior similar to this, or have any thoughts on why this is happening ?
Last edited by hossam on Tue Feb 26, 2019 5:46 pm, edited 1 time in total.

User avatar
Roberthh
Posts: 1518
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by Roberthh » Tue Feb 26, 2019 11:47 am

Can you try other baud rates? If you have windows, also try 74880 baud.

hossam
Posts: 3
Joined: Tue Feb 26, 2019 10:35 am

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by hossam » Tue Feb 26, 2019 12:44 pm

Hi,

A baud rate of 74880 doesn't work and the REPL shell is still not working.

But after seeing your answer, I decided to test out every baud rate I could find, still not working. But as a desperate last attempt I decided to switch my terminal console. So I ditched putty, and tried couple other terminal programs - nothing, until I tried YAT (Yet Another Terminal) comm software and voila it worked and at a baud rate of 115200.

This seems really odd and weird, why would this specific serial comm program work and other high quality software doesn't, shouldn't they all be practically the same?

PS: putty still works on every other board I have, except this specific PCB xD.

User avatar
Roberthh
Posts: 1518
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by Roberthh » Tue Feb 26, 2019 1:30 pm

No clue. Is theer anything specific with your PCB, especially the interface of the WROVER to your Serial port on the PC. Do you use a USB/Serial bridge or the Serial input of the PC? And if the latter, do you use a proper level converter/inverter?

hossam
Posts: 3
Joined: Tue Feb 26, 2019 10:35 am

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by hossam » Tue Feb 26, 2019 2:35 pm

I don't think there is anything special about my PCB. I am using a USB/Serial bridge with CP2102 chip, TX -> RX and RX -> TX.

The only thing that I think can explain this is that my TX and RX routes are not the same length and different number of vias. Maybe this difference in length creates a racing condition while the ESP is reading the serial data from both signals.

It still amazes me that YAT can catch this error and successfully communicate to the ESP without failing even though my other serial comm software - even ampy - can't do it.

I guess next order of business is to find a way to put my python files on the ESP through the REPL shell and not ampy.

I'll keep investigating this issue further next couple of days and if I find anything useful I will be sure to update this thread.

User avatar
Roberthh
Posts: 1518
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by Roberthh » Tue Feb 26, 2019 2:46 pm

At 115200 baud different path lenghts should not matter. Maybe there is a interference with the modem status lines and some trouble on the board.
If you enable WiFi trhough the REPL, you can use WEBREPL for access and file transfer. Once it works, you cam upload a main.py and boot.py which sets WiFi according to your needs on every boot.
You may also use this ftp server https://github.com/robert-hh/FTP-Server ... -and-ESP32, allowing to use tools like FileZilla for file transfer.

User avatar
dhylands
Posts: 3204
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: REPL seroal showing gibberish on a custom ESP32-WROVER board

Post by dhylands » Tue Feb 26, 2019 3:45 pm

A common trip up is having hardware flow control enabled.

dand11
Posts: 1
Joined: Fri Mar 01, 2019 1:19 am

Re: REPL serial showing gibberish on a custom ESP32-WROVER board

Post by dand11 » Fri Mar 01, 2019 1:26 am

I am just a rookie compared to alot of folks here. cough cough D Hylands cough cough
I also had similar problems with my ESP32 board. I was able to fix it by adding 3 delay for each character in m terminal program at 115200. I am sure that my problem was with Wndows10 and it seems to work just fine from my laptop that is slower w half the memory but running Debian. :)

tcornall
Posts: 1
Joined: Tue Jun 25, 2019 9:49 am

Re: REPL serial showing gibberish on a custom ESP32-WROVER board

Post by tcornall » Tue Jun 25, 2019 9:55 am

+1 for hossam and YAT because it worked for me where Teraterm wouldn't. I tried adding a few ms between characters in Teraterm, but that's only for transmit, of course, and I was seeing garbage on receive. I reckon poor old Teraterm couldn't keep up because the esp32 was sending with very little delay between chars. Just a guess though. Had never seen any issues at 115200 before with teraterm...

Anyway, kudos to YAT and many thanks to hossam for mentioning it.

Post Reply