While it's on my mind, I want to write another description of the Nantucket surveillance system for you. The video surveillance program is called "motion" and is invoked at the appropriate time with the command "motion -s" motion -s runs in the foreground and can readily be stopped with control-C. "motion" without the "-s" flag is the standard routine for continuous surveillance; it runs as a demon, which I don't know how to stop except by shutting down the computer. As presently programmed, "motion" generates about 64.7 Kbytes per second, or about 5.59 gigabytes per day, and would fill a 150 gigabyte hard drive in 26 days. On the Nantucket computer the images generated by "motion -s" from the four cameras are stored in directories named /usr/local/apache2/htdocs/cam1 /usr/local/apache2/htdocs/cam2 /usr/local/apache2/htdocs/cam3 /usr/local/apache2/htdocs/cam4 The pathname of the executable file "motion" on the Nantucket computer is /usr/local/bin/motion. The configuration file for "motion" is /usr/local/etc/motion.conf. The motion package is stored in /usr/local/motion You start your surveillance session by dialing 1-508-228-3836. When you hear 3 beeps, push 4, wait one second, push * This sequence turns on power to the Nantucket computer. After 10 seconds, you may repeat it just to be sure. Then hang up the phone. Next on the Belmont computer you enter ftp ftp-www.earthlink.net At the prompt type jochenmeyer (one word) The password is mut12z When your login had been acknowledged type "dir local_address" This will give you the directory entry on the web_site, giving the time (GMT) at which "local_address" was uploaded from the Nantucket computer. If this is a daily routine, the old local_address will list the previous day's time stamp plus 5 hours for GMT. If the Nantucket computer has started properly and hasn't been trapped into a rom-bios routine, then, three to four minutes after the Nantucket computer has been started with the 4 * signal. the local_address will change to today's date. If you still get yesterday's date don't logout of the ftp routine, wait a minute or two, then simply use the up arrow to repeat the dir local_address command. If after 5 minutes, local_address hasn't been updated, pick up the phone again, dial 1-508-228-3836, but this time, after the three initial beeps, unpower the Nantucket computer by pressing 4 then pressing # Two beeps will tell you the power has been turned off. Then press 4 again and * Three beeps will tell you the power has been restored, and you hope that the Nantucket computer is recycling. Keep repeating the dir local_address command on the ftp connection. Once the local_address has been updated, type the command: get local_address and when this is accomplished exit ftp using quit or exit or Control-C. Now look at the local_address file by typing vi local_address or cat local_address The next to the last line will give you the current local address which you use as an argument to ssh The first response to a successful ssh login will be a query which you should answer with yes three letters written out. The second response will be the request for the password for meyer which is Mut12z (note upper case M) The login directory on the Nantucket computer both for "ssh" (the safe shell login program) and for sftp (the safe file tranfer protocol, is /usr0/meyer. ssh will not login as root, but once you have logged in, for reasons which I haven't explored, superuser privileges are required to execute the other programs. The password for the initial login is "Mut12z" - note the upper-case M. Then type "su" (enter); the password is "wurzel" Next type the command ./trans00. trans00 is a batch file consisting of commands: rm /usr/local/apache2/htdocs/cam1/* rm /usr/local/apache2/htdocs/cam2/* rm /usr/local/apache2/htdocs/cam3/* rm /usr/local/apache2/htdocs/cam4/* which removes all old image files from the apache2/htdocs/cam* directories. The apache2 directory has no function except to store images as they are generated by "motion". (This directory has nothing to do with the apache web server.) The next command in the ./trans00 file is rm /usr0/meyer/trans10/* which removes all old image files from /usr0/meyer/trans10 After the ./trans00 command, type "motion -s" (enter) A cascade of debugging data will flood across the screen. After about 5 seconds, type Control-C The garbage from motion -s will stop. At the prompt, type ./trans01 (enter). This ./trans01 command is cp /usr/local/apache2/htdocs/cam*/* /usr/meyer/trans10 The ./trans01 command copies the newly generated image files in /usr/local/apache2/htdocs/cam[1234]/* to /usr0/meyer/trans10 You're now ready to download the new images. I use alt-F3 aor some such alt-F? command to switch to a different screen, still in /usr0/meyer (Belmont). I have a directory tree, such as /usr0/meyer/Ack01/090310 with the day's directory. I change directory (cd) to the directory for the day. Type sftp with the local_address as argument, e.g. sftp 4.154.248.31 This will get you an sftp login prompt for the password, which again is Mut12z. Now on the remote (Nantucket) computer change directories "cd trans10" trans10 being the directory containing todays image files. When the directory change is acknowledged, type mget * mget is the ftp get mutiple files command, the asterisk (*) is a wild-card character which references all files. You don't have to wait for the image files to be downloaded. It's a relatively slow process; but you can switch to your X-Windows screen (alt-7) and use an image viewing program (I use Kview) to look at the pictures. When you're satisfied with the iamges, switch back using Alt F? to the screen from which you executed ./trans00 motion -s and trans01, and type "shutdown now" no hyphen preceding the now. You should get a shutdown confirmation right away. You can now pick up the phone 1-508-228-3836, when you hear the three beeps push 4, wait a second, push #. You'll hear two beeps, which mean that power to the computer has been turned off. That's all there is to it. =============================== A switch in the rom-bios boot menu provides that the computer should boot when power is turned on. All the commands described below and the files listed are on the Nantucket computer. As the Nantucket machine goes through its boot routine it traverses all the files in the directory /etc/rc.d and a subdirectory /etc/rc.d/init.d This subdirectory /etc/rc.d/init.d contains a file "functions" /usr/etc/rc.d/init.d/functions the last line of this file is the command /usr0/meyer/PPP/cmd00_ack which is a shell file that looks like this: # /usr/meyer/PPP/cmd00_ack date ifconfig eth0 down cp /dev/null local_address /usr/sbin/dunlink (pppd connect "chat -f /usr0/meyer/PPP/dial_netcom_nantucket" /dev/ttyS0 38400 -detach crtscts modem defaultroute debug name kbmeyer@ix.netcom.com logfile local_address -vjccomp)& echo Login started sleep 60 cat local_address echo Now uploading local_address ftp ftp-www.earthlink.net ========================== # /usr0/meyer/PPP/dial_netcom_nantucket '' ATZ OK ATDT5083321005 CONNECT '' ogin: kbmeyer@ix.netcom.com word: mut11z '' '' =========================== #/usr0/meyer/.netrc #/root/.netrc #/etc/rc.d/init.d/.netrc machine ftp-www.earthlink.net login jochenmeyer passwd mut12z macdef init dir put local_address quit =========================== ## These are my annotations on the files listed above ## # /usr/meyer/PPP/cmd00_ack date ifconfig eth0 down # ethernet protocol competes with ppp protocol # therefore disable ethernet device cp /dev/null local_address # clear local_address /usr/sbin/dunlink # an obsolete routine for disabling eth0 (pppd connect "chat -f /usr0/meyer/PPP/dial_netcom_nantucket" /dev/ttyS0 38400 -detach crtscts modem defaultroute debug name kbmeyer@ix.netcom.com logfile local_address -vjccomp)& # the routine which calls the ppp demon to connect the modem # The ampersand (&) makes the program run in the background # chat is a communications program echo Login started # a marker to indicate progress sleep 60 # sixty second delay to give modems time for handshaking # before calling ftp to upload local_address cat local_address # local_address is actually the logfile for pppd connect, # local_address will be uploaded in its entirety # by the Nantucket computer to # ftp-www.earthlink.net/jochenmeyer and downlaoded # from there by the Belmont computer. echo Now uploading local_address ftp ftp-www.earthlink.net # The uploading is done by the ftp command # which takes instructions from a file .netrc # I never experimented to determine exactly # where ftp looks for .netrc, so I put copies # of .netrc in /usr0/meyer, in /root # (because ftp is called by root) # and in /etc/rc.d/init.d # probably /root is the only essential location # for .netrc ========================== # /usr0/meyer/PPP/dial_netcom_nantucket # This is the modem control file for "chat" '' ATZ OK ATDT5083321005 CONNECT '' ogin: kbmeyer@ix.netcom.com word: mut11z '' '' =========================== # This is .netrc #/usr0/meyer/.netrc #/root/.netrc #/etc/rc.d/init.d/.netrc # I've forgotten the syntax # machine obviously binds .netrc to the ftp command machine ftp-www.earthlink.net login jochenmeyer passwd mut12z macdef init # macdef I interpret as macro definition # init I interpret as initial routine dir # dir is the directory command # which I thought might be useful # to initialize the process put local_address # the put command uploads to the website # the local_address file which is the logfile # that has just been generated by pppd connect # local_address give the information required # to address the Nantucket computer on the Internet. quit ===========================