You are here: Foswiki>ALE Web>ScaryTechnicalStuffOnWheels>SettngUpSprat (17 December 2009, willyonwheels)Edit Attach

Setting Up Sprat

Up: ScaryTechnicalStuffOnWheels

Hardware

  • Emachines etower 733i : Celeron 733, 64 mb RAM, 15 GB disk. I pulled the Windows Modem and added a SCSI card. Would be nice to have another 64-mb memory stick that works.
  • Adaptec SCSI card (aic7xxx driver)
  • UMAX Astra 610S scanner

Software

  • Puppy Linux 3.10
    • Installed on hard drive (must use "ram only fs" option on boot)
      • Manually partitioned hard drive
      • Installed with puppy auto-installer after partitioning.
    • Installed monkey web server. Added /etc/rc.d start script for monkey web server
    • Installed python 2.4 . Still missing libdb dependency
    • Disabled auto-start of X Windows in /etc/profile
    • Installed sane_backend-1.0.17, because sane_backend-1.0.18 cannot work (lacks /etc/sane.d, may be miscompiled, symptom is that sane-find-scanner sees the scanner, but scanimage -L does not). sane_backend-1.0.17 requires libgphoto2, won't run with missing .so file.

To Do

  • Write python cgi-bin script to control scanner
  • Figure out where to put in house
  • Add to local name server (Done 18 Nov 2007)
    • Changed /etc/host to "sprat", added domain and search to /etc/resolv.conf. Added name and IP to local nameserver files on colt
  • Make sure dhcpcd is not running on boot (Done 18 Nov 2007)
  • Figure out how to ensure that scanner is detected ( Done 18 Nov 2007)
    • "echo "scsi add-single-device 1 0 5 0" > /proc/scsi/scsi" command does not work with my driver. rmmod(8) and modprobe(8) of aic7xxx detects a powered-on scanner but increments SCSI bus number each time. This doesn't appear to affect /dev/sg0 or scanimage -L however.
  • Make sure sshd is running ( Done 22 Nov 2007)
    • Installed Openssh-4.4p1.pup from dotpups.de (which was up, for a miracle).
    • Had to password-protect root and manually create a "ssh" user
    • Had to generate machine keys manually with ssh-keygen
    • Wrote 80sshd.sh startup script in /etc/init.d
  • Fix init.d scripts to write properly to console on startup/shutdown ( Done 22 Nov 2007)
    • Add "echo -en" with escape codes to get "Starting...." and "done" messages to display on scripts running.
  • Install libgphoto through package manager (Not feasible 18 Nov 2007)
    • Install packages are not simply .tar.gz packages.
  • Experiment with monster flat-bed scanner
    • It is a scsi scanner with a centronics 50 connector set. I have a db50->centronics cable, but need a centronics scsi terminator. It may be scsi 1.
  • Install imagemagick for image conversions (Done 18 Nov 2007)
    • Installed from slackware package by "tar -xzvf" ing it from / and then running install/doinstall.sh script. Scary but it worked (this time)
    • Used "convert" to make .jpg file from scanned .tiff image.
  • Change from "Puppy is shutting down" to "sprat is shutting down" (Done 18 Nov 2007)
  • Installed libdb-4.4 trying to fix python dependency -- doesn't appear to have worked but might just need a symlink. ( 18 Nov 2007 )

Development

  • The machine doesn't have enough muscle to support both a development environment and the application. I had to finish coding with e3vi from ssh. The system appears stable with just monkey running, but with X, monkey, a browser and a couple of terminal windows open it stops responding when the scanner application is run from a browser. I can see the app running in top(1), but it never actually starts the scanner or returns a page.
  • It is "Content-Type: text/html\n\n", not anything else. Anything but two newline characters will confuse heck out of your browser.
  • monkey appears to have Troubles processing URL argument lines ("foo://foo/bar?a+b+c"). To code around this I call a script which passes the appropriate arguments to my application, and the application looks for a web page ("cgi.FormFields()") and processes arguments iff it doesn't find any form variables set.
  • Leaving off the last > from <options/> worked fine from firefox, but caused safari to hork the page.
  • The "resolution" choice on scanimage(1) changes the size of the output image.

To Do

  • Make a table to hold the server and the scanner(s)
  • Plug the other scanner into the server.
  • Figure out how to power on and off in the house.
  • Hook some printers up and make CUPS work

-- CharlesShapiro - 19 Nov 2007
Topic revision: r8 - 17 December 2009, willyonwheels
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback