Page 1 of 1

Garbled Characters in ESP-IDF with MacBook

Posted: Thu Jan 07, 2021 6:41 am
by EijiJP
Hello forum,

I get the garbled characters when I enter the following command in ESP-IDF:
idf.py -p [PORT] -b 115200 monitor
( PORT is the serial port number of my PC. )

I set the baud rate to 115200 in both of the menuconfig and my source code.
In addition, I set the Main_XTAL_frequency to 40 MHz, 26 MHz and Autodetect.
But, all attempts are bad, I get the above garbled characters.

---my environment---
[Macbook Pro 16inch.]---[USB-c and USB-A converter made by Apple]---[USB-A and USB-microB cable]---[e-puck2 robot]

( e-puck2 robot is an autonomous mobile robot have the ESP32 for communicating other robots.)

Why do I get the garbled characters?
Is the USB-C and USB-A converter bad?

Please share some idea to solve this problem.

Re: Garbled Characters in ESP-IDF with MacBook

Posted: Thu Jan 07, 2021 9:51 am
by dastoned
According to the documentation in https://www.gctronic.com/doc/index.php/ ... ports_used your device creates 2-3 virtual serial ports. You've probably connected to the wrong one. Specifically, try serial device number 2 instead of 3.

Re: Garbled Characters in ESP-IDF with MacBook

Posted: Fri Jan 08, 2021 2:12 am
by EijiJP
Hello dastoned,

Thank you for your reply.

MacBook Pro has four USB-C ports.
No matter which port I connect the cable to, the result is the same as shown in the attachments picture.

If I enter the command to [cu.usbmodemEPUCK3] as described below, I get the garbled characters.
$idf.py -p /dev/cu.usbmodemEPUCK3 -b 115200 monitor

If I enter the command to other than [cu.usbmodemEPUCK3] as described below, I get the no result and no characters.
$idf.py -p /dev/cu.usbmodemEPUCK1 -b 115200 monitor
$idf.py -p /dev/cu.usbmodem3011 -b 115200 monitor

What exactly do I need to check?

Thanks.

Re: Garbled Characters in ESP-IDF with MacBook

Posted: Fri Jan 08, 2021 9:38 am
by dastoned
The physical USB port doesn't matter. The documentation I linked says that your device will create 2 or 3 virtual serial devices (probably "/dev/cu.usbmodemEPUCK1", "/dev/cu.usbmodemEPUCK2" and "/dev/cu.usbmodemEPUCK3"). They serve different purposes, and you need to open the correct one to see output from the ESP32 module.

In addition to that, there has to be some firmware in the ESP32 to actually produce output. If the device ships with a blank chip, then it'll be silent. Try rebooting the device to see if the ESP bootloader messages show up.

Re: Garbled Characters in ESP-IDF with MacBook

Posted: Fri Jan 15, 2021 6:52 am
by EijiJP
Thank you for your reply.

My device create 2 virtual serial devices ("/dev/cu.usbmodemEPUCK1" and "/dev/cu.usbmodemEPUCK1" ) .
And, I select the correct serial port "/dev/cu.usbmodemEPUCK3", but I cannot get the output.

I reseted the device and update the firmware of ESP32, but I cannot get the output.