IDF terminal - unreadable characters received from ESP32

sergiomarina
Posts: 46
Joined: Wed Feb 05, 2020 6:29 pm

IDF terminal - unreadable characters received from ESP32

Postby sergiomarina » Mon May 08, 2023 12:02 pm

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.

lukilukeskywalker
Posts: 21
Joined: Wed Feb 22, 2023 4:25 pm

Re: IDF terminal - unreadable characters received from ESP32

Postby lukilukeskywalker » Mon May 08, 2023 2:10 pm

Can you look if the monitor starts with the baudrate 460800?

You might be having the same problem as me

lukilukeskywalker
Posts: 21
Joined: Wed Feb 22, 2023 4:25 pm

Re: IDF terminal - unreadable characters received from ESP32

Postby lukilukeskywalker » Mon May 08, 2023 3:02 pm

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.
Attachments
1.PNG
1.PNG (22.45 KiB) Viewed 2932 times

User avatar
corz.org
Posts: 80
Joined: Fri Feb 03, 2023 10:44 pm
Location: Aberdeen
Contact:

Re: IDF terminal - unreadable characters received from ESP32

Postby corz.org » Mon May 08, 2023 10:07 pm

Using anything but 115200 is asking for trouble. That VSCode sure is mischievous!

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: IDF terminal - unreadable characters received from ESP32

Postby bidrohini » Tue May 09, 2023 8:23 am

Plz check if there is a baud rate mismatch somewhere.

limpens
Posts: 11
Joined: Tue Jan 25, 2022 9:14 am

Re: IDF terminal - unreadable characters received from ESP32

Postby limpens » Tue May 09, 2023 12:03 pm

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.

User avatar
corz.org
Posts: 80
Joined: Fri Feb 03, 2023 10:44 pm
Location: Aberdeen
Contact:

Re: IDF terminal - unreadable characters received from ESP32

Postby corz.org » Tue May 09, 2023 12:48 pm

While you are here, that flash rate is half what I use with even the oldest UART chips. Goan double it.

sergiomarina
Posts: 46
Joined: Wed Feb 05, 2020 6:29 pm

Re: IDF terminal - unreadable characters received from ESP32

Postby sergiomarina » Wed May 10, 2023 5:35 am

@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.

Ravenholem
Posts: 16
Joined: Wed Nov 10, 2021 7:13 pm

Re: IDF terminal - unreadable characters received from ESP32

Postby Ravenholem » Wed May 10, 2023 12:11 pm

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

Who is online

Users browsing this forum: No registered users and 165 guests