Axis Customer Forum

It is currently Mon Sep 16, 2019 12:52 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Jun 03, 2015 4:07 pm 

Joined: Wed Mar 18, 2015 11:33 pm
Posts: 1
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.


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|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"
    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


rm -f $verlist

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group