{"id":471,"date":"2013-02-03T18:47:15","date_gmt":"2013-02-03T17:47:15","guid":{"rendered":"http:\/\/quantum-bits.org\/?p=471"},"modified":"2022-08-12T17:35:45","modified_gmt":"2022-08-12T16:35:45","slug":"a-healthy-dose-of-raspberries","status":"publish","type":"post","link":"https:\/\/www.quantum-bits.org\/?p=471","title":{"rendered":"A healthy dose of raspberries"},"content":{"rendered":"<table width=\"100%\">\n<tbody>\n<tr>\n<td>It&#8217;s been two long weeks, but the <a href=\"http:\/\/www.raspberrypi.org\/\" title=\"Raspberry Pi\" target=\"_blank\" rel=\"noopener\">Rasberry Pi<\/a> I ordered finally arrived this friday. I&#8217;m extremely excited with this tiny thing. Just like messing with my first computer (30 years ago&#8230;) or patching a Linux kernel for the first time.<br \/>\nYep, I really do feel like a kid \ud83d\ude42<\/td>\n<td><img decoding=\"async\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/raspberrypi-logo.png\" alt=\"\" align=\"top\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<br \/>\n<strong>Raspberry Pi<\/strong><\/p>\n<p>The Raspberry Pi is a credit-card-sized computer developed in the UK by the <a href=\"http:\/\/www.raspberrypi.org\/about\" title=\"Raspberry Pi Foundation\" target=\"_blank\" rel=\"noopener\">Raspberry Pi Foundation<\/a>. Though it is designed with the intention of promoting the teaching of computer science in schools, its ability to run GNU\/Linux, combined with its <a href=\"http:\/\/en.wikipedia.org\/wiki\/General_Purpose_Input\/Output\" title=\"GIPO\" target=\"_blank\" rel=\"noopener\">GPIO<\/a> make it one of the greatest general purpose device ever. Its been hacked into a robotic arm with voice recognition, home automation devices, and even a <a href=\"http:\/\/www.engadget.com\/2012\/09\/13\/supercomputer-built-from-raspberry-pi-and-lego\/\" title=\"A supercomputer build from Raspberry Pi and Lego !\" target=\"_blank\" rel=\"noopener\">super computer<\/a> !<\/p>\n<p><center><img decoding=\"async\" title=\"Raspberry Pi\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/rapsberry-unboxing.png\" alt=\"\"><\/center><\/p>\n<p>Technically speaking, for around 30 \u20ac, it packs:<\/p>\n<ul>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">A Broadcom <a href=\"http:\/\/en.wikipedia.org\/wiki\/ARM11\" title=\"ARM 11\" target=\"_blank\" rel=\"noopener\">ARM<\/a> Based <a href=\"http:\/\/en.wikipedia.org\/wiki\/System_on_a_chip\" title=\"System on a Chip\" target=\"_blank\" rel=\"noopener\">SoC<\/a><\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">512MG of SDRAM<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">A 10\/100 ethernet RJ45 connector<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">Two USB ports<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">Video outputs (HDMI &amp; RCA)<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">Audio outputs (Jack &amp; HDMI)<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">A GPIO Bus<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">A SD \/ MMC \/ SDIO card slot for onboard storage<\/span><\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\"><span style=\"color: #666666;\">A  MicroUSB 5V power source<\/span><\/li>\n<\/ul>\n<p>&nbsp;<br \/>\nIt goes like this:<\/p>\n<p><center><img decoding=\"async\" title=\"Raspberry Pi\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/raspberry-pi-schem.png\" alt=\"\"><\/center><\/p>\n<p><strong>Unboxing et initial setup<\/strong><\/p>\n<p>One is immediately struck by how small the Raspberry Pi is. It fits easily in a 8.5 cm x 5.5 x 2 cm box. Appart from the board itself, I bought online a Micro USB power supply and black moulded plastic case. The equipment is completed with a HDM\/VDI converter, a 4Gb SDHC Card and a Wifi USB adapter:<br \/>\n<center><img decoding=\"async\" title=\"Raspberry Pi\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/rapsberry-accessories.png\" alt=\"\"><\/center><\/p>\n<p>I chose:<\/p>\n<ul>\n<li style=\"list-style: square inside; color: #aaaaaa;\">A Belkin SURF N150 USB Micro-Adapter<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">A 4GB SanDisk SDHC card<\/li>\n<\/ul>\n<p>&nbsp;<br \/>\nFirst things first:one has to <a href=\"http:\/\/www.raspberrypi.org\/downloads\" target=\"_blank\" rel=\"noopener\">download<\/a> an Operating System distribution and then copy it to the SD Card. I chose the <a href=\"http:\/\/www.raspbian.org\/\" title=\"Raspbian\" target=\"_blank\" rel=\"noopener\">Raspbian<\/a> Wheezy image, since I&#8217;m far more efficient with Debian-based GNU\/Linux distributions.<\/p>\n<p>Thanks to the HDMI\/VDI adapter, I hooked up the HDMI video output to a 22&#8243; 16\/9 LCD screen. The board was then connected to my home network through the ethernet link, I hooked up a USB (Apple) keyboard and fired up. A few leds blinks later, GNU\/Linux booted up and the initial setup (raspi-config) was automatically launched:<\/p>\n<p><center><img decoding=\"async\" title=\"Raspberry Pi\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/raspi-config.png\" alt=\"\"><\/center><\/p>\n<p>I chose:<\/p>\n<ul>\n<li style=\"list-style: square inside; color: #aaaaaa;\">to expand the initial 2GB root partition to fill the whole 4GB SD Card<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">to enable the SSH server<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">to configure the time zone, locale and keyboard<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">to change the password for the default user (pi)<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">not to start the desktop on boot<\/li>\n<li style=\"list-style: square inside; color: #aaaaaa;\">not to overclock (yet)<\/li>\n<\/ul>\n<p>&#8230; and then got access to the little rascal \ud83d\ude42<\/p>\n<p>It got its network configuration from my DHCP server and was able to upgrade the system:<\/p>\n<pre line=\"1\" lang=\"bash\">apt-get update\napt-get upgrade -u\n<\/pre>\n<p>Then I changed the name of the device. Since the first hacks I was going for were about setting <a href=\"http:\/\/en.wikipedia.org\/wiki\/Airplay\" target=\"_blank\" rel=\"noopener\">AirPlay<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Airprint\" target=\"_blank\" rel=\"noopener\">AirPrint<\/a>, I baptized the device <strong>ApplePie<\/strong>:<\/p>\n<pre line=\"1\" lang=\"bash\">vi \/etc\/hostname\nvi \/etc\/hosts\n<\/pre>\n<p>I plugged in the Belkin wireless adapter, with was recognized right away \ud83d\ude42<br \/>\nI got its MAC address:<\/p>\n<pre line=\"1\" lang=\"bash\">ifconfig wlan0\n<\/pre>\n<p>Which I was added to my wifi Access Point MAC access whitelist. Then a tried a manual connection (WPA disabled):<\/p>\n<pre line=\"1\" lang=\"bash\">iwconfig wlan0 essid quantum-bits\n<\/pre>\n<p>Which also worked right away :). I enabled WPA protection back, edited the usual Debian network configuration files (\/etc\/networks\/interfaces, etc.), added an entry for &#8220;applepie&#8221; in my local DNS and reconfigured my DHCP daemon to serve a static IP to WiFi MAC address of device (since I also want to turn the Raspberry Pi into a small PHP server).<\/p>\n<p>Then I unhooked the ethernet cable, the HDMI connector and the keyboard, halted the system from a SSH connection, put the board into its case:<\/p>\n<p><center><img decoding=\"async\" title=\"Raspberry Pi\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/finalsetup.png\" alt=\"\"><\/center><\/p>\n<p>Et voil\u00e0 ! The little fellow is ready to be hacked into a PHP server, a AirPrint server, a wireless AirPlay (and probably later a Siri Proxy).<\/p>\n<p>And then I cooked a (real) apple Pie to celebrate \ud83d\ude42<\/p>\n<p><center><img decoding=\"async\" title=\"Apple Pie\" src=\"http:\/\/quantum-bits.org\/wp-content\/uploads\/2013\/02\/tarte-pommes.png\" alt=\"\"><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been two long weeks, but the Rasberry Pi I ordered finally arrived this friday. I&#8217;m extremely excited with this tiny thing. Just like messing with my first computer (30 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3853,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[5,21],"tags":[],"_links":{"self":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts\/471"}],"collection":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=471"}],"version-history":[{"count":0,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/posts\/471\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=\/wp\/v2\/media\/3853"}],"wp:attachment":[{"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quantum-bits.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}