Cyber Elmer

Recognizing a NodeMCU in the Arduino IDE on Linux

More obscure tech support. These posts are for people to fix weird problems...and for me to remember how I fixed it last time. This time, the trouble was with NodeMCUs being recognized in a Debian Linux distribution, like Ubuntu.

By this time, you've found this posting, you have found all the website that tell you how to install the NodeMCU library into the Arduino IDE. You have also tried several different USB cables, updated Linux, tried to install drivers, but turns out they were for Windows, and tried to find drivers for Linux (only to find they are already installed).

Problem

The NodeMCU will not show up in the Arduino IDE as a device you can upload to. Specifically, the line that says "port" is shaded out and you can't select anything.

Solution

This is a two part solution. Maybe one part works, but I didn't both and then it worked so here are both.

First, the port belongs to a user group called "dialout." If your user is not a member of "dialout," you probably won't have permission to write to the port, which uploads to the NodeMCU. Open a terminal window and type this:

sudo usermod -a -G dialout $USER

Reboot the machine. Try it out and it probably still won't work. What you might see if that when you plug in the NodeMCU, the port shows for a second and then it grays out again. This is because there is a program called BRLTTY running that interferes with the NodeMCU trying to establish a port. To overcome this, you need to remove BRLTTY. Do not worry, you won't need it unless you are blind. BRLTTY is a background process that pushes the linux terminal to a braille display. To uninstall BRLTTY, type this in a terminal window:

sudo apt purge brltty

Try the Arduino IDE again and I'll bet you can choose a port for the NodeMCU. Now that is obscure.