Unable to upload code to nodemcu [SOLVED]

I recently switched operating system from debain based to arch. I have added myself to the dialout group, also the board managers are installed. Since i am running through the linux kernel i am pretty sure the drivers are installed too. It gives me an exit status: 2 while uploading.

note: uploading bare minimum and running arduino ide 2.0.4

hardware used: esp12e nodemcu , microusb data transfer cable

Hi @lalu_boiii. In order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to post the full output from the upload when in verbose mode.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Uncheck the box next to Show verbose output during: compilation
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  8. Open a forum reply here by clicking the Reply button.
  9. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  10. Press Ctrl+V.
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the Reply button to post the output.
. Variables and constants in RAM (global, static), used 28000 / 80192 bytes (34%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1496     initialized variables
╠══ RODATA   920      constants       
╚══ BSS      25584    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 59131 / 65536 bytes (90%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     26363    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 231556 / 1048576 bytes (22%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     231556   code in flash   
esptool.py v3.0
Serial port /dev/ttyUSB0
Failed uploading: uploading error: exit status 2

Fixed!
the python-pyserial package was required by the esptool.py
That package was missing :sweat_smile:
it can be installed using sudo pacman -S python-pyserial
note: DO NOT USE PIP TO INSTALL THIS PACKAGE!

Hi @lalu_boiii , I do have a same problem with you. Do you mind to share how to solve the problem by installing the missing package?

Thank you!

@jack_liew, welcome

Are you using arch? If yes, see reply #5.
If not, why did you post in a topic that involves arch?

Oh, I've miss out this is using arch. I am using WIn11. Sorry for mixing up the topic.
Sorry this is my first time leaving comment here...

I suggest that you start your own topic :wink: If you have an upload problem I suggest that you start it in Avrdude, stk500, Bootloader issues - Arduino Forum.

Things we would like to know when you start the new topic
Which operating system?
Which IDE version?
Which (Arduino) board?
If anything is connected to the board except for the USB with the PC? If yes, what and how.
The full error message; you can enable verbose output during upload and disable verbose output during compilation in file → preferences in the IDE.

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