ESP-S3 Monitor not working

I’m mostly new to this. Currently I’m using the ESP32 S3 Touch LCD 4.3B display.
I got a code from online and added a UI to the code.
I’m able to build and upload the code.
But when I try to use monitor option, I’m getting error as

  • Executing task: C:\Users\ics.insoft1.platformio\penv\Scripts\platformio.exe device monitor --environment WAVESHARE-ESP-LCD --port COM4

UserSideException: Cannot configure port, something went wrong. Original message: PermissionError(13, ‘A device attached to the system is not functioning.’, None, 31)

  • The terminal process “C:\Users\ics.insoft1.platformio\penv\Scripts\platformio.exe ‘device’, ‘monitor’, ‘–environment’, ‘WAVESHARE-ESP-LCD’, ‘–port’, ‘COM4’” terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

Please show the content of your platformio.ini for this project!

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:WAVESHARE-ESP-LCD]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
; platform = espressif32
board = WAVESHARE-ESP-LCD
framework = arduino

upload_speed = 921600
;monitor_port = COM4
monitor_speed = 115200
build_flags =
        -DDISABLE_ALL_LIBRARY_WARNINGS
        -DARDUINO_USB_CDC_ON_BOOT=0
        -DCORE_DEBUG_LEVEL=1
        -I src
        -w

this is the content in my platformio.ini

There is no “waveshare-esp-lcd.json” in platform-espressif32/boards at main · pioarduino/platform-espressif32

Try

-DARDUINO_USB_CDC_ON_BOOT=1

Hello, Sorry for the late reply

  • Executing task: C:\Users\ics.insoft1.platformio\penv\Scripts\platformio.exe device monitor --environment WAVESHARE-ESP-LCD --port COM4

UserSideException: could not open port ‘COM4’: FileNotFoundError(2, ‘The system cannot find the file specified.’, None, 2)

  • The terminal process “C:\Users\ics.insoft1.platformio\penv\Scripts\platformio.exe ‘device’, ‘monitor’, ‘–environment’, ‘WAVESHARE-ESP-LCD’, ‘–port’, ‘COM4’” terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

This is the error I’m getting now.
I’m not even able to upload as it’s showing the COM4 error, I put the board to boot (I press and hold the boot button and then try to upload the code the code is uploading). Before it was not like this. I tried multiple cables.

Its taking more than an Hour to build the code. Why would it be taking that much time?

That’s very strange!
Do you have “Microsoft PC manager” installed?
If so, uninstall, reboot and compile again.

Please respond to my post before about the “waveshare-esp-lcd.json”

  • where does it come from?
  • what’s the content of that file?

About the COM-Port:
Which com port did you select in the bottom status bar? Is it set to COM4 or to Auto or something else?

Hey Hi.

I don’t have a Microsoft PC manager installed

So, Squareline-OBP/WaveShare/esp32-s3-4.3B at master · nishad2m8/Squareline-OBP · GitHub this is the code I’m trying to use. the .json mention is also from here

I have selected COM4

Then something else (Antivirus etc.) is blocking your PC.

That repository looks a bit strange to me.

Your board is a “WaveShare ESP32-S3 4.3inch Touch LCD”? (If not, please specify the exact board you’re using… link?)

Have you tried a very basic “Hello World” sketch with this board, yet?

Yes I’m using the Waveshare ESP32-S3 4.3inch Touch LCD

I have not tried any basic code

Ok, start with a very basic project. Create a project folder with the following file / folder structure:

.
├── src
│   └── main.cpp
└── platformio.ini

File content

./platformio.ini:

[env:esp32-s3-devkitc1-n16r8]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
board = esp32-s3-devkitc1-n16r8
framework = arduino
monitor_speed = 115200

./src/main.cpp:

#include <Arduino.h>

void setup() {
    Serial.begin(115200);
}

void loop() {
    Serial.println("Hello World");
    delay(1000);
}

Set the COM-Port in the bottom statusbar to “Auto”.
Then upload the sketch and open the serial monitor by clicking on the plug-icon in the bottom statusbar.

I will update here once I have tried the same.

In main.cpp
In void loop()
If I call can_read_byte() function, It should receive can data right?

Before testing anything else, you should be able to program the board with the simplest sketch possible and ensure that it works correctly.

I’m able to change the UI and change the values on the UI by hard coding the values to the variables in the UI.
I’m trying to use can communication now.

So the issue of this topic (ESP-S3 Monitor not working) is solved?

No still not able to use monitor.
Even for upload its showing COM4 error. So, I’m putting the board in boot and then uploading the code.

So there are still fundemental errors. → Before trying anything new like can bus, solve this error first!

Does everything work correctly in the ArduinoIDE as described by the manufacturer of this board? See https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3

I tried flashing some of the demo code’s it was working.
Then I switched to this code and to platform IO. Initially COM4 had no issues I was able to upload the code.
But now both monitor and upload are not working

Try uploading via Arduino IDE and make the thing working again. Then post the ArduinoIDE settings here

Will the same work with Arduino IDE
Are there any drivers I need to install for the COM4

You give confusing information.

Please follow the official instructions from Waveshare for the ArduinIDE (see the link from above)

If everything works there, show the configuration here (screenshot) so that we can transfer it to platformio.ini and make your PlatformIO projects work.

Make sure you ar using the UART Port