Can't get software upgrade to work!


#1

For the past 2 weeks I have not been able to get the BB upgrade to work. I have formatted the SD card and have loaded the latest image use the directions in the Step by Step instructions Install the software section. I have down loaded the latest image and it appears to install properly. I get video from the camera (no capture button in the cockpit) and can control the LEDs but nothing else.

I then follow the direction in the Upgrade the Software section. I get a number of npm ERRs so do step 6 ad still get npm ERRs and I can't get to the cockpit.

Previous to 2 weeks age I have everything working including the capture button, all motors and the tilt servo. The only problem was 5 min. timeout even after adding Brian's fix.

I'm dead out of the water. Any word on when the new image will be available.

Frank


#2

I just tried to upgrade the BB software again with the same results. Below are the npm ERRs that I could copy.

The npm ERRs after after doing step 5 of Doing a Manual Update.

npm ERR! Error: No registry url provided: GET express
npm ERR! at RegClient.regRequest [as request] (/opt/node/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:17:28)
npm ERR! at RegClient.get_ (/opt/node/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:112:8)
npm ERR! at RegClient.<anonymous> (/opt/node/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:39:15)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! a href="http://github.com/isaacs/npm/issues&gt" target="_blank">http://github.com/isaacs/npm/issues&gt;
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Linux 3.2.33-psp26
npm ERR! command "/opt/node/bin/node" "/opt/node/bin/npm" "install" "--no-registry"
npm ERR! cwd /opt/openrov
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/openrov/npm-debug.log
npm ERR! not ok code 0


The npm ERRs after after doing step 6 & 7 of Doing a Manual Update.
The first npm WARN and the first couple of npm ERRs not shown.

npm WARN package.json punycode@1.2.3 No README.md file found!

npm ERR! registry error parsing json
npm http 408 https://registry.npmjs.org/tinycolor
npm ERR! registry error parsing json
npm http 408 https://registry.npmjs.org/commander
npm ERR! registry error parsing json
npm http GET https://registry.npmjs.org/esprima/1.0.2
npm http GET https://registry.npmjs.org/escodegen/0.0.15
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/commander
npm http 408 https://registry.npmjs.org/escodegen/0.0.15
npm ERR! registry error parsing json
npm http 408 https://registry.npmjs.org/esprima/1.0.2
npm ERR! registry error parsing json


Error: ENOSPC, write
npm ERR! node-xmpp@0.5.1 postinstall: `browserify -d -o node-xmpp-browser.js -r request:browser-request -i node-stringprep -i faye-websocket -i ./srv -i dns ./lib/node-xmpp-browserify.js`
npm ERR! `sh "-c" "browserify -d -o node-xmpp-browser.js -r request:browser-request -i node-stringprep -i faye-websocket -i ./srv -i dns ./lib/node-xmpp-browserify.js"` failed with 1
npm ERR!
npm ERR! Failed at the node-xmpp@0.5.1 postinstall script.
npm ERR! This is most likely a problem with the node-xmpp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! browserify -d -o node-xmpp-browser.js -r request:browser-request -i node-stringprep -i faye-websocket -i ./srv -i dns ./lib/node-xmpp-browserify.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-xmpp
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.33-psp26
npm ERR! command "/opt/node/bin/node" "/opt/node/bin/npm" "install"
npm ERR! cwd /opt/openrov
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/openrov/npm-debug.log
npm ERR! not ok code 0

I can not connect to the cockpit again.

Frank


#3

had the same Problem.

I Solved it so:

1. Reboot the Beaglebone

2. Do an automatic setup again

3. Try to start openrov

If you get a error about rights of the Openrov.log change the rights of this file to 777.

so now it works by mine Beaglebone.

But the Camera Image is very big. So I see nothing else on my browser.


#4

Stupid Question to step 13.2 Updating the OpenROV Cape

Which file I Have to upload an where do I get the file?

please add this information to the Wiki!


#5

Try using Google Chrome


#6

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

on the very right you will see download ZIP.

There should be a file folder in this package called Arduino

this will contain the code for the Arduino.

Hope his helps


#7

ok ...

the i Zip the folder and upload it. right?

thx


#8

Hi Eik

If you have your BB connected to to your home router and connected to the internet, you should be able to upgrade the cape through the cockpit where it will get the Arduino code. It also gives you the option to select the files from a folder where you may have saved the code with any changes you may have made. There has been issues doing this as discussed in prior posts and much work done to improve it. One thing to help a successful upload is to make these changes if they have not already been done in your new BB code.

One item to try on the software that *might* increase the odds of success:

try changing the :
/usr/share/arduino/hardware/arduino/board.txt
change the atmega328.upload.speed=57600 to 115200

Also, you can get more detail by editing "
/usr/local/lib/python2.7/dist-packages/ino/commands/upload.py"
and changing the end of the file by adding the -vvv option as:

subprocess.call([
self.e['avrdude'],
'-C', self.e['avrdude.conf'],
'-p', board['build']['mcu'],
'-P', port,
'-c', protocol,
'-b', board['upload']['speed'],
'-D',
'-vvv',
'-U', 'flash:w:%s:i' % self.e['hex_path'],
])

e.


#9

dos not work :(

undefinedunpack: build dir is /tmp/tmp.TIDIOfX6cc
Archive: /temp/OpenROV-Ardino.zip
creating: OpenROV/
inflating: OpenROV/Command.cpp
inflating: OpenROV/Command.h
inflating: OpenROV/Device.cpp
inflating: OpenROV/Device.h
inflating: OpenROV/FreeMem.cpp
inflating: OpenROV/FreeMem.h
inflating: OpenROV/Motors.cpp
inflating: OpenROV/Motors.h
inflating: OpenROV/OpenROV.ino
inflating: OpenROV/Timer.cpp
inflating: OpenROV/Timer.h
unziped /temp/OpenROV-Ardino.zip in /tmp/tmp.TIDIOfX6cc/src
src/OpenROV/OpenROV.ino
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ... 1.0 (1.0)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Servo
src/OpenROV/FreeMem.cpp
src/OpenROV/Timer.cpp
src/OpenROV/Command.cpp
src/OpenROV/Device.cpp
src/OpenROV/Motors.cpp
src/OpenROV/OpenROV.cpp
Servo/Servo.cpp
Linking libServo.a
arduino/wiring_digital.c
arduino/wiring.c
arduino/wiring_shift.c
arduino/wiring_analog.c
arduino/wiring_pulse.c
arduino/WInterrupts.c
arduino/Print.cpp
arduino/USBCore.cpp
arduino/HardwareSerial.cpp
arduino/Tone.cpp
arduino/HID.cpp
arduino/Stream.cpp
arduino/new.cpp
arduino/main.cpp
arduino/WMath.cpp
arduino/WString.cpp
arduino/IPAddress.cpp
arduino/CDC.cpp
Linking libarduino.a
Linking firmware.elf
Converting to firmware.hex
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)
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/bin/avr-gcc
Searching for avr-g++ ... /usr/bin/avr-g++
Searching for avr-ar ... /usr/bin/avr-ar
Searching for avr-objcopy ... /usr/bin/avr-objcopy
Setting up uploader
Serial port settings
Initiating arduino reset

avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf"

Using Port : /dev/ttyO1
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync(): not in sync: resp=0x76

avrdude done. Thank you.

Searching for stty ... /bin/stty
Searching for avrdude ... /usr/share/arduino/hardware/tools/avrdude
Searching for avrdude.conf ... /usr/share/arduino/hardware/tools/avrdude.conf
Initiating arduino reset
upload failed, trying again.
avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" Using Port : /dev/ttyO1 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync(): not in sync: resp=0x76 avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" Using Port : /dev/ttyO1 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync(): not in sync: resp=0x76 avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" Using Port : /dev/ttyO1 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync(): not in sync: resp=0x76 avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" Using Port : /dev/ttyO1 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync(): not in sync: resp=0x76 avrdude done. Thank you.
Initiating arduino reset
upload failed, trying again.
avrdude: Version 5.11.1, compiled on Dec 7 2011 at 20:56:43 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf" Using Port : /dev/ttyO1 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync(): not in sync: resp=0x76 avrdude done. Thank you.
firmware-upload.sh: Failed to upload after numerous tries. Aborting.
firmware-install.sh: Uploading Firmware Failed! Aborting


#10

Hi David,

I am using Google Chrome but I still can't get the upgrade to load without npm ERRs. I have no trouble loading the image after reformatting the SD card. Then when I follow the upgrade instuctions I get npm ERRs and then can't get to the cockpit.

Is it possible to get someone to load the working software on my SD card since I don't seam to be able to do it. Maybe I have a bad SD card. I will buy a new one and try to load it. I am not a programmer so step on doing something need to be well explained.

Frank


#11

Methode 2 for updateing the Cape by Stefan:

I use to edit the Arduino files directly at the beaglebone (using putty and the vi editor), so I don't use the cockpit software to update the Arduino firmware. But from the console, I have a reliable script to upload the code from there. create a subdirectory called 'src' and another one called 'lib'. I put all the files (Openrov.ino etc.) from the directory /opt/openrov/arduino/Openrov to the subdir 'src'. Thie 'lib' directory is empty, but is required by the 'ino' command.

When I want to upload the firmware, I go to /opt/openrov/arduino/Openrov and execute the following simple script from there (as root with sudo):


Sudo reboot 0
cd /opt/openrov/arduino/Openrov
sudo rm -rf src
sudo rm -rf lib
sudo mkdir src
sudo mkdir lib
sudo cp * src

sudo ino clean
sudo ino build
sudo /opt/openrov/linux/setuart.sh
sudo /opt/openrov/linux/reset.sh &
sudo sleep 0.4
sudo ino upload -p /dev/ttyO1

Which builds and uploads the code reliably. The crucial thing about this was to find out the correct sleep value (0.4 seconds) after starting the reset and before starting the upload - the time window seems to be very narrow.


#12

I have just finished loading the software, the upgrade (It was not clear in the instructions to run the npm ERR steps twice) and adding Brian's fix. Everything now appears to work and I have just finished a 2 hour bathtub test which when well. Now on to the pond.

Since I will be working in cave sumps I will be working on fixing the light glare inside the housing tube and painting black all parts of the ROV that appear it the field of view of the camera to improve the distant object lighting.

I have gotten the camera tilt servo to work somewhat by using high flex 18ga. silicon insulated wire between the potted wire and the molex connector. It would be nice to be able to adjust the tilt angle to lessen the strain on the servo. It would even be nice for the new tilt mechanism. Is it possible to change something that could be limited to say + or - 40 degrees tilt?

Frank


#13

Ok seems it had work.

avrdude: stk500_getsync(): not in sync: resp=0x3b
avrdude done. Thank you.

BIG THANKS!

I think it is a good idea to add this into the Wiki!

I have no right there. :(


#14

Bring back this thread.

I Updateted the BB with the shelscrip, now I have a hud ...nice .

But Updating the cape dos not work!

Updating the Cape through the Cockpit interface I get:

ndefinedstaging: build dir is /tmp/tmp.J1I5XrYqpb

cp: omitting directory `/opt/openrov/arduino/OpenROV/lib'

cp: omitting directory `/opt/openrov/arduino/OpenROV/libcd'

cp: omitting directory `/opt/openrov/arduino/OpenROV/src'

firmware-stage.sh: Copying files from the github src folder to the temp folder failed. Aborting

firmware-installfromsource.sh: Staging Fimrware Failed! Aborting

An trying the "Stefan Methode"

results in a

avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Maybe it is a problem that the "/opt/openrov/linux/setuart.sh" was rmoved from the Code.

can someone help. Want to take the ROV to a nice lake the Weekend. But the Updated Cockpit do not connect to the Cape (with the old code).


#15

Hi Eik

I downloaded the latest image and burned it to the SD card using Windows.

I had the same issue where I could not upload the Arduio from the cockpit so I used this method and it worked 1st time and I know you mentioned that you used Stefan's but just not sure which one. Here is the one I use:

create a subdirectory called 'src' and another one
called 'lib'. I put all the files (Openrov.ino etc.) from the directory
/opt/openrov/arduino/Openrov to the subdir 'src'. Thie 'lib' directory is empty, but is
required by the 'ino' command.

When I want to upload the firmware, I go to /opt/openrov/arduino/Openrov and execute the
following simple script from there (as root with sudo):

Use the below commands if you do not have the two folders src & lib already created.

cd /

cd /opt/openrov/arduino/Openrov

sudo mkdir src
sudo mkdir lib
sudo cp * src

sudo ino clean
sudo ino build
sudo /opt/openrov/linux/setuart.sh

sudo /opt/openrov/linux/reset.sh &
sudo sleep 0.4
sudo ino upload -p /dev/ttyO1


#16

I also use this script, but is do not work anymore. The sudo /opt/openrov/linux/setuart.sh is removed from code.

But it seems the normal update script try to compile and upload the Cape code but ther i get the same error message:

firmware-stage.sh: Copying files from the github src folder to the temp folder failed. Aborting


#17

I will have to check my latest code to see if this file is missing but it has to be there as my arduino code uploaded with no issues.

The part where you say it is copying files from github src folder does not seem right because if I take that to mean it is going out onto the Web github to get the files in src that would mean you would need the ROV Connected to your Home Router so it could get there. This process should get the files from the local host (BB).I don't have my ROV up and running at the moment to check this for you but will when I get a chance.

The contents of setuart.sh are as follows:

#!/bin/sh
#
# for reference check out: http://www.jerome-bernard.com/blog/2012/06/04/beaglebone-serial-ports-and-xbees/
echo 0 > /sys/kernel/debug/omap_mux/uart1_txd #setting mode of UART1 TX to in
echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd #setting mode of UART1 TX to out

You could create this file and place in in the /opt/openrov/linux/setuart.sh


#18

I woked me through the shell scripts ...

the Compiling and Uploading off the cope code is now part of the normal update shell code.

-> So I created a new thread in Software with the Errors of the new version.

http://openrov.com/forum/topics/update-script-errors


#19

I don't think it's the same problem but I'm having a problem with the openrov software update. I'm able to successfully upload the image to the board and can access the cockpit.

But when I run the openrov software update, either update script or manual, the board either shuts down or the cockpit (<ip address>:8080) is no longer accessible (Chrome returns an error). I've tried the npm install (even though I don't see the npm error). That seems to result in the board shutting down.


#20

Facing avrdude error while uploading firmware.

Help needed

detail explained in the link below.

http://openrov.com/forum/topics/programmer-not-responding-error-while-uploading-arduino-firmware