System information
Using scripts in Axis Camera/Video products
Axis Communications AB provides NO support for application development of any kind. The information
here is provided "as is", and there is no guarantee that any of the examples shown will work in your
particular application.
Revision 1.02 October 2002 16
(This starts the buffer and can be specified in a start-up script or as an event or utask)
When an event occurs, as specified for utask (see below) the following command
sequence is used to handle the buffer:
3.4.2 sftpclient
This client is used for FTP connections. If you have an FTP server, you can use this client to
send/receive files to/from a specified server. A passive mode is also available for the client. A
typical example is to upload snapshots to a specified FTP server when an event is detected.
Usage: sftpclient [options]
Option Description
-p <host>
Put local file to host remote dir [remote file].
-i <host>
Interactive to/from host [remote dir].
-m <host>
Put all files in local dir to host remote dir.
-n <port nbr>
Specify remote port number, default is 21.
-t <file>
Use temporary file name during upload.
-c <remote
dir>
Remote directory to start in.
-d <remote
file>
File to get/put.
-k <local
dir>
Local directory to start in.
-l <local
file>
File to get/put.
-u username
The user to login as.
-w password
The password to use for the user.
-L
Log errors to syslog facility instead of stderr.
-s
Use passive mode ftp.
Example
Upload all the files in /tmp to the directory /upload on the FTP Server 10.13.9.40 using the
port 21, with the username user and the password pass. Errors will be logged to syslog.
bufferd -stop ALARM
{ handle images}
bufferd -reset ALARM
bufferd -start -buffername ALARM -uri ftp://axis-cgi/jpg/1/176x144.jpg
-pre 5 -post 2 -postdelay 2000
The handling of the images can, for example, be done with the PHP3-function ftp(), shown
below (see also /usr/php/template_upload_cont.php3 on the device).
sftpclient -L -m 10.13.9.40 -n 21 -c /upload -k /tmp -u user -w pass