0

Now I've been pulling my hair for two days over this one. I've tried everything. I've turned every stone, looked at every search result, and every Arduino Forums thread.

The problem is that Arduino IDE does not recognize the Arduino when connected to the PC, thus I can't upload compiled sketches. As usual, the serial port dropdown menu is greyed-out.

Things I have tried so far:

  1. Tried a different USB cable. Same results.
  2. Tried it on a Mac. It works flawlessly with different sketches.
  3. Looked at dmesg logs for Arduino when connecting. It connects to the PC successfully.
  4. Created a custom udev rule for it to be symlinked from /dev/bus/usb/001/00X to /dev/ttyACMX.
  5. Modified the custom udev rule for it to be symlinked from /dev/bus/usb/001/00X to /dev/ttyUSBX (since for some reason IDE was looking for ttyUSB0 first).
  6. Tried Arduino IDE from snap, apt, and from arduino.cc. All of them work the same.
  7. Tried different versions of AVR board packages from the Boards Manager, none of them work at all.
  8. Tried a NodeMCU (ESP8266), it works flawlessly.
  9. Tried Arduino Due, it works flawlessly.
  10. Added myself to dialout, uucp, and tty groups. Nothing changed.
  11. Changed permissions to a+rwx for all possible Arduino device file nodes.
  12. Changed group ownership to dialout, uucp, and tty for all possible Arduino device file nodes.
  13. Tried running Arduino IDEs as root. Nothing changed.
  14. Installed different firmware and libraries for linux (ex. libserialport0)
  15. Patched the apt version of Aruino IDE with patchelf.
  16. Updated.
  17. Rebooted.

"But hey man, why don't you just use the Mac to compile and upload the sketch, or any other MCU for that matter?" - Because I need to get output from my main PC and delegate it via serial to the Arduino. And Arduino Due is too clunky. And NodeMCU has disputable support for FastLED.

If any of you crazy mfs has an idea on how to solve this, I owe you a beer.

6
  • it may be a baud rate mismatch ... load a sketch that sends a known character at a known baud rate every 1/2 second, or so ... use a serial console, other than arduino IDE, to monitor the serial port
    – jsotola
    Feb 10 at 18:44
  • 3
    When the Arduino is connected, are there any ttyACMX or ttyUSBX device files in /dev? If yes, please connect to them with a serial program (like cu -l /dev/ttyUSB0 -s 115200 on the commandline) and try to sends something. Is the RX LED lighting up a bit (will only be very shortly, but visible)?
    – chrisl
    Feb 10 at 19:49
  • @jsotola The sketch can't send anything since I can't upload anything to the Arduino sadly :(
    – Tozzart
    Feb 12 at 13:53
  • @chrisl There can be ttyACX/ttyUSBX since I created an udev rule to symlink the device once it connects. It is normally "mounted" at /dev/bus/usb/001/00X for some reason. I'll try the cu trick. Thank you very much!
    – Tozzart
    Feb 12 at 13:54
  • @Tozzart you said that it works on a Mac ... use the Mac to load a test sketch
    – jsotola
    Feb 12 at 17:09

1 Answer 1

0

I have experienced that with several new installs of the Linux OS. Try this:

Linux does not see board Run:

Type 'groups', is 'dialout' there ?

sudo usermod -a -G tty yourUserName

sudo usermod -a -G dialout yourUserName

Log off and log on again for the changes to take effect. https://playground.arduino.cc/Linux/All/#Permission sudo ln -s /usr/bin/python3 /usr/bin/python

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.