What is the latest general use Ardino firmware baseline to upload from Cape webpage?


#1

Good evening,

I am trying to update the Ardino from the Cape website https://github.com/OpenROV/openrov-software/releases

If I select either no Ardino file and select the cape webpage “upload” or I browse the file openrov-software-0.9.tar.gz from the github site above I get the same result.

It looks like

http://openrov.com/profiles/blogs/uploading-ardino-firmware-from-the-ui

Opening the detail pane on the Cape webpage shows many .h and .cpp files scrolling by then several attempts to reboot the Ardino that fail then it eventually stops trying.

Questions

  1. Is the tar file “openrov-software-0.9.tar.gz” the correct copy?
  2. I have read people repeatedly power down and up the beagleboard and ardino and retry. Is this 10 times or 100 times?

3. I am guessing the motors will not work even though the ESC light toogles on then off without reloading the Ardino firmware – correct?

4. Are there other tricks I have missed beside going manual on the Ardino – it sounds painful.

Thanks again,

Bob


#2

The recommended way to get the latest software is to execute the update.sh script in /opt/openrov. That grabs the latest software from the github repos for both node and arduino. After doing that, the current software requires you to then "upload" the arduino software to the chip, which you can do by simply clicking on the upload firmware button in the cockpit *without* selecting a file. (This is a short cut that bypasses the taz and zipping of the ardiuino code only to load it back in to the system per with wiki).


#3

Brian Thanks again. I still get the reoccurring

---- starts with ------

staging: build dir is /tmp/tmp.uwI5F8NLHt
staged src in to build folder
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

-------- ends with ----------

upload failed, trying again.
firmware-upload.sh: Failed to upload after numerous tries. Aborting.
firmware-installfromsource.sh: Uploading Firmware Failed! Aborting

and have tried this many times. I guess i will have to do it manually

your response in Jan 2013

Reply by Brian A on January 29, 2013 at 5:04pm

Worked for me as well. I ended up:

1. Create a script:

#!/bin/sh


/opt/openrov/linux/setuart.sh &

/opt/openrov/linux/reset.sh &

ino upload -p /dev/ttyO1

2. chmod it as executable

3. go to the \tmp folder and found one of the orphaned uploads from the openrov cockpit upload

4. sudo chmod -R 755 <tmp.???>

5. change to the folder

6. ran "ino build"

7. ran the script from step 1. Took a couple tries as I would get sync errors. Eventually get the following:

I do NOT have the /opt/openrov/linux/setuart.sh & file in my directory see following:

rov@OpenROV:/opt/openrov/linux$ ls -l
total 24
drwxr-xr-x 2 root root 4096 Sep 4 13:07 arduino
drwxr-xr-x 2 root root 4096 Sep 4 12:09 device-tree-overlays
-rwxr-xr-x 1 root root 4561 Sep 4 12:09 openrov.service
-rwxr-xr-x 1 root root 422 Sep 4 12:09 reset.sh
-rwxr-xr-x 1 root root 254 Sep 4 12:09 update-devicetree-oberlays.sh

******************

THEN I GET

rov@OpenROV:/opt/openrov/linux$ sudo ino upload -p /dev/tty01

/dev/tty01 doesn't exist. Is Arduino connected?

THE CAPE IS MOUNTED ON THE BB. THE CAPE HAS BOTH A RED LIGHT ON AND A GREEN LIGHT AT THE CONNECTION POINT OF THE POWER WIRE

rov@OpenROV:/dev$ cd tty01
-bash: cd: tty01: No such file or directory
rov@OpenROV:/dev$ cd tty1
-bash: cd: tty1: Not a directory
rov@OpenROV:/dev$ ls -l
total 0
crw------- 1 root root 10, 57 Sep 4 12:26 alarm
crw------- 1 root root 10, 62 Sep 4 12:26 ashmem
crw-rw---- 1 root audio 14, 4 Sep 4 12:26 audio
crw------- 1 root root 10, 235 Sep 4 12:26 autofs
crw------- 1 root root 10, 63 Sep 4 12:26 binder
drwxr-xr-x 2 root root 580 Jan 1 2000 block
crw------- 1 root root 10, 234 Sep 4 12:26 btrfs-control
drwxr-xr-x 3 root root 60 Jan 1 1970 bus
drwxr-xr-x 2 root root 2780 Sep 4 12:26 char
crw------- 1 root root 5, 1 Sep 4 12:26 console
lrwxrwxrwx 1 root root 11 Jan 1 2000 core -> /proc/kcore
crw------- 1 root root 10, 56 Sep 4 12:26 cpu_dma_latency
drwxr-xr-x 6 root root 120 Jan 1 2000 disk
crw-rw---- 1 root audio 14, 3 Sep 4 12:26 dsp
lrwxrwxrwx 1 root root 13 Jan 1 2000 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 Sep 4 12:26 full
crw-rw-rw- 1 root root 10, 229 Sep 4 12:26 fuse
crw-rw---- 1 root i2c 89, 0 Sep 4 12:26 i2c-0
crw-rw---- 1 root i2c 89, 1 Sep 4 12:26 i2c-1
drwxr-xr-x 4 root root 140 Sep 4 12:26 input
crw-r----- 1 root kmem 1, 2 Sep 4 12:26 kmem
crw-r--r-- 1 root root 1, 11 Sep 4 12:26 kmsg
srw-rw-rw- 1 root root 0 Sep 4 12:26 log
crw------- 1 root root 10, 60 Sep 4 12:26 log_events
crw------- 1 root root 10, 61 Sep 4 12:26 log_main
crw------- 1 root root 10, 59 Sep 4 12:26 log_radio
crw------- 1 root root 10, 58 Sep 4 12:26 log_system
brw-rw---- 1 root disk 7, 0 Sep 4 12:26 loop0
brw-rw---- 1 root disk 7, 1 Sep 4 12:26 loop1
brw-rw---- 1 root disk 7, 2 Sep 4 12:26 loop2
brw-rw---- 1 root disk 7, 3 Sep 4 12:26 loop3
brw-rw---- 1 root disk 7, 4 Sep 4 12:26 loop4
brw-rw---- 1 root disk 7, 5 Sep 4 12:26 loop5
brw-rw---- 1 root disk 7, 6 Sep 4 12:26 loop6
brw-rw---- 1 root disk 7, 7 Sep 4 12:26 loop7
crw------- 1 root root 10, 237 Sep 4 12:26 loop-control
drwxr-xr-x 2 root root 60 Jan 1 1970 mapper
crw------- 1 root root 253, 0 Sep 4 12:26 media0
crw-r----- 1 root kmem 1, 1 Sep 4 12:26 mem
crw-rw---- 1 root audio 14, 0 Sep 4 12:26 mixer
brw-rw---- 1 root disk 179, 0 Sep 4 12:26 mmcblk0
brw-rw---- 1 root disk 179, 1 Sep 4 12:26 mmcblk0p1
brw-rw---- 1 root disk 179, 2 Sep 4 12:26 mmcblk0p2
drwxr-xr-x 2 root root 60 Jan 1 2000 net
crw------- 1 root root 10, 55 Sep 4 12:26 network_latency
crw------- 1 root root 10, 54 Sep 4 12:26 network_throughput
crw-rw-rw- 1 root root 1, 3 Sep 4 12:26 null
crw------- 1 root root 108, 0 Sep 4 12:26 ppp
crw------- 1 root root 10, 1 Sep 4 12:26 psaux
crw-rw-rw- 1 root tty 5, 2 Oct 4 23:22 ptmx
drwxr-xr-x 2 root root 0 Jan 1 1970 pts
brw-rw---- 1 root disk 1, 0 Sep 4 12:26 ram0
brw-rw---- 1 root disk 1, 1 Sep 4 12:26 ram1
brw-rw---- 1 root disk 1, 10 Sep 4 12:26 ram10
brw-rw---- 1 root disk 1, 11 Sep 4 12:26 ram11
brw-rw---- 1 root disk 1, 12 Sep 4 12:26 ram12
brw-rw---- 1 root disk 1, 13 Sep 4 12:26 ram13
brw-rw---- 1 root disk 1, 14 Sep 4 12:26 ram14
brw-rw---- 1 root disk 1, 15 Sep 4 12:26 ram15
brw-rw---- 1 root disk 1, 2 Sep 4 12:26 ram2
brw-rw---- 1 root disk 1, 3 Sep 4 12:26 ram3
brw-rw---- 1 root disk 1, 4 Sep 4 12:26 ram4
brw-rw---- 1 root disk 1, 5 Sep 4 12:26 ram5
brw-rw---- 1 root disk 1, 6 Sep 4 12:26 ram6
brw-rw---- 1 root disk 1, 7 Sep 4 12:26 ram7
brw-rw---- 1 root disk 1, 8 Sep 4 12:26 ram8
brw-rw---- 1 root disk 1, 9 Sep 4 12:26 ram9
crw-rw-rw- 1 root root 1, 8 Sep 4 12:26 random
lrwxrwxrwx 1 root root 4 Sep 4 12:26 rtc -> rtc0
crw------- 1 root root 254, 0 Sep 4 12:26 rtc0
lrwxrwxrwx 1 root root 8 Sep 4 12:26 shm -> /run/shm
drwxr-xr-x 4 root root 160 Sep 4 12:26 snd
crw------- 1 root root 153, 0 Sep 4 12:26 spidev1.0
lrwxrwxrwx 1 root root 15 Jan 1 2000 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jan 1 2000 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jan 1 2000 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root tty 5, 0 Oct 4 23:07 tty
crw--w---- 1 root tty 4, 0 Sep 4 12:26 tty0
crw-rw---- 1 root tty 4, 1 Sep 4 12:26 tty1
crw--w---- 1 root tty 4, 10 Sep 4 12:26 tty10
crw--w---- 1 root tty 4, 11 Sep 4 12:26 tty11
crw--w---- 1 root tty 4, 12 Sep 4 12:26 tty12
crw--w---- 1 root tty 4, 13 Sep 4 12:26 tty13
crw--w---- 1 root tty 4, 14 Sep 4 12:26 tty14
crw--w---- 1 root tty 4, 15 Sep 4 12:26 tty15
crw--w---- 1 root tty 4, 16 Sep 4 12:26 tty16
crw--w---- 1 root tty 4, 17 Sep 4 12:26 tty17
crw--w---- 1 root tty 4, 18 Sep 4 12:26 tty18
crw--w---- 1 root tty 4, 19 Sep 4 12:26 tty19
crw-rw---- 1 root tty 4, 2 Sep 4 12:26 tty2
crw--w---- 1 root tty 4, 20 Sep 4 12:26 tty20
crw--w---- 1 root tty 4, 21 Sep 4 12:26 tty21
crw--w---- 1 root tty 4, 22 Sep 4 12:26 tty22
crw--w---- 1 root tty 4, 23 Sep 4 12:26 tty23
crw--w---- 1 root tty 4, 24 Sep 4 12:26 tty24
crw--w---- 1 root tty 4, 25 Sep 4 12:26 tty25
crw--w---- 1 root tty 4, 26 Sep 4 12:26 tty26
crw--w---- 1 root tty 4, 27 Sep 4 12:26 tty27
crw--w---- 1 root tty 4, 28 Sep 4 12:26 tty28
crw--w---- 1 root tty 4, 29 Sep 4 12:26 tty29
crw-rw---- 1 root tty 4, 3 Sep 4 12:26 tty3
crw--w---- 1 root tty 4, 30 Sep 4 12:26 tty30
crw--w---- 1 root tty 4, 31 Sep 4 12:26 tty31
crw--w---- 1 root tty 4, 32 Sep 4 12:26 tty32
crw--w---- 1 root tty 4, 33 Sep 4 12:26 tty33
crw--w---- 1 root tty 4, 34 Sep 4 12:26 tty34
crw--w---- 1 root tty 4, 35 Sep 4 12:26 tty35
crw--w---- 1 root tty 4, 36 Sep 4 12:26 tty36
crw--w---- 1 root tty 4, 37 Sep 4 12:26 tty37
crw--w---- 1 root tty 4, 38 Sep 4 12:26 tty38
crw--w---- 1 root tty 4, 39 Sep 4 12:26 tty39
crw-rw---- 1 root tty 4, 4 Sep 4 12:26 tty4
crw--w---- 1 root tty 4, 40 Sep 4 12:26 tty40
crw--w---- 1 root tty 4, 41 Sep 4 12:26 tty41
crw--w---- 1 root tty 4, 42 Sep 4 12:26 tty42
crw--w---- 1 root tty 4, 43 Sep 4 12:26 tty43
crw--w---- 1 root tty 4, 44 Sep 4 12:26 tty44
crw--w---- 1 root tty 4, 45 Sep 4 12:26 tty45
crw--w---- 1 root tty 4, 46 Sep 4 12:26 tty46
crw--w---- 1 root tty 4, 47 Sep 4 12:26 tty47
crw--w---- 1 root tty 4, 48 Sep 4 12:26 tty48
crw--w---- 1 root tty 4, 49 Sep 4 12:26 tty49
crw-rw---- 1 root tty 4, 5 Sep 4 12:26 tty5
crw--w---- 1 root tty 4, 50 Sep 4 12:26 tty50
crw--w---- 1 root tty 4, 51 Sep 4 12:26 tty51
crw--w---- 1 root tty 4, 52 Sep 4 12:26 tty52
crw--w---- 1 root tty 4, 53 Sep 4 12:26 tty53
crw--w---- 1 root tty 4, 54 Sep 4 12:26 tty54
crw--w---- 1 root tty 4, 55 Sep 4 12:26 tty55
crw--w---- 1 root tty 4, 56 Sep 4 12:26 tty56
crw--w---- 1 root tty 4, 57 Sep 4 12:26 tty57
crw--w---- 1 root tty 4, 58 Sep 4 12:26 tty58
crw--w---- 1 root tty 4, 59 Sep 4 12:26 tty59
crw-rw---- 1 root tty 4, 6 Sep 4 12:26 tty6
crw--w---- 1 root tty 4, 60 Sep 4 12:26 tty60
crw--w---- 1 root tty 4, 61 Sep 4 12:26 tty61
crw--w---- 1 root tty 4, 62 Sep 4 12:26 tty62
crw--w---- 1 root tty 4, 63 Sep 4 12:26 tty63
crw--w---- 1 root tty 4, 7 Sep 4 12:26 tty7
crw--w---- 1 root tty 4, 8 Sep 4 12:26 tty8
crw--w---- 1 root tty 4, 9 Sep 4 12:26 tty9
crw-rw---- 1 root dialout 244, 0 Sep 4 12:26 ttyGS0
crw-rw---- 1 root tty 248, 0 Oct 4 23:05 ttyO0
crw-rw---- 1 root dialout 248, 1 Oct 4 23:19 ttyO1
crw-rw---- 1 root dialout 4, 64 Sep 4 12:26 ttyS0
crw-rw---- 1 root dialout 4, 65 Sep 4 12:26 ttyS1
crw-rw---- 1 root dialout 4, 66 Sep 4 12:26 ttyS2
crw-rw---- 1 root dialout 4, 67 Sep 4 12:26 ttyS3
crw------- 1 root root 10, 53 Sep 4 12:26 ubi_ctrl
crw------- 1 root root 10, 223 Sep 4 12:26 uinput
crw-rw-rw- 1 root root 1, 9 Sep 4 12:26 urandom
crw------- 1 root root 246, 0 Sep 4 12:26 usbmon0
crw------- 1 root root 246, 1 Sep 4 12:26 usbmon1
crw------- 1 root root 246, 2 Sep 4 12:26 usbmon2
drwxr-xr-x 4 root root 80 Sep 4 12:26 v4l
crw-rw---- 1 root tty 7, 0 Sep 4 12:26 vcs
crw-rw---- 1 root tty 7, 1 Sep 4 12:26 vcs1
crw-rw---- 1 root tty 7, 2 Sep 4 12:26 vcs2
crw-rw---- 1 root tty 7, 3 Sep 4 12:26 vcs3
crw-rw---- 1 root tty 7, 4 Sep 4 12:26 vcs4
crw-rw---- 1 root tty 7, 5 Sep 4 12:26 vcs5
crw-rw---- 1 root tty 7, 6 Sep 4 12:26 vcs6
crw-rw---- 1 root tty 7, 7 Sep 4 12:26 vcs7
crw-rw---- 1 root tty 7, 128 Sep 4 12:26 vcsa
crw-rw---- 1 root tty 7, 129 Sep 4 12:26 vcsa1
crw-rw---- 1 root tty 7, 130 Sep 4 12:26 vcsa2
crw-rw---- 1 root tty 7, 131 Sep 4 12:26 vcsa3
crw-rw---- 1 root tty 7, 132 Sep 4 12:26 vcsa4
crw-rw---- 1 root tty 7, 133 Sep 4 12:26 vcsa5
crw-rw---- 1 root tty 7, 134 Sep 4 12:26 vcsa6
crw-rw---- 1 root tty 7, 135 Sep 4 12:26 vcsa7
crw-rw---- 1 root video 81, 0 Sep 4 12:26 video0
crw------- 1 root root 10, 130 Sep 4 12:26 watchdog
crw------- 1 root root 251, 0 Sep 4 12:26 watchdog0
crw-rw-rw- 1 root root 1, 5 Sep 4 12:26 zero
rov@OpenROV:/dev$

IF I CHANGE tty01 to tty1 I get

ov@OpenROV:/dev$ sudo ino upload -p /dev/tty1


Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt
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
Traceback (most recent call last):
File "/usr/local/bin/ino", line 6, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/ino/runner.py", line 63, in main
args.func(args)
File "/usr/local/lib/python2.7/dist-packages/ino/commands/upload.py", line 72, in run
s.setDTR(False)
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 535, in setDTR
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
IOError: [Errno 22] Invalid argument


rov@OpenROV:/dev$

Have things changed in 9 months???

Thanks,

bob


#4

the tty is tty<Oh>1 vs tty<Zero>1. Hard to tell. The Master repository on GitHub has had the fix to make serial loading of the Arduino code stable since 8/15/2013. https://github.com/OpenROV/openrov-software/commit/76a5ef1ceaf9b36fe5dbf1118e19bed2cb725246

Good luck!


#5

rov@OpenROV:/dev$ sudo ino upload -p /dev/ttyO1
avrdude: stk500_getsync(): not in sync: resp=0x35

avrdude done. Thank you.

rov@OpenROV:/dev$

===================

rCannot load StringPrep-0.1.0 bindings. You may need to `npm install node-stringprep'
path.existsSync is now called `fs.existsSync`.
eo_resolution: '1920x1080',
video_device: '/dev/video0',
video_port: 8090,
port: 8080,
serial: '/dev/ttyO1',
serial_baud: 115200,
preferences:
{ stores: { file: [Object], defaults: [Object] },
sources: [],
version: '0.6.7',
Argv: [Getter],
Env: [Getter],
File: [Getter],
Literal: [Getter],
Memory: [Getter],
key: [Function],
path: [Function],
loadFiles: [Function],
loadFilesSync: [Function],
formats: { json: [Object], ini: [Object] },
Provider: [Function] },
OpenROVCamera: './lib/OpenROVCamera',
OpenROVController: './lib/OpenROVController',
FirmwareInstaller: './lib/FirmwareInstaller' }
info: socket.io started
Starting the script from /opt/openrov/src/linux to setup UART1...
initiating camera on
Started listening on port: 8080
/dev/video0
spawning capture process...
emitted 'videoStated'
camera started
stderr: MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1920 x 1080
i: Frames Per Second.: 15
i: Format............: MJPEG

stderr: Adding control for Pan (relative)

stderr: UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan Reset

stderr: UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan/tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Focus (absolute)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device

stderr: o:
stderr: www-folder-path...: disabled

stderr: o: HTTP TCP port.....: 8090

stderr: o: username:password.: disabled
o: commands..........: enabled

updateSetting(44,1405,1595);
Sending rcap to arduino
go(1500,1500,1500);
sending photos to web client
smoothingIncriment|44
sending arduino settings to web client
updateSetting(44,1405,1821);
updateSetting(44,1149,1821);
updateSetting(44,1149,1821);
updateSetting(44,1149,1821);
updateSetting(44,1149,1821);
Configuration saved successfully.
Configuration saved successfully.
Configuration saved successfully.
Configuration saved successfully.
Configuration saved successfully.
smoothingIncriment|44
sending arduino settings to web client
smoothingIncriment|44
sending arduino settings to web client
smoothingIncriment|44
sending arduino settings to web client
smoothingIncriment|44
sending arduino settings to web client
smoothingIncriment|44
sending arduino settings to web client
updateSetting(28,1149,1821);
updateSetting(28,1149,1821);
updateSetting(28,1149,1821);
updateSetting(28,1149,1821);
Configuration saved successfully.
Configuration saved successfully.
Configuration saved successfully.
Configuration saved successfully.
smoothingIncriment|28
sending arduino settings to web client
smoothingIncriment|28
sending arduino settings to web client
smoothingIncriment|28
sending arduino settings to web client
smoothingIncriment|28
sending arduino settings to web client
eb client
smoothingIncriment|28
sending arduino settings to web client
smoothingIncriment|28
sending arduino settings to web client
rov@OpenROV:/dev$


==========

It is smart enough to know I only have one motor attached.

Use o, p to increase brightness of lights.

  • depth 6149
  • temp 14.498938217759132
  • vout 10.948191593352883
  • iout 0.8056695992179863
  • fmem 1195
  • motorAttached 1
  • motors 1441,1461,1598
  • mtarg 1441,1461,1598
  • servo 1500
  • starg 1500
  • ver .20130314034900
  • time 1623788
  • cpuUsage 0.4027777777777778

I have been back and forth trying all sorts of commands in the online forum.

I don't even have the lights anymore only the camera even though the web interface shows the brightness going up and down.

Too much time -- too unclear where the problem is

Thanks anyhow.


#6

Bob, I feel your pain. I've already spent way too many hours on this.

Did you figure out how to get the Bbone to talk to the Arduino after running the update script?

What I've done...

I've twice rebuilt the software from the image posted here: http://wiki.openrov.com/index.php/Installing_The_Software

and have run the update script (twice)....

With just the base image installed I can connect to cockpit and control the lights but after running the updates I can connect to cockpit but I can't seem to control the lights anymore. I only have one motor connected (looking to set the correct direction before finishing the molex)

In the end the problem seems to being that the Bbone isn't talking to the Arudino.

I pulled the chip and put it in an Arduino Uno and uploaded the updates...

that didn't help either. I've been through lots of the forum threads and having figured it out.


#7

Just to clarify motorAttached 1 means that the servos for the motors are attached via software. For safety, if a stop command is sent to the Arduino it will actually disconnect the servos (set it to zero).

That the motor values are changing is good news. mtarg is the value that has been sent to the arduino and motors is the value that the servos for the motors have actually been set to. If motors are not moving it is probably either calibration, programming or the ESC, or worse case a hardware problem between the servor output->ESC->Motor.

The neutral for the moto values is 1500.

The interface on the lights in the UI can be deceiving as the cockpit shows that value it is trying to send to the arduino but not the value that has actually been set by the arduino. If they were working but stopped it may mean that system got our of sync and the cockpit software no longer saw the right version in the arduino software and refused to send commands (you will see that all over the logs if that is the case). The code should probably be changed to routinely re-query for the version of the arduino every minute or so if it did not get it the first time.

So first steps:

1. Make sure the lights work. If they go up and down then communication is working fine through the entire system. Made a bit difficult in that your only feedback is the actual lights changing or not.

2. If lights are working, but not the motors, start with calibration and programming of the ESCs.

I have an idea for a direct serial interface from the cockpit software to the arduino so that you can send commands directly. If anyone wants to take it on let me know and I can send the libraries I have evaluated so far. Might be a couple weeks until I find the time to do it myself.

-B


#8

Thank you Brian for the reply!

Ok, starting over (as much as I can)....

1. I re-installed the image with Pi Filler (I'm on a mac).

- result: I am able to control the LED lights again (not just in the interface) but the Voltage isn't showing up (it used to before I updated the chip in the Arduino UNO).

no motors connected at all right now. just the power and tether.

I've got a red light on the cape, don't remember that from before but the home plug adapter board was probably covering it.

Next, I'll run the update.sh as sudo in /opt/openrov ...


#9

2. Ran the update.sh script... no error and no cockpit available.

3. Ran the update.sh script again (yes, I noticed the content was different)

= RESULT was I got cockpit back with fancy HUD but no control over the LED lights (the UI makes it look like it is working but they aren't turning on). The red light that was on the cape is now off.

Backstory:

In the past two tries to install software and updates from scratch I have tried to change the speed of the connection to the arduino to 115.2 in boards.txt and gave all access (777) to a directory to clear some errors.

This time I'm looking some advice before I go stumbling down that road again. Does anything from our logs look like a place to focus in on?

Output of second update.sh run below:

===========================================

===========================================

rov@OpenROV:/opt/openrov$ sudo ./update.sh
[sudo] password for rov:
From https://github.com/OpenROV/openrov-software
* branch master -> FETCH_HEAD
Already up-to-date.
./update.sh: 5: ./update.sh: /opt/openrov/updatelinux.sh: not found
npm http GET https://registry.npmjs.org/nconf
npm http GET https://registry.npmjs.org/request

[OUTPUT TOO LONG FOR POST SEE ATTACHED FULL VERSION]

[OUTPUT TOO LONG FOR POST SEE ATTACHED FULL VERSION]

> node-xmpp@0.7.1 postinstall /opt/openrov/node_modules/node-xmpp
> 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


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

gyp ERR! clean error
gyp ERR! stack Error: EPERM, chmod 'build'
gyp ERR! System Linux 3.2.33-psp26
gyp ERR! command "node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/openrov/node_modules/serialport
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! serialport@1.0.8 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the serialport@1.0.8 install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
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
unpacking
staging: build dir is /tmp/tmp.4oNzyFUJ9j
staged src in to build folder
unpacked into folder /tmp/tmp.4oNzyFUJ9j
compilling in /tmp/tmp.4oNzyFUJ9j
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
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)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Servo
Scanning dependencies of EEPROM
Scanning dependencies of Wire
src/Pin.cpp
src/MinIMU_LSM303.cpp
src/FreeMem.cpp
src/MinIMU_matrix.cpp
src/MinIMU_L3G.cpp
src/Timer.cpp
src/Command.cpp
src/CalibrationLaser.cpp
src/Thrusters2X1.cpp
src/Device.cpp
src/MinIMU_Compass.cpp
src/Lights.cpp
src/MinIMU9.cpp
src/MinIMU9AHRS.cpp
src/MinIMU_I2C.cpp
src/MinIMU_DCM.cpp
src/CameraMount.cpp
src/Settings.cpp
src/MinIMU_Output.cpp
src/Cape.cpp
src/Pilot.cpp
src/MinIMU_Vector.cpp
src/Motors.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/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
compilled in /tmp/tmp.4oNzyFUJ9j
uploading firmware from /tmp/tmp.4oNzyFUJ9j
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$

===========================================

===========================================

As always, thanks for any help,

Urban


1182-FullOutputUpgrade2.txt (38.8 KB)

#10

Well clearly the last upload failed. Did you try power cycling the entire setup after the update? Sometimes the node process loses touch with the arduino after an update.

The arduino upload failing with the updated code from the master git repo which it pulls down during the update is a concern. ; Fixed the timing issues from the reset to fix UART based f… should have fixed that.

Can you check the /var/log/openrov.log. I suspect you will see multiple errors regarding inability to get the arduino firmware version number... which accounts for lights not responding anymore. We *have* to get the arduino firmware updated. What happens if you:

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

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


#11

Ben wrote:

Did you try power cycling the entire setup after the update? Sometimes the node process loses touch with the arduino after an update.

I didn't last night but I did try that during my previous attempts.

I just powered it back up this morning and no difference.

FWIW: I currently have been powering the system off it's batteries which have been freshly charged and was reading over 12V on meter.

Can you check the /var/log/openrov.log.

Log results:

Cannot load StringPrep-0.1.0 bindings. You may need to `npm install node-stringprep'
path.existsSync is now called `fs.existsSync`.
eo_resolution: '1920x1080',
video_device: '/dev/video0',
video_port: 8090,
port: 8080,
serial: '/dev/ttyO1',
serial_baud: 115200,
preferences:
{ stores: { file: [Object], defaults: [Object] },
sources: [],
version: '0.6.7',
File: [Getter],
Literal: [Getter],
Env: [Getter],
Argv: [Getter],
Memory: [Getter],
key: [Function],
path: [Function],
loadFiles: [Function],
loadFilesSync: [Function],
formats: { json: [Object], ini: [Object] },
Provider: [Function] },
OpenROVCamera: './lib/OpenROVCamera',
OpenROVController: './lib/OpenROVController',
FirmwareInstaller: './lib/FirmwareInstaller' }
info: socket.io started
Starting the script from /opt/openrov/src/linux to setup UART1...
initiating camera on
Started listening on port: 8080
/dev/video0
spawning capture process...
emitted 'videoStated'
camera started
stderr: MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1920 x 1080
i: Frames Per Second.: 15
i: Format............: MJPEG

stderr: Adding control for Pan (relative)

stderr: UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Tilt (relative)

stderr: UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Pan Reset
UVCIOC_CTRL_ADD - Error: Invalid argument
Adding control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Invalid argument

stderr: mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Invalid argument
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Invalid argument

stderr: o:
stderr: www-folder-path...: disabled

stderr: o: HTTP TCP port.....: 8090

stderr: o: username:password.: disabled

stderr: o: commands..........: enabled

Audrino is at an incompatible version of firmware. Upgrade required before controls will respond
0
0
updateSetting(4,1405,1595);
Sending rcap to arduino
sending photos to web client
Audrino is at an incompatible version of firmware. Upgrade required before controls will respond
0

===============================

Log end

===============================

What happens if you:

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

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

----------------

rov@OpenROV:~$ sudo /etc/init.d/openrov stop
rov@OpenROV:~$ sudo /opt/openrov/linux/arduino/firmware-installfromsource.sh
unpacking
staging: build dir is /tmp/tmp.lWpcmnb8lq
staged src in to build folder
unpacked into folder /tmp/tmp.lWpcmnb8lq
compilling in /tmp/tmp.lWpcmnb8lq
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
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)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Servo
Scanning dependencies of EEPROM
Scanning dependencies of Wire
src/Pin.cpp
src/MinIMU_LSM303.cpp
src/FreeMem.cpp
src/MinIMU_matrix.cpp
src/MinIMU_L3G.cpp
src/Timer.cpp
src/Command.cpp
src/CalibrationLaser.cpp
src/Thrusters2X1.cpp
src/Device.cpp
src/MinIMU_Compass.cpp
src/Lights.cpp
src/MinIMU9.cpp
src/MinIMU9AHRS.cpp
src/MinIMU_I2C.cpp
src/MinIMU_DCM.cpp
src/CameraMount.cpp
src/Settings.cpp
src/MinIMU_Output.cpp
src/Cape.cpp
src/Pilot.cpp
src/MinIMU_Vector.cpp
src/Motors.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/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
compilled in /tmp/tmp.lWpcmnb8lq
uploading firmware from /tmp/tmp.lWpcmnb8lq
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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thanks again for the suggestions. Got any more?


#12

I think I've now spent more time at a linux prompt than assembling the ROV.


#13

I'm getting the exact same error. Check out

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

Brian A is talking to another user with the same issue. I think there are 3 of us with the exact same issue.


#14

I've given up for now. It's currently a paper weight until I get a whole lot of time to redo the electronics with something more simple to troubleshoot.


#15

Nobody has been keeping up the GIT releases as far as I know. *LOTS* of fixes have gone since then. The latest code is in the Master branch for the cape kits.