<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SLB Labs</title>
	<atom:link href="http://www.slblabs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slblabs.com</link>
	<description>Close the World, Open the nExt.</description>
	<lastBuildDate>Wed, 05 Dec 2012 15:04:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Raspberry Pi &#8211; VPN Server</title>
		<link>http://www.slblabs.com/2012/10/12/rpi-vpn/</link>
		<comments>http://www.slblabs.com/2012/10/12/rpi-vpn/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 19:05:18 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Daemon]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Poptop]]></category>
		<category><![CDATA[pptp]]></category>
		<category><![CDATA[pptpd]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://pi.slblabs.com/slblabs/?p=591</guid>
		<description><![CDATA[Connecting from the University network,]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Connecting from the University network, I often incur into a very annoying issue, that of blocked ports. I have therefore decided to configure a personal <strong>VPN (Virtual Private Network)</strong> server where to connect to from university and have true freedom of access to whichever service I would need to use.<br />
<span id="more-591"></span><br />
The configuration is pretty straight forward, starting by installing the <strong>Poptop (pptpd)</strong> VPN daemon as follows:<br />
<br /><code># apt-get install ppp pptpd</code></p>
<p>To specify the local IP address range the VPN server should assign to the client, edit the file <code>/etc/pptpd.conf</code>:<br />
<br /><code># nano /etc/pptpd.conf</code></p>
<p>and add the IP range at the bottom of the file:<br />
<br /><code>localip 192.168.1.xxx<br />
remoteip 192.168.1.110-120</code></p>
<p>Where <code>xxx</code> is the last byte of the RasPi ip of your choice, and <code>110-120</code>, for instance, the last byte of the custom range of ip assigned to the clients.<br />
<br />
To configure the VPN users, proceed as follows:<br />
<br /><code># nano /etc/ppp/chap-secrets</code></p>
<p>and add each user with the syntax:<br />
<br /><code>username * password *</code></p>
<p>Adapt the line above as needed.<br />
<br />
Restart the daemon to apply the changes:<br />
<br /><code># service pptpd restart</code></p>
<p>Finally, we need to enable IP forwarding:<br />
<br /><code># nano /etc/sysctl.conf</code></p>
<p>by adding or uncommenting:<br />
<br /><code>net.ipv4.ip_forward=1</code></p>
<p>and apply the changes without the need to reboot the machine:<br />
<br /><code># sysctl -p</code></p>
<p><strong>Important note</strong>: For the VPN server to work, we need to enable on the router <strong>IP protocol 47 (GRE)</strong> and forward the <strong>TCP port 1723</strong> to the RasPi ip address.</p>
<div class="shr-publisher-591"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/10/12/rpi-vpn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi – Wireless configuration</title>
		<link>http://www.slblabs.com/2012/09/27/rpi-wifi/</link>
		<comments>http://www.slblabs.com/2012/09/27/rpi-wifi/#comments</comments>
		<pubDate>Thu, 27 Sep 2012 19:47:32 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Digicom]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[USBWAVE54]]></category>
		<category><![CDATA[WiFi]]></category>
		<category><![CDATA[Wireless]]></category>
		<category><![CDATA[ZD1211]]></category>
		<category><![CDATA[Zydas]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=563</guid>
		<description><![CDATA[Wireless configuration on Raspbian, and]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft" alt="" src="https://lh4.googleusercontent.com/-T7ekm-dQrM8/UGSYVuEVgLI/AAAAAAAALqI/KKkkK98PRJ8/s150/2086026-7950.jpg" title="USBWAVE54" /></p>
<p>Wireless configuration on Raspbian, and for my particular dongle &#8211; a <strong>Digicom USBWAVE54</strong> &#8211; was pretty straight forward. It requires two steps:</p>
<ul>
<li>Drivers installation</li>
<li>Wireless interface configuration</li>
</ul>
<p><span id="more-563"></span><br />
&nbsp;</p>
<ul>
<li>
<h3>Drivers installation</h3>
<p>This section is dongle dependent. I had an old <strong>Digicom USBWAVE54</strong> Dongle, which is based on a <strong>Zydas ZD1211</strong> chipset, so here&#8217;s how I proceeded to install the correct drivers for my dongle:<br />
<br /><code># apt-get install zd1211-firmware</code></p>
<p>which will install the <strong>zd1211rw</strong> kernel module, loaded when needed.
</li>
<li>
<h3>Wireless interface configuration</h3>
<p>Once the correct drivers have been installed, we can test whether everything is working so far by plugging the dongle in and checking the kernel messages with:<br />
<br /><code>$ dmesg</code></p>
<p>To check the available wireless networks around, run:<br />
<br /><code>$ iwlist wlan0 scan</code></p>
<p>It&#8217;s time now to configure the connection parameters for the WiFi interface. Let&#8217;s create the configuration file for your WiFi network of choice:<br />
<br /><code># nano /etc/wpa.conf</code></p>
<p>and put the following data in it:<br />
<br /><code>network={<br />
ssid="YOUR-SSID"<br />
proto=RSN<br />
key_mgmt=WPA-PSK<br />
pairwise=CCMP TKIP<br />
group=CCMP TKIP<br />
psk="WPA-PASSWORD"<br />
}</code></p>
<p>change <code>YOUR-SSID</code> and <code>WPA-PASSWORD</code> accordingly.<br />
If you want to protect your wpa-password from curious eyes, you can use <code>wpa_passphrase</code> to save an encrypted version of it in the config file as follows:<br />
<br /><code>wpa_passphrase  YOUR-SSID WPA-PASSWORD >> /etc/wpa.conf</code></p>
<p>Now add the following lines in <code>/etc/network/interfaces</code> to use a dynamic IP assigned by dhcp:<br />
<br /><code>allow-hotplug wlan0<br />
auto wlan0<br />
iface wlan0 inet dhcp</code></p>
<p>or the following to use a static IP configuration:<br />
<br /><code>allow-hotplug wlan0<br />
auto wlan0<br />
iface wlan0 inet static<br />
&nbsp;&nbsp;address 192.168.1.xxx<br />
&nbsp;&nbsp;netmask 255.255.255.0<br />
&nbsp;&nbsp;network 192.168.1.0<br />
&nbsp;&nbsp;broadcast 192.168.1.255<br />
&nbsp;&nbsp;gateway 192.168.1.1</code></p>
<p>Where <code>xxx</code> is the last byte of the local ip of your choice.<br />
Adapt the lines above to your actual network configuration, your router may have a different ip/submask to deal with.<br />
Then just restart the networking service with:<br />
<br /><code>/etc/init.d/networking restart</code></p>
</li>
</ul>
<div class="shr-publisher-563"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/09/27/rpi-wifi/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi &#8211; Webcam streaming</title>
		<link>http://www.slblabs.com/2012/09/26/rpi-webcam-stream/</link>
		<comments>http://www.slblabs.com/2012/09/26/rpi-webcam-stream/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 17:24:43 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[C270]]></category>
		<category><![CDATA[Creative]]></category>
		<category><![CDATA[fswebcam]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Logitech]]></category>
		<category><![CDATA[mjpg]]></category>
		<category><![CDATA[mjpg-streamer]]></category>
		<category><![CDATA[mjpg_streamer]]></category>
		<category><![CDATA[motion]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[Stream]]></category>
		<category><![CDATA[Surveillance]]></category>
		<category><![CDATA[TImelapse]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[VF0260]]></category>
		<category><![CDATA[Webcam]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=496</guid>
		<description><![CDATA[Now it&#8217;s time to make]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft" alt="" src="https://lh6.googleusercontent.com/-z9B2pjd-NRU/UGLnzmnNccI/AAAAAAAALpY/CxN0viA3uAE/s200/60356_39324-crop.jpg" title="VF0260" /></p>
<p>Now it&#8217;s time to make my old <strong>Creative Live! Cam Vista IM (VF0260)</strong> Webcam work on the RasPi, I also tried a new <strong>Logitech C270 HD</strong> Webcam and they both work flawlessly out of the box.<br />
I have tried three softwares for the webcam, which I previously tested on my desktop machine running Fedora and I wanted to try them also on the Pi. These are:</p>
<ul>
<li>fswebcam</li>
<li>motion</li>
<li>mjpeg-streamer</li>
</ul>
<p>
Let&#8217;s now have a look at them.<br />
<span id="more-496"></span></p>
<ul>
<li>
<h4>fswebcam:</h4>
<p>fswebcam is the simplest and easiest way to have your webcam capture single frames, also programmatically at a specified timer interval. Of course it&#8217;s also possible to call fswebcam from a bash script anytime it&#8217;s required, but this is another story.<br />
To install fswebcam simply run:<br />
<br /><code># apt-get install fswebcam</code></p>
<p>One of the nice features of fswebcam is that it&#8217;s possible to add a footer to the capture, where you can specify your text of choice.<br />
For instance, this is the command I ran fswebcam with:<br />
<br /><code>$ fswebcam -r 640x480 -S 15 --flip h --jpeg 95 --shadow --title "SLB Labs" --subtitle "Home" --info "Monitor: Active @ 1 fpm" --save home.jpg -q -l 60</code></p>
<p>
switches:<br />
<code>-r</code>: frame resolution width*height<br />
<code>-S</code>: numbers of frame to skip for the webcam to capture a stable and well illuminated frame<br />
<code>--flip</code>: frame flipping, in this case horizontal<br />
<code>--jpeg</code>: jpeg compression quality<br />
<code>--shadow</code>: adds a drop shadow to the footer text<br />
<code>--title, --subtitle, --info</code>: different fields of the footer text<br />
<code>--save</code>: path and file name where to saved the frame to<br />
<code>-q</code>: leaves the process running in background<br />
<code>-l</code>: takes a snapshoot every specified number of seconds<br />
<br />
Many more options are described in the man pages of fswebcam<br />
<code>$ man fswebcam</code></p>
<p>This is the output frame sample given by the previous command:<br />
<img class="alignleft" alt="" src="https://lh6.googleusercontent.com/-cW22ok_wmKs/UGL6ZUTSskI/AAAAAAAALp4/CmTs2Vaxaig/s580/home580.jpg" title="fswebcam sample" /></p>
<p>Okay, this wasn&#8217;t exactly streaming, so let&#8217;s get into more serious stuff.
</li>
<li>
<h4>motion:</h4>
<p>motion is a rather complete surveillance system with no fancy stuff and straight to the point, yet very customizable. Among what it can do, it is capable of motion detection, frame recording, video recording, timelapse.<br />
Its installation is as simple as usual:<br />
<br /><code># apt-get install motion</code></p>
<p>It comes with a plain web configuration interface, but first of all we need to specify which port motion will run on. Let&#8217;s now edit its configuration file:<br />
<br /><code># nano /etc/motion/motion.conf</code></p>
<p>and look for the settings <code>webcontrol_port</code> (default <code>8080</code>) and <code>stream_port</code> (default <code>8081</code>), which refers to the web configuration interface and the streaming port, respectively. Change them as needed or simply get aware of their default values.<br />
To start motion run:<br />
<br /><code># motion</code></p>
<p>You can now access to the web configuration interface by pointing your browser to:<br />
<br /><code>http://RPI-IP:webcontrol_port</code></p>
<p>where <code>RPI-IP</code> is the local IP address of your RasPi and <code>webcontrol_port</code> is the same port set in the config file.<br />
That said, it&#8217;s now possible to browse all the available settings.<br />
Some of them that are worth a mention are:<br />
<code>width</code> and <code>height</code>: frame dimensions, camera dependent<br />
<code>framerate</code>: maximum number of frames to be captured per second<br />
<code>threshold</code>: number of pixels in the image that must change to trigger the motion detection<br />
<code>quality</code>: compression level for frame capture<br />
<code>ffmpeg_timelapse</code>: number of seconds between which to take a frame shoot for timelapse recording<br />
<code>ffmpeg_bps</code>: constant bitrate for video encoding (ignored for timelapses)<br />
<code>ffmpeg_variable_bitrate</code>: variable bitrate for video encoding (using a variable bitrate is the only way to get decent timelapse videos, this setting is used for <i>both</i> video motion recording and timelapses)<br />
and of course the different images/video/timelapses paths where to save the captures to are among the settings you might want to customize.<br />
Another important feature of motion is that it&#8217;s possible to execute any particular command anytime an event starts and/or a picture is captured, this is achieved by the setting <code>on_event_start</code> and <code>on_picture_save</code>.<br />
For instance it&#8217;s possible to send an email and upload the saved picture to an ftp server by setting <code>on_event_start</code> and <code>on_picture_save</code> as follows:<br />
<br /><code>on_event_start sendmail -f YOURFROMEMAIL@gmail.com -t YOURTOEMAIL@gmail.com -u \"SUBJECT\" -m \"Movement has been detected on: %d %m %Y. The time of the movement was: %H:%M (Hour:Minute). The Pictures have been uploaded to your FTP account.\" -s smtp.gmail.com:25 -xu YOURGMAIL@gmail.com -xp YOURGMAILPASSWORD</code><br />
<code>on_picture_save wput ftp://USERNAME:PASSWORD@YOUTFTP.COM %f</code></p>
<p>Like said above, the video stream will be available pointing the browser here:<br />
<br /><code>http://RPI-IP:stream_port</code></p>
</li>
<li>
<h4>mjpeg-streamer:</h4>
<p>Another streaming software that I tried was mjpeg-streamer, which is not as features complete as motion, but it is perfect if you just need a video stream. It also provides a web interface to display the stream. I couldn&#8217;t find a binary version of mjpeg-streamer for arm processor, so I had to compile it myself as follows.<br />
<br />
First off we need mjpg-streamer source code from > <a href="http://sourceforge.net/projects/mjpg-streamer/files/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz/download" title="here" target="_blank">here</a> < and save it in your folder of choice. I usually save and extract the source packages under <code>/usr/local/src</code>.<br />
Position yourself whichever folder the archive has been saved into, and extract the archive with the command:<br />
<br /><code># tar xvzf mjpg-streamer-r63.tar.gz</code></p>
<p>In order to compile mjpg-streamer, we need the libjpeg8-dev libraries, so let's install them first:<br />
<br /><code># apt-get install libjpeg8-dev</code></p>
<p>I also needed to create a symbolic link of one header file which, to me, resulted missing:<br />
<br /><code># ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h</code></p>
<p>Now everything should be set to proceed with the compilation process. Switch to mjpg-streamer newly created folder and compile it with:<br />
<br /><code># cd mjpg-streamer-r63</code><br />
<code># CFLAGS+="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard" make</code></p>
<p>And that's it. To run mpjg-streamer type the following command:<br />
<br /><code>$ export LD_LIBRARY_PATH=.</code><br />
<code>$ ./mjpg_streamer -i './input_uvc.so -d /dev/video0 -r 640x480 -f 15' -o './output_http.so -w ./www -p 8080'</code></p>
<p>
switches:<br />
<code>-i</code>: configure the input section<br />
<code>-d</code>: device selection, in case of multiple webcams<br />
<code>-r</code>: frame resolution width*height<br />
<code>-f</code>: frame per seconds<br />
<code>-o</code>: configure the output section<br />
<code>-w</code>: website folder<br />
<code>-p</code>: port<br />
<br />
It's now possible to get access to the web interface at the address:<br />
<br /><code>http://RPI-IP:8080</code></p>
</li>
</ul>
<div class="shr-publisher-496"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/09/26/rpi-webcam-stream/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi &#8211; Firmware and Updates</title>
		<link>http://www.slblabs.com/2012/08/17/rpi-fw-updates/</link>
		<comments>http://www.slblabs.com/2012/08/17/rpi-fw-updates/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 23:03:08 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[rpi-update]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=486</guid>
		<description><![CDATA[Now that the system is]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Now that the system is installed on the SD card and the ssh service has been configured properly, we&#8217;re going to take care of the system and firmware updates; few words have to be said about the system partitioning scheme.<br />
The Raspbian installation consist of two partitions: the fat16 boot partition, that contains the firmware needed to the Pi to boot, and the ext4 system partition.<br />
<span id="more-486"></span><br />
Raspbian is based on Debian, therefore it uses <strong>apt</strong> as package handling utility. To proceed with a full system update, simply issue the following command:<br />
<br /><code># apt-get update &#038;&#038; apt-get upgrade</code></p>
<p>If you desire to continue, confirm it with <code>Y</code> when asked by the interactive update process.<br />
The first part of the command will update the packets&#8217; list to the latest version available, whilst the second part of the command will actually download and install the updated packages.<br />
Just a reminder that the downloaded packages will be kept in the apt cache folder located at <code>/var/cache/apt/archives</code>. It&#8217;s possible to get rid of such files as follows:<br />
<br /><code># apt-get clean</code></p>
<p>The update process could possibly also update the kernel, but for a more up to date copy of the firmware we&#8217;ll count on the <code>rpi-update</code> utility.<br />
As mentioned by the instructions found <a href="https://github.com/Hexxeh/rpi-update" title="rpi-update" target="_blank">here</a> at the git repository of the project, to install the tool, run the following command as root:<br />
<br /><code># wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update &#038;&#038; chmod +x /usr/bin/rpi-update</code></p>
<p>this would download and set the permissions to the rpi-update script.<br />
To succesfully run the updater, the package <strong>git-core</strong> is needed, installing it by:<br />
<br /><code># apt-get install git-core</code></p>
<p>Now everything is ready to proceed with the firmware update:<br />
<br /><code># rpi-update</code></p>
<p>Let it run for a couple of minutes and if a new version of the firmware is available, it&#8217;ll be downloaded to the boot partition and will be available upon reboot.</p>
<p>One more thing to say is about the memory split setting. The Pi is equipped with <strong>256MB</strong> of RAM shared between the system and the GPU. It is possible to pick one among the following memory split choices:<br />
<code><br />
SYS/GPU<br />
128/128<br />
192/ 64<br />
224/ 32<br />
240/ 16<br />
</code><br />
copying the relative file located in <code>/boot</code> over the file <code>start.elf</code>.<br />
For instance, to give 240MB to the system and 16MB to the GPU, do as follows:<br />
<br /><code># cp /boot/arm240_start.elf /boot/start.elf</code></p>
<p>Reboot the system to make the changes final.<br />
<br /><code># reboot</code></p>
<div class="shr-publisher-486"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/08/17/rpi-fw-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi &#8211; SSH and static IP</title>
		<link>http://www.slblabs.com/2012/08/16/rpi-ssh-ip/</link>
		<comments>http://www.slblabs.com/2012/08/16/rpi-ssh-ip/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 13:41:46 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA["IP Address"]]></category>
		<category><![CDATA[Address]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=417</guid>
		<description><![CDATA[By the time I received]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>By the time I received my RasPi, I didn&#8217;t have an usb keyboard yet, so my first concern was about how to use it without the keyboard from the very first boot. It wasn&#8217;t clear whether the ssh daemon would be active by default or not, and I&#8217;ve also got to know that for some distributions, or even among different updates of the same distribution, its default state changed over time.<br />
I found out that in Raspbian, ssh is installed by default but it&#8217;s not configured to start up automatically since the first boot.<br />
<span id="more-417"></span><br />
Being it a <strong><a href="http://en.wikipedia.org/wiki/UNIX_System_V" title="SysV" target="_blank">SystemV</a></strong> style OS, I proceeded as follow to enable the ssh daemon at boot.<br />
After plugging the SD card in, and mounting the system partition on the SD card to my Fedora installation, I created the symbolic links for ssh to start at boot time as follows:<br />
<br /><code># ln -s etc/init.d/ssh etc/rc2.d/S02ssh</code></p>
<p>and repeated the process for the other runlevels of interest, in my case from <strong>2</strong> to <strong>5</strong>.<br />
Now the ssh service would start at boot time and would accept incoming connections.</p>
<p>I could have stopped here with the configuration to be able to access my brand new Pi, but I also wanted to configure the network with a static IP, for my own convenience and ease of NAT rules configuration on the router.<br />
Raspbian comes with the nano text editor, so let&#8217;s get into the interface configuration by editing the config file as follows:<br />
<br /><code># nano etc/network/interfaces</code></p>
<p>change the <code>iface eth0 inet dhcp</code> line to <code>iface eth0 inet static</code> and add the further details:<br />
<br /><code>&nbsp;&nbsp;address 192.168.1.xxx<br />
&nbsp;&nbsp;netmask 255.255.255.0<br />
&nbsp;&nbsp;network 192.168.1.0<br />
&nbsp;&nbsp;broadcast 192.168.1.255<br />
&nbsp;&nbsp;gateway 192.168.1.1</code></p>
<p>Where <code>xxx</code> is the last byte of the local ip of your choice.<br />
Adapt the lines above to your actual network configuration, your router may have a different ip/submask to deal with.</p>
<p>Now it&#8217;s time to boot the Pi and connect to it via ssh:<br />
<br /><code>$ ssh pi@192.168.1.xxx</code></p>
<p>or if you need to use graphical applications<br />
<br /><code>$ ssh -X pi@192.168.1.xxx</code></p>
<p>Note that the default pair of user/password for Raspbian is:<br />
<br /><code>user: pi</code><br />
<code>password: raspberry</code></p>
<p><strong>Very important note</strong>: once you get access to your Pi, do regenerate the SSH keys.<br />
Since Raspbian (and basically all the other distributions) are distributed as prepared images to copy onto the SD card, it is not safe to keep the default SSH keys.<br />
To regenerate the keys proceed as follows:<br />
<br /><code># rm /etc/ssh/ssh_host_*</code><br />
<code># dpkg-reconfigure openssh-server</code></p>
<div class="shr-publisher-417"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/08/16/rpi-ssh-ip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi &#8211; Preparing the SD card</title>
		<link>http://www.slblabs.com/2012/08/16/rpi-sd-setup/</link>
		<comments>http://www.slblabs.com/2012/08/16/rpi-sd-setup/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 12:58:26 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA["SD Card"]]></category>
		<category><![CDATA[DD]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[SD]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=419</guid>
		<description><![CDATA[Download the image: First step]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft" alt="" src="https://lh5.googleusercontent.com/-CKIg2HpQ7D8/UCzszk8CYKI/AAAAAAAALj0/oW_EAWOWt4Y/s0/sd-sdsdxpa-032g.jpg" title="SD" /></p>
<h3>Download the image:</h3>
<p>First step would of course be that to choose and install a linux distribution on the SD card.<br />
I&#8217;m personally a <strong>RedHat/Fedora</strong> user since quite some time but I thought, for the RasPi, to give <strong>Debian</strong> a go. I decided to install <strong>Raspbian “wheezy”</strong>, an optimised version of Debian for the Raspberry Pi, and it comes with <strong>LXDE</strong> as default desktop environment, for those who care about it.<br />
You can download the image from the <a href="http://www.raspberrypi.org/downloads" title="RaspberryPi Downloads" target="_blank">RaspberryPi Downloads</a> page.<br />
&nbsp;<br />
<span id="more-419"></span></p>
<h3>Write the image on the SD card:</h3>
<p>The Raspbian image, and most likely that of other distributions, comes in some sort of zipped archive, being it zip, gzip, bzip2 and so on. So before proceeding, unzip the image with your tool of choice.</p>
<ul>
<li>
<h4>Writing the image in Linux:</h4>
<p>To write the image in Linux, plug the SD card into the reader, or the SD-to-USB adapter and check the device node with:<br />
<br /><code>$ dmesg | tail</code></p>
<p>That will give you the device node associated with the SD card.<br />
I assume here to obtain <strong>/dev/sdb</strong> as device node, and <strong>/dev/sdb1</strong> as partition node.<br />
Be sure to unmount the partition before proceeding with the image writing.<br />
<br /><code># umount /dev/sdb1</code></p>
<p>Now to write the image onto the SD card, issue the following command:<br />
<br /><code># dd bs=1M if=/path/to/the/image/file.img of=/dev/sdb</code></p>
<p>Note that the dd command must be issued onto the device node, not onto the partition itself.<br />
At this point the image will be written to the SD card. Remember to sync any possible buffers with:<br />
<br /><code>$ sync</code></p>
<p>When done, remove the SD card and you&#8217;re ready to go.
</li>
<li>
<h4>Writing the image in Windows:</h4>
<p>To write the image in Windows, simply download <a href="https://launchpad.net/win32-image-writer" title="Win32DiskImager" target="_blank">Win32DiskImager</a>.<br />
Plug the SD and execute Win32DiskImager. It will let you select the image to write on the card, select the device to write the image to, and you&#8217;re done.
</li>
</ul>
<div class="shr-publisher-419"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/08/16/rpi-sd-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi has arrived</title>
		<link>http://www.slblabs.com/2012/08/15/rpi/</link>
		<comments>http://www.slblabs.com/2012/08/15/rpi/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 20:05:20 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[E14]]></category>
		<category><![CDATA[Farnell]]></category>
		<category><![CDATA[RPi]]></category>
		<category><![CDATA[RS]]></category>
		<category><![CDATA[Sony]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=409</guid>
		<description><![CDATA[It&#8217;s been almost one month]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft" alt="" src="https://lh5.googleusercontent.com/-c6pwo8eQqXg/UAZsNn3UTXI/AAAAAAAALOM/taSWdqRxPh8/s200/2012%2520-%25201.jpg" title="Raspberry Pi" height="200" />It&#8217;s been almost one month since I received my <a href="http://www.raspberrypi.org/" title="Raspberry Pi" target="_blank">Raspberry Pi</a>. I actually received two of them, both on day 18th of July, one from <strong>Farnell/Element14</strong> via Royal Mail and the other one from <strong>RS Components</strong> via DHL, which I got for my friend Giuseppe. So far so good, the little RasPi is behaving very well, and I&#8217;m testing its stability keeping it up and running, checking cpu and memory usage.<br />
I installed the system on a <strong>Sony 8GB SDHC Class 4</strong> card, which I got along with my Sony HX9V camera, bought in Hong Kong a couple of years ago. I&#8217;m surprised by the speed of this sd card, achieving <strong>17.4MB/s</strong> in read speed and <strong>11.8MB/s</strong> in write speed, checked on the RasPi itself with a <strong>dd</strong> test.<br />
As PSU I&#8217;m using my HTC Legend phone charger, rated <strong>5V/1A</strong>, which is flawlessly powering it up, by now, for one good week already.<br />
I plan to write some posts as I go developing stuff with it, hopefully and time permitting, so if you are interested, stay tuned : )</p>
<div class="shr-publisher-409"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/08/15/rpi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growing a Durian tree</title>
		<link>http://www.slblabs.com/2012/08/05/growing-a-durian-tree/</link>
		<comments>http://www.slblabs.com/2012/08/05/growing-a-durian-tree/#comments</comments>
		<pubDate>Sun, 05 Aug 2012 09:30:46 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Durian]]></category>
		<category><![CDATA[Hong Kong]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=390</guid>
		<description><![CDATA[Back from my second round]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft" alt="" src="https://lh5.googleusercontent.com/-tzBPPxCY32o/UB5Frfs5wtI/AAAAAAAALV8/xUZptJpb2fE/s200/DSC04128.JPG" title="Durian tree" height="200" />Back from my second round in Hong Kong and I brought back some nice <strong>Durian</strong> seeds to try to plant. After about two months in the soil, a little plant has come out and in three weeks since then it has grown up to 14 cm already!<br />
<a href="https://plus.google.com/photos/109139109807490312992/albums/5768703364547666529" target="_blank">Here</a> some more pics of my little growing Durian tree.<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;</p>
<div class="shr-publisher-390"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/08/05/growing-a-durian-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HDR Two International Finance Centre (2IFC)</title>
		<link>http://www.slblabs.com/2012/04/28/hdr-2ifc/</link>
		<comments>http://www.slblabs.com/2012/04/28/hdr-2ifc/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 18:06:07 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[HDR]]></category>
		<category><![CDATA[2IFC]]></category>
		<category><![CDATA[Hong Kong]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=379</guid>
		<description><![CDATA[HDR Two International Finance Centre]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div align="center"><a href="https://plus.google.com/photos/109139109807490312992/albums/5739852188031423825/5740491444200602754" target="_blank"><img src="https://lh6.googleusercontent.com/-I7l_5_Wrr5g/T6pSjde-_II/AAAAAAAAK8o/SGI_1ooiyBw/s802/DSC02978_79_80_tonemapped.jpg" alt="Two International Finance Centre (2IFC)" /></a></div>
<p>HDR Two International Finance Centre (2IFC)<br />
Hong Kong, 2012.04.28.</p>
<p>&#8211;<br />
Artwork Copyright © 2012 Salvatore La Bua</p>
<p>This work is released under the terms of:</p>
<p><u>Creative Commons lincense</u> [<a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">by-nc-nd</a>]<br />
 <i>Attribution<br />
 Non Commercial<br />
 No Derivative Works<br />
 </i></p>
<div class="shr-publisher-379"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/04/28/hdr-2ifc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HDR Horse</title>
		<link>http://www.slblabs.com/2012/04/24/hdr-horse-taiwai/</link>
		<comments>http://www.slblabs.com/2012/04/24/hdr-horse-taiwai/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 15:27:15 +0000</pubDate>
		<dc:creator>SLB</dc:creator>
				<category><![CDATA[HDR]]></category>
		<category><![CDATA[Hong Kong]]></category>

		<guid isPermaLink="false">http://www.slblabs.com/?p=383</guid>
		<description><![CDATA[HDR Horse, Tai Wai, Sha]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div align="center"><a href="https://plus.google.com/photos/109139109807490312992/albums/5739836817227461569/5739865990373134946" target="_blank"><img src="https://lh3.googleusercontent.com/-AuNQK6B91Vc/T6gZtQaJUmI/AAAAAAAAK7A/z42qCOE9LX0/s800/DSC02486_7_8_tonemapped.jpg" alt="Horse, Tai Wai" /></a></div>
<p>HDR Horse, Tai Wai, Sha Tin District.<br />
Hong Kong, 2012.04.24.</p>
<p>&#8211;<br />
Artwork Copyright © 2012 Salvatore La Bua</p>
<p>This work is released under the terms of:</p>
<p><u>Creative Commons lincense</u> [<a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">by-nc-nd</a>]<br />
 <i>Attribution<br />
 Non Commercial<br />
 No Derivative Works<br />
 </i></p>
<div class="shr-publisher-383"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.slblabs.com/2012/04/24/hdr-horse-taiwai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
