Garbled Characters in ESP-IDF with MacBook

EijiJP
Posts: 7
Joined: Fri Dec 25, 2020 6:14 am

Garbled Characters in ESP-IDF with MacBook

Postby EijiJP » Thu Jan 07, 2021 6:41 am

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.
Attachments
screen_shot.png
screen_shot.png (1.04 MiB) Viewed 335 times

dastoned
Posts: 32
Joined: Fri May 29, 2020 2:52 pm

Re: Garbled Characters in ESP-IDF with MacBook

Postby dastoned » Thu Jan 07, 2021 9:51 am

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.

EijiJP
Posts: 7
Joined: Fri Dec 25, 2020 6:14 am

Re: Garbled Characters in ESP-IDF with MacBook

Postby EijiJP » Fri Jan 08, 2021 2:12 am

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.
Attachments
sh_2.png
sh_2.png (32.57 KiB) Viewed 287 times

dastoned
Posts: 32
Joined: Fri May 29, 2020 2:52 pm

Re: Garbled Characters in ESP-IDF with MacBook

Postby dastoned » Fri Jan 08, 2021 9:38 am

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.

EijiJP
Posts: 7
Joined: Fri Dec 25, 2020 6:14 am

Re: Garbled Characters in ESP-IDF with MacBook

Postby EijiJP » Fri Jan 15, 2021 6:52 am

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.

Who is online

Users browsing this forum: Google [Bot] and 53 guests