ESP32 on linux ubuntu 20.4

Hello

I'm trying to test my ESP32 on Linux Ubuntu 20.4.

My sketch is very simple:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

}

void loop() {

Serial.println("TEST LINUX");
delay(2000);
}

It turns out that when opening the serial monitor, I get strange characters, like these:

11:49:01.462 -> $;,$;,$;$d;$

The serial monitor is configured with a baud rate of 9600.

I don't know what could be happening.
Could anyone help me?

I thank!

Does "blink" work better ?

I was just wanting to test the Serial...

Are you seeing the tail-end of the device's boot-up reports, but at the wrong line speed?

The line speed isn't wrong:
Serial Monitor

It may well be wrong for the bootloader's report - I doubt it uses anything as retro as 9600.
I think the ESP8266s used something a little off the beaten track, like 74880 (I have COVID and my brain is a little foggy ATM) - have a look around and see what the ESP32 typically uses

Why are you using 9600?

I get intelligible ESP32 boot report at 115200.

Establish Serial Connection with ESP32 - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)

The ESP32 is NOT an AVR-based Arduino board, the bootloader spits out messages BEFORE your software even is given control of the uC.

Windows and Linux

In this example we will use PuTTY SSH Client that is available for both Windows and Linux. You can use other serial programs and set communication parameters like below.

Run terminal, set identified serial port, baud rate = 115200, data bits = 8, stop bits = 1, and parity = N. Below are example screen shots of setting the port and such transmission parameters (in short described as 115200-8-1-N) on Windows and Linux. Remember to select exactly the same serial port you have identified in steps above.

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6360
entry 0x400806b4

newline @ 115200 in arduino serial monitor ubuntu 20.4

I set the baund rate to 115200 and it started working after I reset the ESP32. But if I close the serial monitor and open it again, I keep getting weird characters, the readable message only appears after I restart ESP32 with the monitor open:

https://i.im.ge/2022/07/19/FOjLnf.png

Thank you!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.