Accessing serial port via CGI script

Prerequisites: Part 3: Using Serial Port on Universal Expansion Board Python CGI script with lighttpd (Root privileges are required) 1. Install pyserial on RaspberryPi a. Download pyserial-2.5.tar.gz (106.3 kB) b. unzipping and untaring gunzip pyserial-2.5.tar.gz tar -xvf pyserial-2.5.tar c. Install pySerial cd pyserial-2.5 sudo python setup.py install 2.Testing Saving following python CGI scripts to your

Accessing serial port via CGI script Read More »

Python CGI script with lighttpd

1.Edit lighttpd.conf $sudo vim /etc/lighttpd/lighttpd.conf 1. Change cgi.assign = (“.php” => “/usr/bin/php5-cgi”) server.error-handler-404 = “/index.html” To cgi.assign = (“.php” => “/usr/bin/php5-cgi”, “.py” => “/usr/bin/python” ) server.error-handler-404 = “/index.html” 2. Change static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”) To static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.py”) 3. Change index-file.names = ( “index.php”, “index.html”, “index.lighttpd.html” ) To index-file.names

Python CGI script with lighttpd Read More »