Useful command-line commands


#1

Feel free to add your own in the comments and I’ll aggregate them in to this list

ROV

list all openrov packages and their versions installed

dpkg-query -l 'openrov*'

install the firmware

sudo /opt/openrov/cockpit/linux/arduino/firmware-installfromsource.sh

load current time (when rov has direct access to the internet and proxy disabled)

ntpdate -b -s -u pool.ntp.org

manually kickoff the mjpeg-streamer service

mjpg_streamer -i "/usr/local/lib/input_uvc.so -d /dev/video0 -r 1280x720 -f 10" -o "/usr/local/lib/output_http.so -p 8090"

See what all of the beaglebone pins are mapped to

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups

OSX/Linux

backup the SD card (assumes you installed pv, and that your SD card is /dev/disk2

dd if=/dev/rdisk2 bs=2m | pv -s 4G -peta | gzip -1 > tester.img.gz

burn a SD card directly from the gzipped img (assumes # is where your SD card is mounted, and pv installed)

pv tester.img.gz | </span>gzip -dc | dd of=/dev/rdisk# bs=2m

Mount the openrov filesystem over ssh

mkdir /Volumes/rov
sshfs -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no rov@192.168.254.1:/ /Volumes/rov

SSH in without having the system store the ssh key (which becomes invalid when using a different device on the same IP)

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no rov@192.168.254.1

How I develop directly on the beaglebone
#2

OSX/Linux

record OpenROV camera video (might have to fiddle with framerate (-r 10 option)

mkdir -p output
ffmpeg -f mjpeg -r 10 -i "http://192.168.254.1:8090/?action=stream" \
  -vcodec copy -an output/`date '+%Y-%m-%dT%H:%M:%S'`.mkv

Needs ffmpeg, installable via brew or your distribution’s package manager.


#3

Commit the SD card image to the eeprom on the beagle bone black

 sudo /opt/openrov/cockpit/linux/copy-to-emmc.sh

Reboot the ROV

sudo reboot