Problems updating Arduino image


#1

Hi,

I'm having a problem uploading the latest Arduino image. I posted the error I was getting last night. But it got flagged as Spam.

Thanks

Pat


#2

I've tried updating from the beagle and the cockpit web interface no joy same upload failed error. Manually ran these commands from another forum post

1) "sudo /etc/init.d/openrov stop"

2) "sudo /opt/openrov/linux/arduino/firmware-installfromsource.sh"

looks like everything is compiling okay.

Linking libarduino.a
Linking firmware.elf
Converting to firmware.hex
compilled in /tmp/tmp.m3q7DgW4uQ
uploading firmware from /tmp/tmp.m3q7DgW4uQ

it looks like it is failing to establish communication for the upload

uploading firmware from /tmp/tmp.m3q7DgW4uQ
Setting up uploader
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset

Does this sound like the UART problem you folks were experiencing a few months ago?


#3

I had exactly the same issue last night. Finally I had success after I had replaced the Atmega chip by another one which I took from an Arduino Uno board AND I changed the baud rate from 57600 to 115200 in firmware-upload.sh. Works reliably for me now. Stopping the OpenROV software before uploading the firmware is also mandatory.
-Stefan


#4

Thanks for your reply.

Can't replace the chip, I have the OpenROV rev 2.5B board. No removable chips. changed the baud rate and it did connect to the Arduino. But I got the following error several times and then the script aborted.

Initiating arduino reset

Using Port : /dev/ttyO1
Using Programmer : arduino-openrov
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

upload failed, trying again.

avrdude: Version 6.0rc1, compiled on Sep 4 2013 at 13:06:11
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/etc/avrdude.conf"
Initiating arduino reset


#5

youre running the 2.5 code? http://openrov.com/forum/topics/beta-of-the-controller-board-2-5-aware-cockpit-software-ready


#6

Hi Patrick:

I'm hoping that one of the software folks will chime in here, but it sounds like you're trying to load an image for the 2.4 vehicles onto the 2.5 controller board. The 2.5 software has only been released in beta form so far- there should be a topic about it somewhere in the forum archives.

We've been debugging the 2.5 software based upon what we saw at Tahoe last weekend, and should be releasing another beta soon- but that's out of my hands.

In case you (or any readers) are curious as to what the difference is- the microcontroller on the 2.3 and 2.4 cape is based on an Arduino Uno, while on the 2.5 controller board it's based on an Arduino Mega. On the 2.5 controller board we load code to the microcontroller via its SPI port, to get around all the issues we were having on the cape with downloading code via the UART.

-Walt


#7

Thanks for posting the link. I went over there and someone is having the exact same issues I'm having. Tried all the recommendations there no luck. Posted on that thread so hopefully...


#8

Hi,

Thanks for your reply. I’ve been working with Brian A on the 2.5 beta forum. but no luck so far. Looks like the arduino code compiles but won’t load onto the arduino board. Which sounds like what you are describing.

Is there an easy way for me to verify that I am using the 2.5 beta code in the compile process?

Thanks

Pat


#9

Hi Patrick:

If you're grabbing the code from GitHub (OpenROV-software), make sure you have the branch set to "ControlBoard25" and not "Master". The last time I talked to Brian, all the development work for 2.5 was being done in his GitHub account, with occasional betas being pushed out to the OpenROV "ControlBoard25" branch. Eventually this branch will replace "master", once we are sure that it does not cause any regressions for the 2.3 and 2.4 units.

I believe Brian said something recently where he's going to put some text into the debug messages so that one can tell which code branch is being compiled. This would definitely be useful.

-W


#10

I just posted this on the 2.5 beta blog

Okay Started over

Reloaded Beagle Bone Image using the 5-09-13 image from

https://github.com/OpenROV/openrov-image

Logged in and went through your update process, same error.

rov@OpenROV:~$ cd /opt/openrov
rov@OpenROV:/opt/openrov$ sudo /etc/init.d/openrov stop
[sudo] password for rov:
rov@OpenROV:/opt/openrov$ sudo git stash

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@OpenROV.(none)')
Cannot save the current index state
rov@OpenROV:/opt/openrov$ git config --global user.email "you@example.com"
rov@OpenROV:/opt/openrov$ git config --global user.name "Your Name"
rov@OpenROV:/opt/openrov$ git config --global user.email "**yea took this out **"
rov@OpenROV:/opt/openrov$ git config --global user.name "** again took this out**"
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$
rov@OpenROV:/opt/openrov$ whoami
rov
rov@OpenROV:/opt/openrov$ git config --global user.name "rov"
rov@OpenROV:/opt/openrov$ sudo git fetch
remote: Counting objects: 555, done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 486 (delta 314), reused 375 (delta 206)
Receiving objects: 100% (486/486), 133.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (314/314), completed with 49 local objects.
From git://github.com/OpenROV/openrov-software
045f0c5..ff8f269 master -> origin/master
* [new branch] controlboard25 -> origin/controlboard25
rov@OpenROV:/opt/openrov$ sudo git checkout -b controlboard25
M linux/arduino/firmware-upload.sh
Switched to a new branch 'controlboard25'
rov@OpenROV:/opt/openrov$ sudo /opt/node/bin/npm install

> serialport@1.1.3 install /opt/openrov/node_modules/serialport
> node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
make: Entering directory `/opt/openrov/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
SOLINK_MODULE(target) Release/obj.target/serialport.node
SOLINK_MODULE(target) Release/obj.target/serialport.node: Finished
COPY Release/serialport.node
make: Leaving directory `/opt/openrov/node_modules/serialport/build'
rov@OpenROV:/opt/openrov$ pico /opt/openrov/arduino/OpenROV/aconfig.h
rov@OpenROV:/opt/openrov$ pico /opt/openrov/arduino/OpenROV/aconfig.h
rov@OpenROV:/opt/openrov$ pico /opt/openrov/arduino/OpenROV/aconfig.h
rov@OpenROV:/opt/openrov$ sudo pico /opt/openrov/arduino/OpenROV/aconfig.h
rov@OpenROV:/opt/openrov$ sudo /opt/openrov/linux/arduino/firmware-installfromsource.sh
unpacking
staging: build dir is /tmp/tmp.Y18DxyC4OF
staged src in to build folder
unpacked into folder /tmp/tmp.Y18DxyC4OF
compilling in /tmp/tmp.Y18DxyC4OF
Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ... 1.0 (1.0.5)
Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino
Searching for Arduino standard libraries ... /usr/share/arduino/libraries
Searching for Arduino variants directory ... /usr/share/arduino/hardware/arduino/variants
Searching for avr-gcc ... /usr/share/arduino/hardware/tools/avr/bin/avr-gcc
Searching for avr-g++ ... /usr/share/arduino/hardware/tools/avr/bin/avr-g++
Searching for avr-ar ... /usr/share/arduino/hardware/tools/avr/bin/avr-ar
Searching for avr-objcopy ... /usr/share/arduino/hardware/tools/avr/bin/avr-objcopy
src/OpenROV.ino
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ... 1.0 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Servo
Scanning dependencies of EEPROM
Scanning dependencies of Wire
src/Command.cpp
src/MinIMU_Vector.cpp
src/MinIMU_Compass.cpp
src/Timer.cpp
src/Device.cpp
src/Thrusters2X1.cpp
src/MinIMU_LSM303.cpp
src/MinIMU_L3G.cpp
src/CalibrationLaser.cpp
src/Cape.cpp
src/MinIMU_matrix.cpp
src/Pin.cpp
src/Pilot.cpp
src/Motors.cpp
src/Lights.cpp
src/Settings.cpp
src/CameraMount.cpp
src/MinIMU9AHRS.cpp
src/MinIMU_I2C.cpp
src/MinIMU_DCM.cpp
src/MinIMU9.cpp
src/MinIMU_Output.cpp
src/FreeMem.cpp
src/OpenROV.cpp
Servo/Servo.cpp
Linking libServo.a
EEPROM/EEPROM.cpp
Linking libEEPROM.a
Wire/utility/twi.c
Wire/Wire.cpp
Linking libWire.a
arduino/WInterrupts.c
arduino/wiring_analog.c
arduino/wiring_digital.c
arduino/wiring_pulse.c
arduino/wiring_shift.c
arduino/avr-libc/malloc.c
arduino/avr-libc/realloc.c
arduino/wiring.c
arduino/IPAddress.cpp
arduino/main.cpp
arduino/HardwareSerial.cpp
arduino/Tone.cpp
arduino/Print.cpp
arduino/CDC.cpp
arduino/USBCore.cpp
arduino/WString.cpp
arduino/HID.cpp
arduino/Stream.cpp
arduino/WMath.cpp
arduino/new.cpp
Linking libarduino.a
Linking firmware.elf
Converting to firmware.hex
compilled in /tmp/tmp.Y18DxyC4OF
uploading firmware from /tmp/tmp.Y18DxyC4OF
Setting up uploader
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
Initiating arduino reset
upload failed, trying again.
firmware-upload.sh: Failed to upload after numerous tries. Aborting.
firmware-installfromsource.sh: Uploading Firmware Failed! Aborting
rov@OpenROV:/opt/openrov$ ^C
rov@OpenROV:/opt/openrov$

Except for the upload to the arduino at the end I didn't encounter a single error or unexpected result.

Bad arduino board? Comm issue between the beagle bone and arduino?

If I'm unique with this issue, I vote one bad arduino board. If others are having the same issue, I vote comm issues between the beagle bone and arduino.

thanks

pat


#11

Hi Walt!
Could You share the outcome of this story with us? I got an old (#139) kit and want to use the old white cape with the BB-White, so it could be helpful to solve this issue.

Cheers!
Mario