logo elektroda
logo elektroda
X
logo elektroda

[Solved] Arduino IDE does not see the /dev/ttyS0 port. It cannot see the ESP32 device, there is no way to upl

CC_PL 2421 15
ADVERTISEMENT
Treść zostaÅ‚a przetÅ‚umaczona polish » english Zobacz oryginalnÄ… wersjÄ™ tematu
  • #1 20512534
    CC_PL
    Level 13  
    The Arduino IDE cannot see my device and claims that the only port that is selectable does not exist...

    Quote:

    Global variables use 38540 bytes (11%) of dynamic memory, leaving 289140 bytes for local variables. Maximum is 327680 bytes.
    python3 /home/cc/snap/arduino/85/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py --chip esp32 --port /dev/ttyS0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 /tmp/arduino_build_570467/SimpleBleDevice.ino.bootloader.bin 0x8000 /tmp/arduino_build_570467/SimpleBleDevice.ino.partitions.bin 0xe000 /home/cc/snap/arduino/85/.arduino15/packages/esp32/hardware/esp32/2.0.7/tools/partitions/boot_app0.bin 0x10000 /tmp/arduino_build_570467/SimpleBleDevice.ino.bin
    esptool.py v4.5.1
    Serial port /dev/ttyS0

    A fatal error occurred: Could not open /dev/ttyS0, the port doesn't exist
    A fatal error occurred: Could not open /dev/ttyS0, the port doesn't exist


    In the Arduino IDE the project passes the check ("Verify") and compiles, but the Arduino IDE throws errors about a connection problem / does not find such a port as /dev/ttyS0. Only this port is seen in the list in the IDE, I have no other choice.

    I have Arduino IDE 1.8.19 (installed with SNAP from Ubuntu Software) and Ubuntu 22.

    How do I remedy this? Thanks for your help!

    Command:

    ls -l /dev/ttyS0

    yields:

    crw-rw-rw- 1 root dialout 4, 64 Mar 2 13:58 /dev/ttyS0 .
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • Helpful post
    #2 20512593
    khoam
    Level 42  
    CC_PL wrote:
    does not find such a port as /dev/ttyS0. Only this port is seen in the list in the IDE, I have no other choice.

    This is not a USB port. USB ports should identify themselves as /dev/ttyUSB0, /dev/ttyUSB1 etc. It looks like there is no communication working on the USB port that the board with the ESP32 is connected to.
  • #3 20512615
    CC_PL
    Level 13  
    Yes, you are definitely right! In ArduinoIDE, the /dev/ttyUSB0 port shows up and disappears. I don't know why. I managed to upload the soft to the ESP32 3 times and then it disappears, sometimes it appears, disappears,.... /dev/ttyUSB0. What could this be caused by? I have a metre USB cable with filter, a fairly good quality cable (for the phone charger).
  • #4 20512617
    khoam
    Level 42  
    Would suggest trying with a different USB cable to start with. Maybe even a shorter one.
  • ADVERTISEMENT
  • #5 20512636
    CC_PL
    Level 13  
    I'll make sure to get a shorter cable.

    What are the correct next steps after showing up in IDE (after flashing):

    Quote:


    Leaving....
    Hard resetting via RTS pin...



    Remove and re-insert USB? I tried resetting, but something doesn't work (in any case, the Arduino IDE doesn't detect that I'm resetting the board). And I would like to receive messages / information from the serial of the board.

  • ADVERTISEMENT
  • Helpful post
    #6 20512661
    khoam
    Level 42  
    Maybe the board doesn't have autoreset support? What kind of model is it?

    CC_PL wrote:
    I tried reset,
    The RESET button doesn't work either?
  • ADVERTISEMENT
  • #7 20512674
    CC_PL
    Level 13  
    The reset button has, so does the BOOT. But the Arduino IDE does not respond to reset, the board yes resets (after pressing the button). This is DEVKiT- ESP32-2432S035.

    The problem with the port has returned - the USB port disappears. I'm already trying with the third cable :) I'm giving shorter and shorter cables, but the port is not visible at the moment.

    lsusb dumps:

    Quote:
    Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 003: ID 046d:c315 Logitech, Inc. Classic Keyboard 200
    Bus 003 Device 002: ID 275d:0ba6 USB OPTICAL MOUSE
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 152a:8750 Thesycon Systemsoftware & Consulting GmbH D50s
    Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    .
  • Helpful post
    #8 20512681
    khoam
    Level 42  
    With this USB port, it could be a power problem. Maybe this port has too little current capacity. DevKit draws some of that current.

    CC_PL wrote:
    But the Arduino IDE doesn't respond to reset

    And is the speed in Serial.begin() in the program the same as the one set in the Arduino IDE monitor? If so, this could also be a USB power issue.
  • #9 20512690
    CC_PL
    Level 13  
    Yes I have 115200 in the IDE and in the code. The USB port has moved after being plugged into another USB socket. Hopefully for longer :) .
  • #10 20516508
    CC_PL
    Level 13  
    I have changed the cables, the third shortest one seems to be OK. I can burn the program to a disc, but I have no communication with the disc after the serial. I.e. after uploading the software I get the message:

    Quote:

    Leaving....
    Hard resetting via RTS pin...


    and that's where the fun ends. The board does not automatically reset, as a result I have no access to the data sent over the serial.
  • #11 20516520
    khoam
    Level 42  
    I'm guessing you are referring to the board from this thread: https://www.elektroda.pl/rtvforum/topic3966948.html
    Do you have a schematic of this board? It was in the documentation you provided links to, but unfortunately I don't think they work anymore.
    Otherwise, what soft are you referring to specifically?
  • #12 20516545
    CC_PL
    Level 13  
    I work with the same one all the time: ESP32-2432S035, this is an extended Dev Kit with touchscreen display based on ESP-WROOM-32.

    Soft are examples from the Arduino IDE and my own apps. They work - I have this confirmed via another channel. Specifically, I send information via BLE and receive on the phone. Everything works as expected. So flashing works

    On the other hand, I can't talk to the board over serial.
  • #13 20516563
    khoam
    Level 42  
    CC_PL wrote:
    I work with the same one all the time: ESP32-2432S035, this is an extended DevKit with touchscreen display based on ESP-WROOM-32.
    This board has little to do with the official DevKit from the manufacturer Espressif, hence my question about the schematic.
  • #14 20516611
    CC_PL
    Level 13  
    I will attach the schematic soon. However, I also have RESET and BOOT buttons on it. It's just that resetting it doesn't have the desired effect. The Arduino IDE doesn't seem to know about it (?).

    I will find the schematic and upload it.
  • #15 20516902
    khoam
    Level 42  
    CC_PL wrote:
    Arduino IDE doesn't seem to know about it (?).
    Do you have Serial Monitor open in Arduino IDE at this time?
  • #16 20518044
    CC_PL
    Level 13  
    Thank you for your help and guidance!

    Another cable replacement helped 🙂 Now everything works as it should.

Topic summary

The discussion revolves around issues with the Arduino IDE not recognizing the ESP32 device on the /dev/ttyS0 port, with users experiencing intermittent visibility of the /dev/ttyUSB0 port. The author has tried multiple USB cables, including shorter ones, but continues to face connection problems. Suggestions include checking for power issues, ensuring the correct baud rate in both the IDE and code, and verifying the board's autoreset capability. The author confirms the use of the ESP32-2432S035 model and mentions successful flashing of programs but struggles with serial communication post-upload. Ultimately, a cable replacement resolved the issue.
Summary generated by the language model.
ADVERTISEMENT