title: avrdude: stk500v2_ReceiveMessage(): timeout, RX leds not blinking
body: <p>I can't upload any program to my arduino using the arduino IDE and a USB cable.</p>
  
  <p>When I try to, it says <code>avrdude: stk500v2_ReceiveMessage(): timeout</code></p>
  
  <p>I've search all the web and look at questions like <a href="https://stackoverflow.com/questions/19645441/avrdude-stk500v2-receivemessage-timeout">avrdude: stk500v2_ReceiveMessage(): timeout</a> but my arduino led aren't blinking when I try to upload a program.</p>
  
  <p>I've crafted something using my RasberryPi and arvdude to flash the bootloader again. <a href="https://imgur.com/a/Xe7bC" rel="nofollow noreferrer">Here are some pictures of my setup.</a></p>
  
  <p>I'm using this command:</p>
  
  <pre><code>sudo avrdude -p atmega2560 -C ~/avrdude_gpio.conf -c pi_1 -v -U flash:w:stk500boot_v2_mega2560.hex:i
  </code></pre>
  
  <p>Here is the output of my attempt:</p>
  
  <pre><code>avrdude: Version 6.1, compiled on Jul  7 2015 at 10:29:47
           Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
           Copyright (c) 2007-2014 Joerg Wunsch
  
           System wide configuration file is "/home/pi/avrdude_gpio.conf"
           User configuration file is "/root/.avrduderc"
           User configuration file does not exist or is not a regular file, skipping
  
           Using Port                    : unknown
           Using Programmer              : pi_1
           AVR Part                      : ATmega2560
           Chip Erase delay              : 9000 us
           PAGEL                         : PD7
           BS2                           : PA0
           RESET disposition             : dedicated
           RETRY pulse                   : SCK
           serial program mode           : yes
           parallel program mode         : yes
           Timeout                       : 200
           StabDelay                     : 100
           CmdexeDelay                   : 25
           SyncLoops                     : 32
           ByteDelay                     : 0
           PollIndex                     : 3
           PollValue                     : 0x53
           Memory Detail                 :
  
                                    Block Poll               Page                       Polled
             Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
             ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
             eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
             flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
             lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
             signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
  
           Programmer Type : linuxgpio
           Description     : Use the Linux sysfs interface to bitbang GPIO lines
           Pin assignment  : /sys/class/gpio/gpio{n}
             RESET   =  19
             SCK     =  26
             MOSI    =  20
             MISO    =  16
  
  avrdude: AVR device initialized and ready to accept instructions
  
  Reading | ################################################## | 100% 0.00s
  
  avrdude: Device signature = 0x1e9801
  avrdude: safemode: lfuse reads as FF
  avrdude: safemode: hfuse reads as D8
  avrdude: safemode: efuse reads as FD
  avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
           To disable this feature, specify the -D option.
  avrdude: erasing chip
  avrdude: reading input file "stk500boot_v2_mega2560.hex"
  avrdude: writing flash (261406 bytes):
  
  Writing | ################################################## | 100% 6.24s
  
  avrdude: 261406 bytes of flash written
  avrdude: verifying flash memory against stk500boot_v2_mega2560.hex:
  avrdude: load data flash data from input file stk500boot_v2_mega2560.hex:
  avrdude: input file stk500boot_v2_mega2560.hex contains 261406 bytes
  avrdude: reading on-chip flash data:
  
  Reading | ################################################## | 100% 11.71s
  
  avrdude: verifying ...
  avrdude: 261406 bytes of flash verified
  
  avrdude: safemode: lfuse reads as FF
  avrdude: safemode: hfuse reads as D8
  avrdude: safemode: efuse reads as FD
  avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)
  
  avrdude done.  Thank you.
  </code></pre>
  
  <p>It all seems good, but when I reconnect it to my computer (on Linux), I can't upload any program.</p>
  
  <p>The board is correctly detected, as /dev/ttyACM0. When I <code>Get board info</code> from the Tools menu, here is the output</p>
  
  <pre><code>BN: Arduino/Genuino Mega or Mega 2560
  VID: 2341
  PID: 0042
  SN: 754393236353518131F2
  </code></pre>
  
  <p>What I am doing wrong ?</p>