Main Menu

search

You are here

Arduino Uploading Errors

[last updated: 2024-06-14]
Arduino home page
-----

  • avrdude: stk500_getsync() not in sync
    • This is a general error indicating a lack of connection between your PC USB and the Arduino board. Possible causes/solutions:
    • bad USB cable
    • wrong board is selected in Tools > board
    • if using esp a nano clone, you must select:
      Tools > Processor: ATmega328P (Old Bootloader)
    • troubleshooting:
      • unplug arduino usb cord, do: $ lsusb
        plug in USB, redo lsusb, compare to see if the arduino is seen by your PC.
        If the new line that shows up when the arduino is plugged in is something with "CH340" or similar:
        • First disable the BRLTTTY module:
        • If that doesn't work, get and install the driver for that (old) CH340/1 serial chip.
          • google, find, and download the driver zip file
          • there are reports of a bug in some drivers, and this version supposedly fixes them:
            https://github.com/juliagoda/CH341SER
          • first do $ lsmod | grep ch3 ... to see if there is a driver already installed
          • if there is already an older ch340 driver installed, you must remove it before installing the fixed version:
            ???
          • to install the driver:
            ???
      • do similar unplugged and plugged-in test with $ ls /dev
        when plugged in, a new entry should show up, ttyUSB0 perhaps
  • Port doesn't show up under Tools when Arduino is plugged in:
    • Most likely is bad USB cable
    • Next most likely is bad USB chip on Arduino board
    • To troubleshoot on Linux:
      Open File manager to /dev
      When you plug in the Arduino, a new port should show up in /dev, something like ttyUSB0
  • Permission Denied:
    • "can't open device: /dev/ttyUSB0":
      $ ls -l /dev/ttyUSB*
      it will return something like:
            crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyUSB0
    • Key information: "dialout" is name of group that owns the device
    • to see members of the dialout group:
      $ grep dialout /etc/group
    • To see list of groups to which you belong:
      $ groups [userName]
    • Assuming you are Not a member of the dialout group, add yourself:
      $ sudo usermod -a -G [groupname] [username]
      or for me in this case:
      $ sudo usermod -a -G dialout jay
    • Finally you must log out and log in again (or restart) for the change to take effect.

.

.

.

eof