Main Idea: LINUX-based Web Cam Recorder
The idea is to have an on-board laptop with web server to snap pics with the webcam every few seconds and record the data to the hard drive. A wireless connection at the house and server will provide for syncronization of the data when the car returns into the range of the base AP.
- Acquire an old laptop with a hard drive and USB port.
- Get a USB web camera. Mount it to the back of the car by the center brake light. Run the cable to the trunk. Get a USB extension cable if nec.
- Get a wireless card that is compatible with LINUX. Recommended, any Prism-based 802.11 card or Orinoco Gold. Prism 802.11g chips are supported in LINUX, but the driver setup can be involved. Do some research and be prepared.
- Get a DC/AC power converter. Run the DC power connect from the lighter or other car outlet back to the trunk of the vehicle.
- If the battery of the laptop is not operable, a small UPS may be desirable for use. Disable the alarms through the console setup, if available. APC brand recommended. Make sure it has "smart" firmware.
- Load LINUX to the laptop. Use a journaling file system, like xfs or reiserfs as the machine will probably experience frequent power loss. Software required: apache, cron, scp, webcam image capture software or scripts, wireless drivers/scripts.
- Setup the wireless connection. It can be configured in any way, so long as you can connect to it from another machine and view the apache dir with the webcam captures.
- Setup LINUX power management for no power alert alarms. Preferably, it will have no GUI (init:3) and no sound drivers as it can get distracting. Set the power management software to shut the system down at 5% on-board battery power. If using a UPS in lieu of an on-board battery, use NUT or APCUPSD and set for shutdown at 3% power. Or you can use both. :)
- Setup webcam capture script/app to collect the image every few seconds. Save it to a local directory in the web hierarchy.
Option: Wireless Sync to a base server
- Ensure the wireless settings do not allow the card to "roam" to any other APs or ad-hoc networks. It should only connect to the base AP.
- The base server in the house requires SSH. Create an account for the laptop to dump files to. Generate keys on the laptop and perform the exchange so that the laptop can connect to it's account on the server automatically with SCP.
- Create a script that will scp all files in the webcam directory to the base server, then delete them if successful.
- Schedule scp script to execute every minute in cron. Throw output to /dev/null.
- An ftp client could be used for this exercise, but is not recommended as it is not encrypted.
Alternate Setup: Bootable LINUX CD
This configuration maximizes the HD space available for recording. Follow the above with the following modifications:
- Acquire an old laptop with hard drive, CD drive and USB port.
- Get a USB pen drive (flash drive, thumb drive). Recommend 1GB space.
- Burn a copy of a bootable linux CD. Knoppix, Debian, etc.
- Modify the BIOS of the laptop. set CDROM as the boot device. set power settings to power it ON in the event of a power failure. Save and exit.
- Boot to the LINUX CD. Establish the settings you want and save to the USB drive.
- You will have to run some rc scripts from the usb drive at bootup to ensure that the web server, sync scripts, and wireless card are running when the machine powers up.
No comments:
Post a Comment