RASPBERRY PIE: MOTION TAKE 1
I have received the first of, what I believe is going to be, many raspberry pies. What a feeling! a piece of electronics the size of a credit card, fully open and accessible for you to attach and hack anything on it!
What I am aiming for with this first one, is to set up a home surveillance system using a network camera (D-link DCS-910) and a program called motion.
The first thing to do is to write the archlinux raspberry pie image (this is the distribution I chose) into an SD car. The instructions can be found on the web page. Just note that while the command "dd bs=1M if=/path/to/archlinux-hf-2012-09-18.img of=/dev/sdX" its being executed, no feedback its given of the progress and we will have to wait patiently until the command its finished executing.
After that, insert the SD into the pie, connect it to a network capable of dhcp and we should be able to ssh into the pie. The user it's root and so its the password. I had some sd corruption problems at first. It's a bad feeling not seeing anything on the screen and not knowing what's wrong. Note that if you see only the red led of power on and nothing more, you should concentrate on the SD as it probably doesn't have a healthy image of the system. I wasted too much time thinking the problem was on the screen connection.
Sorrows aside, ones we are in, the fun begins!Note that after dd-ing the image into the SD, we are most likely not taking advantage of the full size of de SD. Follow this guide to do that. Then, update the system, install netcfg and set an static ip. In order to stop the current dhcp daemon run: systemctl disable firstname.lastname@example.org. For assigning static IP to all kind of devices I own, I use a technique I red somewhere on the internet which comes down to assigning names and numbers following the periodic table of elements.
A little bit more basic setups: updated the locale, time zone and hostname of the device (this goes with the name of the periodic table), create requires users and groups and changed all the passwords...
Finally it's time to install motion. They don't recommend running it as root, so I copied the config file to my home directory. After pointing the target directory for the files and the camera's ip and credentials, motion was working!