DIY Drones

Hi,

I am getting the following error when attempting to upload the code.
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I have assembled the board with shield and the LED sequence is as expected. The configuration is as follows:
1. Red ArduPilot purchased from SparkFun in July.
2. Tried both the Arduino IDE versions 16 & 17 on a Windows Vista Home Laptop.
3. Tried the FTDI from Ardu Store and SparkFun.
4. Tried TWO Ardu boards with and without the shields.
5. Tried ArduPilot 2.2 & 2.2.3
6. Board is being powered from an ESC

I have cross checked the seven things in an earlier post on a similar error and also troubleshooting tips on the Arduino forum.

I do not have the hardware necessary for updating the bootloader and it will take be 2 weeks to get the same - I stay in Bangalore.

Share

Reply to This

Replies to This Discussion

If you've carefully gone through ALL seven things on the debugging tips, your problem is probably the FTDI drivers. Can you try again on another PC?

Reply to This

I had the exact same error, and I noticed that I was able to upload code successfully only when I started working and wouldn't be able to upload subsequent times afterwards.


This worked for me:
5) The board is set up to auto-reset when you load a sketch with the FTDI cable, so you don't have to manually press the reset button to get the bootloader. If that's not working for you, check the RTS setting in your PC's port settings ("Set RTS on close" should be checked) as described here. [Note: if you're using Linux, there's no direct equivalent to this. Instead, you may have to unplug the USB and plug it back in every time you want to upload code]

Reply to This

Thanks very much for the support. I tried on another laptop, this time with XP and it worked. I will try again with the original Vista Home laptop and reloading the FTDI drivers and the RTS on close setting to try to get to the bottom of the problem. For now, I am starting with the ground testing.

Reply to This

Hi,
I am having the same problem, but the workaround to unplug the USB FTDI cable from the laptop does NOT work for me.
I am using a recent sparkfun board, with the shield. I am using the special USB FTDI cable from diydrones/sparkfun.

My host is Ubuntu 9.04 Linux.
At my first attempt, I was able to load the standard Ardupilot_EasyStar_V23 sketch, unmodified from download from the project site.
This appears to work - basic functionality corresponds to what is expected from the project documentation.
The problem is when I try and upload a new version of the software, having made some edits.

No software has either been installed or uninstalled from my PC.

I have tried a variety of things, from resetting the board before, during etc the upload. With & without the shield. In some
cases the returned code differ from 0x2b, but in all cases the upload fails.

Here is a verbose output:
----------------------------------------------------------------------------
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Binary sketch size: 15514 bytes (of a 30720 byte maximum)
/home/nigel/drone/arduino-0017/hardware/tools/avrdude -C/home/nigel/drone/arduino-0017/hardware/t
ools/avrdude.conf -v -v -v -v -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/nigel/
drone/ArduPilot23/Source Code/ArduPilot_EasyStar_V23/applet/ArduPilot_EasyStar_V23.cpp.hex:i


avrdude: Version 5.4-arduino, compiled on Oct 22 2007 at 13:15:12
Copyright (c) 2000-2005 Brian Dean, (edited)

System wide configuration file is "/home/nigel/drone/arduino-0017/hardware/tools/avrdude
.conf"
User configuration file is "/home/nigel/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyUSB0
Using Programmer : stk500v1
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: + [2b]
avrdude: stk500_getsync(): not in sync: resp=0x2b
avrdude: Send: Q [51] [20]
avrdude: Recv: + [2b]
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x2b

avrdude done. Thank you.
-------------------------------------------------------------------------------
Any ideas most welcome...
Thanks

Reply to This

I got this going by switching to windows & setting the RTS on Close bit on the COM5 port...
Will look into the linus workarounds later...

Reply to This

I'm using linux (ubuntu 9.04). I get the _getsync() and _disable() erorrs also. Have red boards, FTDI basic, with shield and 406 gps attached on shield.

for me, the programming goes fine if the gps is unplugged. replugging the usb cable from pc does generate a new usb port /dev/ttyUSB#, but it also fails. have to remove gps

wish didnt have to unplug gps. suppose I coulda/shoulda figure out how the shield is s'posed to make it possible to program without unplugging gps. did I read that somewhere? (advice?)

Thanks for this really kewl gizmo!!!!

Reply to This

digital 7 enables the 5v_gps line, and feeds/enables the 3.3v gps regulator. so if digital 7 is left low, gps will be off, and it should program even though gps attached to shield.

I was a little unclear about the instructions for d6 and d7. I connected ground & d6 to the 'RemoveBeforeFlight' bind plug. Is is meant to connect d7 also to ground, to enable programming? I could use a 3 position switch: ground to d6 (RBF bind plug), ground to d7 (disable gps for programming), or d6 & d7 floating. Would this work?

or is it meant that d7 is left low by the normal program (when RBF plug attached), and then to be enabled when ready to fly and want to start gps. ? I'll have to look at the program some more, some changes I was making may have goofed up this functionality. I was adding back the calibrate IR from previous versions, to use just an XY IR. I know, the new code is better, and I see why, but XY only will do for now.

Anyway, thanks again for the good toy.

Reply to This

4) PNP. If the base is at a lower voltage than the emitter, current flows from emitter to collector.
5) PNP. Small amount of current also flows from emitter to base.
6) PNP. Voltage at base controls amount of current flow through transistor (emitter to collector).


sorry, so I'm remumbering my electronics. we would need to either drive d7 high by setting as an output high, or set it as an input (floating), and that should turn off the Q1 (looks like a PNP on the schematic) transistor, and disable the gps, thereby silencing the gps on the serial port, and allowing programmign. Right?

and need to ground d7, set as output low, to enable the gps. Do I have it right now......?

Thanks!

Reply to This

RSS

© 2009   Created by Chris Anderson

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!