Page 1 of 1

IDF terminal - unreadable characters received from ESP32

Posted: Mon May 08, 2023 12:02 pm
by sergiomarina
Hi,
it might not be an IDF problem, but I still ask to the community.
The issue is related to output on terminal. And precisely the characters sent by ESP32.
About one week ago, I started to receive this output from ESP32
x�x�x�x��x8xx�x��������x�������������������x�����8�8x�x��x�8�x���x��xx�
Other text than stream sent by ESP32 modules is clear/readable as usual.
If I use Putty.exe to monitor the COM then the output stream from ESP32 is readable as expected.

I browsed the the posts from community but I couldn't find similar problems.
Hope to receive some tips.
Thank you.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Mon May 08, 2023 2:10 pm
by lukilukeskywalker
Can you look if the monitor starts with the baudrate 460800?

You might be having the same problem as me

Re: IDF terminal - unreadable characters received from ESP32

Posted: Mon May 08, 2023 3:02 pm
by lukilukeskywalker
So, in case you were having the same problem as me (If not, then sorry, but the solution might help others)
In vscode, under the folder .vscode, there is a settings.json. You can change there the upload and monitorBaudRate.
In my case, I have no idea why the monitor Baudrate changed from 115200 to 460800, since I didnt change anything there.
Hope it helps!
Attached is an image, so you can see how to change it.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Mon May 08, 2023 10:07 pm
by corz.org
Using anything but 115200 is asking for trouble. That VSCode sure is mischievous!

Re: IDF terminal - unreadable characters received from ESP32

Posted: Tue May 09, 2023 8:23 am
by bidrohini
Plz check if there is a baud rate mismatch somewhere.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Tue May 09, 2023 12:03 pm
by limpens
Ran into the same yesterday, idf.py monitor uses 115200 but since some recent change (didn't look for a cause), starting the serial monitor from the IDE is using 460800.

Found this page and changed the settings.json file to include

Code: Select all

  "idf.monitorBaudRate": "115200"
Couldn't find a way to configure this from the VSCode extension or menuconfig.


Edit: It has been reported on github.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Tue May 09, 2023 12:48 pm
by corz.org
While you are here, that flash rate is half what I use with even the oldest UART chips. Goan double it.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Wed May 10, 2023 5:35 am
by sergiomarina
@lukilukeskywalker
your tip worked for me. Thank you!
I added the two lines you highlighted (baud rate related commands) in the 'settings.json' file.
Monitor works and the flash speed is somehow similar to how was before the change.

And the warning
'C:\WINDOWS\SysNative\WindowsPowerShell\v1.0\powershell.exe'
at monitor startup does not seem to affect functionality, so I neglect it.

Re: IDF terminal - unreadable characters received from ESP32

Posted: Wed May 10, 2023 12:11 pm
by Ravenholem
Experienced same exact issue. After a round of updates IDF monitor would spew garbage. Tracked it down to baud being set to 460800.
I manual launch monitor with 115200 and it would work fine.
Vscode being a blackbox to me with so many levers and buttons I had no clue where to fix it at so just run monitor manual each time.
Thanks for the tip it works