<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.elphel.com/index.php?action=history&amp;feed=atom&amp;title=Upload_images_to_a_remote_FTP_server</id>
	<title>Upload images to a remote FTP server - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.elphel.com/index.php?action=history&amp;feed=atom&amp;title=Upload_images_to_a_remote_FTP_server"/>
	<link rel="alternate" type="text/html" href="https://wiki.elphel.com/index.php?title=Upload_images_to_a_remote_FTP_server&amp;action=history"/>
	<updated>2026-08-03T16:46:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.elphel.com/index.php?title=Upload_images_to_a_remote_FTP_server&amp;diff=11622&amp;oldid=prev</id>
		<title>Oleg: Created page with &quot;&lt;font size=&#039;2&#039;&gt; ==Description== The camera can be set up to upload images on a remote ftp server periodically.  ==Additional features== * Launch a php script on the server - for ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.elphel.com/index.php?title=Upload_images_to_a_remote_FTP_server&amp;diff=11622&amp;oldid=prev"/>
		<updated>2012-10-02T19:31:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;font size=&amp;#039;2&amp;#039;&amp;gt; ==Description== The camera can be set up to upload images on a remote ftp server periodically.  ==Additional features== * Launch a php script on the server - for ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;font size=&amp;#039;2&amp;#039;&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
The camera can be set up to upload images on a remote ftp server periodically.&lt;br /&gt;
&lt;br /&gt;
==Additional features==&lt;br /&gt;
* Launch a php script on the server - for example, to resize or move the images.&lt;br /&gt;
* Download and update the camera parameters from a configuration file stored on the server.&lt;br /&gt;
&lt;br /&gt;
==Quick Instructions==&lt;br /&gt;
* Server: create an ftp user/password pair for the camera.&lt;br /&gt;
* Camera: edit /etc/conf.d/ccamftp.conf&lt;br /&gt;
* Camera: enable ftp uploading&lt;br /&gt;
 1. 192.168.0.9 -&amp;gt; Parameter Editor -&amp;gt; check the &amp;#039;&amp;#039;&amp;#039;camftp&amp;#039;&amp;#039;&amp;#039;-group -&amp;gt; View/Edit link -&amp;gt; set DAEMON_EN_CCAMFTP to 1&lt;br /&gt;
 2. 192.168.0.9 -&amp;gt; Parameter Editor -&amp;gt; scroll down to the second table and save the configuration.&lt;br /&gt;
&lt;br /&gt;
==Camera: /etc/ccamftp.conf==&lt;br /&gt;
* Able to launch a specified php script on the server - to resize images, for example.&lt;br /&gt;
* Listing:&lt;br /&gt;
 ; Configuration file for the &amp;quot;webcam&amp;quot; mode fro the automatic upload of the images to the remote ftp server over the ftp.&lt;br /&gt;
 ;Enable the script by specifying a non-zero value in the next line&lt;br /&gt;
 ENABLE=0&lt;br /&gt;
 ; This file should be placed to the /etc/conf.d/ccamftp.conf&lt;br /&gt;
 ; The the camera will automatically start ftp upload as soon as it is powered up if/etc/conf.d/ccamftp.conf exists and is not disabled&lt;br /&gt;
 ; To disable the script from running - remove or rename this file in the camera&lt;br /&gt;
 ;&lt;br /&gt;
 ;here are parameters written in the camera itself - will use if no remote configuration is available&lt;br /&gt;
 ;remore server parameters&lt;br /&gt;
 ;file name .jpeg will be added for the images to upload (i.e. sample_camera.jpeg), .conf - for the remote configuration file (i.e. sample_camera.conf)&lt;br /&gt;
 INAME=sample_camera&lt;br /&gt;
 ;ftp server ip (should be numerical)&lt;br /&gt;
 SERVER=127.0.0.1&lt;br /&gt;
 ;user name and password for ftp access to the remote server&lt;br /&gt;
 USER=some_user&lt;br /&gt;
 PASSWORD=some_password&lt;br /&gt;
 ;directory path on the remote server to uplooad the files&lt;br /&gt;
 REMOTE_DIR=some_image_directory&lt;br /&gt;
 ;directory on the remote server where camera will try to look for the configuration data &lt;br /&gt;
 REMOTE_CONF_DIR=some_conf_directory&lt;br /&gt;
 REMOTE_SCRIPT_PATH=http://some_server_ip/some_directory/some_script.php #should be IP, not host name&lt;br /&gt;
 ; you may create the file on the remote server with the same lines as the following, they will be used instead of this configuration file when the camear will contact the server.&lt;br /&gt;
 &lt;br /&gt;
 ;upload repetition period in seconds (300= one frame each 5 minutes&lt;br /&gt;
 PERIOD=120&lt;br /&gt;
 &lt;br /&gt;
 ;specify how long the script should wait for data upload/download operations before giving up current attempt (it will try again and again next periods)&lt;br /&gt;
 TIMEOUT=60&lt;br /&gt;
 &lt;br /&gt;
==Update the camera&amp;#039;s configuration from the server==&lt;br /&gt;
* If there&amp;#039;s no need for updating the configuration the file does not have to exist.&lt;br /&gt;
* The file name must be exactly as the INAME parameter value in /etc/conf.d/ccamftp.conf plus the &amp;#039;&amp;#039;&amp;#039;.conf&amp;#039;&amp;#039;&amp;#039; extenstion, example:&lt;br /&gt;
 INAME=sample_camera =&amp;gt; sample_camera.conf&lt;br /&gt;
* In the end of the configuration file there must be &amp;quot;FINISH=1&amp;quot; - this is done to make sure the whole configuration file is downloaded to the camera.&lt;br /&gt;
* All the parameters names can be found at 192.168.0.9-&amp;gt;&amp;quot;Parameter Editor&amp;quot; or on the camera in /etc/autocampars.xml&lt;br /&gt;
&lt;br /&gt;
* sample_camera.conf example listing:&lt;br /&gt;
 ;External FTP server configuration file - downloaded and used by the camera for updating parameters&lt;br /&gt;
 ;All the parameters names can be found at 192.168.0.9-&amp;gt;&amp;quot;Parameter Editor&amp;quot; or in /etc/autocampars.xml&lt;br /&gt;
 &lt;br /&gt;
 FTP_PERIOD=180   ; image update period&lt;br /&gt;
 FTP_TIMEOUT=300  ; allowed image upload time&lt;br /&gt;
 FTP_UPDATE=600   ; configuration file download period &lt;br /&gt;
 &lt;br /&gt;
 ;Image parameters&lt;br /&gt;
 &lt;br /&gt;
 WOI_TOP=0        ; window top&lt;br /&gt;
 WOI_LEFT=0       ; window left&lt;br /&gt;
 WOI_WIDTH=2592   ; window width&lt;br /&gt;
 WOI_HEIGHT=1936  ; window height&lt;br /&gt;
 &lt;br /&gt;
 QUALITY=80       ; JPEG quality (%)&lt;br /&gt;
 COLOR=1          ; image format: 0 = mono , 1 = JPEG, 5 = JP$&lt;br /&gt;
 &lt;br /&gt;
 COLOR_SATURATION_RED=250   ; color saturation red &lt;br /&gt;
 COLOR_SATURATION_BLUE=250  ; color saturation blue&lt;br /&gt;
 &lt;br /&gt;
 ; Parameters for black level and gamma (learn about them from the camera interface)&lt;br /&gt;
 GTAB_R=171508736 &lt;br /&gt;
 GTAB_G=171508736 &lt;br /&gt;
 GTAB_GB=171508736&lt;br /&gt;
 GTAB_B=171508736&lt;br /&gt;
 &lt;br /&gt;
 ;Autoexposure parameters&lt;br /&gt;
 &lt;br /&gt;
 AUTOEXP_ON=1             ; 1 - auto, 0 -manual&lt;br /&gt;
 AUTOEXP_EXP_MAX=100000   ; Maximum autoexposure value, 100000=100ms&lt;br /&gt;
 AEXP_LEVEL=63488         ; level for AEXP_FRACPIX&lt;br /&gt;
 AEXP_FRACPIX=65408       ; fraction of pixels to be below AEXP_LEVEL&lt;br /&gt;
 &lt;br /&gt;
 ;White balance parameters&lt;br /&gt;
 WB_EN=1;&lt;br /&gt;
 &lt;br /&gt;
 WB_SCALE_GB=65536 ; additional correction for green2/green1&lt;br /&gt;
 WB_SCALE_R=65536 ; additional correction for red/green1&lt;br /&gt;
 WB_SCALE_B=65536 ; additional correction for blue/green1&lt;br /&gt;
  &lt;br /&gt;
 ;Autoexposure and white balance window position and dimensions&lt;br /&gt;
 &lt;br /&gt;
 HISTWND_RWIDTH=0x8000  ; width, 50% of WOI_WIDTH&lt;br /&gt;
 HISTWND_RHEIGHT=0x8000 ; height, 50% of WOI_HEIGHT&lt;br /&gt;
 HISTWND_RTOP=0x8000    ; position, 50% of WOI_HEIGHT&lt;br /&gt;
 HISTWND_RLEFT=0x8000  ; position, 50% of WOI_WIDTH &lt;br /&gt;
 &lt;br /&gt;
 ;The next line is just to make sure the configuration file is read from the server completely (without it the file will be ignored)&lt;br /&gt;
 FINISH=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
* Put the configuration file on the remote server to &amp;quot;REMOTE_CONF_DIR&amp;quot; (set in the /etc/conf.d/ccamftp.conf)&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>
	</entry>
</feed>