Apache cgi-scripts for control of the avr web server or udp based avr device.
----------------------------------------------------------------------------

The eth_rem_dev-1.X.tar.gz software provides only a UDP interface. If you run
this software on the tuxgraphics avr ethernet hardware then you will need the
udp cgi-script.

The program udpcom needs to be installed in this case on the machine where
the cgi-script is running.

As of November 2006 the eth_rem_dev-2.X.tar.gz software is available. It provides
both a UDP interface and a web interface. If you run this software on your 
tuxgraphics avr ethernet hardware then you can either use the udp cgi-script or
the http cgi-script. I recommend however to use the http cgi-script (eth_ctl_www).
The eth_ctl_www script has no other dependencies than a standard perl installation
with the perl command installed as /usr/bin/perl

What is a cgi-script?
----------------------------------------------------------------------------
A cgi-script is a program (perl script in our case) which will generate
the web page. Dependent on the algorithm in the cgi-script different pages
can be generated and Form-data entered by the user can be evaluated.

In your apache httpd.conf you will need some lines similar to this
in order to use cgi-scripts. 

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>


Now you just have to copy the cgi-script into the directory /var/www/cgi-bin
and access it with a web browser at http://your.server/cgi-bin/your_script

It is a good idea to run the script once manually from the command line
after any modifications to ensure that the program runs without syntax errors.

Adapting the cgi-scripts to your site
----------------------------------------------------------------------------
Just edit the file you want to use (eth_ctl_www or eth_ctl_udp) with
a text editor and change the following lines:

# change this to the url of this program:
my $url = "http://192.168.0.2/cgi-bin/eth_ctl_www";
my $devaddr="10.0.0.24"; # ip or dns name of the eth_rem_dev we want to talk to
my $devpw="secret"; # the password sent to the avr

Note that eth_ctl_udp needs also udpcom in /usr/bin

Test the script for syntax errors after editing with the commands:
cd /var/www/cgi-bin
./eth_ctl_www
(or ./eth_ctl_udp)

Version history and copyright
----------------------------------------------------------------------------
Author: Guido Socher
Copyright: GPL V2
This software is available from: http://tuxgraphics.org/electronics

Versions:
2006-12-08: cgi-bin-1.0.tar.gz -- first public version