Axis Customer Forum
https://custforum.axis.com/

Quick firmware version check
https://custforum.axis.com/viewtopic.php?f=8&t=3958
Page 1 of 1

Author:  Jason Tibbitts 638063 [ Wed Jun 03, 2015 4:07 pm ]
Post subject:  Quick firmware version check

Not sure where to put this, but it's software and I'm not with Axis, so....

Here's a quick script to check all of your cameras for firmware updates. Just change the second line to list your cameras instead of mine.

This breaks if Axis changes its web site, but if they provided an API for this (just a link that spit out some json) then I'd use it. It does work with the newly-reorganized site, though.

Needs FTP enabled on the cameras. I know it works at least with the 5.4x series firmware and up but I don't have anything older to test. Also requires zsh (because I like zsh, though it would probably work with bash if you changed the 'echo' line), links and nc. And if you don't know what that means, then you're probably on Windows where this won't work anyway.

Code:

#!/bin/zsh
CAMERAS=(cam-605 cam-606 cam-631 cam-636 cam-639 cam-641 cam-646 cam-648 cam-650 cam-651h cam-660 cam-665 cam-691 cam-692 cam-test)

verlist=$(mktemp -q)
echo -n 'Downloading firmware list...'
links -dump http://www.axis.com/global/en/general/ajax/firmware-list|grep AXIS|sed -e 's/.*AXIS //g' > $verlist
echo 'OK'

for cam in $CAMERAS; do
    banner=$(echo | nc -w 2 $cam 21 2>/dev/null|head -1)
    if [[ -z "$banner" ]]; then
        echo "Error connecting to $cam"
        continue
    fi
    model=$(echo $banner | awk '{print $3}')
    ver=$(echo $banner | sed -e 's/^.*Camera \(\S*\).*$/\1/')
    new=$(grep $model $verlist | awk '{print $2}')
    year=$(echo $banner | sed -e 's/.*(//' -e 's/).*//')
    echo ${(r:10:: :)cam} ${(r:7:: :)model} ${(r:8:: :)ver} ${(r:8:: :)new} $year

done

rm -f $verlist

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/