Fix avrdude: stk500_getsync() problem on Arduino Board via Ubuntu

Arduino FTDI Bricked FixEverything seemed to working fine till this morning, but upon connecting Arduino board to a Windows PC and flashing blink program, received AVRDUDE 500 Sync error. Thereafter, the Arduino Board never booted again. Here’s a copy of Arduino IDE log:

Binary sketch size: 1,056 bytes (of a 30,720 byte maximum)
ioctl("TIOCMGET"): Invalid argument
ioctl("TIOCMGET"): Invalid argument
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x60
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x60
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x60
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x60
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x60

Not just the Window PC, but Arduino board got bricked for Linux (Ubuntu) as well. And this is what “lsusb” command on terminal lists:

Bus 006 Device 013: ID 0403:0000 Future Technology Devices International, Ltd H4SMK 7 Port Hub

Well, this shows FTDI chip’s device ID (underlined above) is null, where actually it is 0403:6001. So, this turned out as a trump card and helped in diagnosing Arduino board bricked issue.

FTDI Chip Fix using Linux

Below you’ll find a simple procedure on how unbrick Arduino FTDI Chip using Linux:

  1. Connect Arduino Board to PC and run “lsusb” in terminal. It should you the device ID as 0403:0000.
  2. Now download ft232r_prog (v1.24) and extract it to a new folder (for instance “Downloads/ft232r_prog-1.24”).
  3. We’ll also need to install few dependencies here to build this FTDI programmer. You can do this by executing “sudo apt-get install make gcc libftdi-dev” in terminal.
  4. Now to via terminal, navigate to the folder where we extracted ft232r_prog, by executing “cd Downloads/ft232r_prog-1.24”.
  5. Next execute “make” in terminal to build FTDI Chip flasher.
  6. Finally, execute “sudo ./ft232r_prog –old-pid 0x0000 –new-pid 0x6001” in terminal to Flash the FTDI Chip and replace the correct PID.

That’s it! Now reconnect the Arduino boad and try executing “lsusb” again. You should get the correct device ID 0403:6001.

Hope it saves some hairs over your head.

Advertisements

One thought on “Fix avrdude: stk500_getsync() problem on Arduino Board via Ubuntu

Felt Something? Why don't you say it...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s