<?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>Blog de Maurice Svay</title>
	<atom:link href="http://svay.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://svay.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 09 May 2013 09:14:31 +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>Review of the first FirefoxOS phone : the Geeksphone Keon</title>
		<link>http://svay.com/blog/review-of-the-first-firefoxos-phone-the-geeksphone-keon/</link>
		<comments>http://svay.com/blog/review-of-the-first-firefoxos-phone-the-geeksphone-keon/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 06:56:44 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[Webstandards]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2431</guid>
		<description><![CDATA[Following Palm&#8217;s trails, Mozilla is pushing its own phone OS based on Web technologies. Not to end the same way, Mozilla is betting on openness by allowing anyone to build FirefoxOS phones and apps. The corporation has also decided to start with emerging markets, leaving the western markets to Android, iOS, Windows8 and others. The first dedicated [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://svay.com/blog/wp-content/uploads/2013/04/geeksphone-keon.jpg"><img class="aligncenter size-large wp-image-2432" alt="geeksphone-keon" src="http://svay.com/blog/wp-content/uploads/2013/04/geeksphone-keon-1024x409.jpg" width="750" height="299" /></a></p>
<p>Following Palm&#8217;s trails, Mozilla is pushing its own phone OS based on Web technologies. Not to end the same way, Mozilla is betting on openness by allowing anyone to build FirefoxOS phones and apps. The corporation has also decided to start with emerging markets, leaving the western markets to Android, iOS, Windows8 and others.</p>
<div>The first dedicated handsets just came out last week. Built by the spanish company <a href="http://www.geeksphone.com">Geeksphone</a>, the Keon and the Peak <strong>are not targeted to end users: they are development devices</strong>. I ordered the cheapest one to see what the user experience is like, and maybe create an app in the future.</div>
<div><span id="more-2431"></span></div>
<h2>The device</h2>
<p>Even if the Keon <strong>is meant to be used for development</strong>, I guess some people will want to use it as their main phone (even if they shouldn&#8217;t). For them, here is what the hardware feels like.</p>
<p>Costing approximatively 100€, the Keon is on par with similarly priced Android devices. The device is light and not too thick (approx. 12mm).</p>
<p>The body is made of a rubberized and soft plastic that feels pretty good. The device has one 3MP camera on the back, one micro USB port, one audio jack, one loudspeaker, a power button and a volume rocker.</p>
<p>Even if the color is rather unusual for a phone, the industrial design is pretty good for a cheap phone.</p>
<p>Now let&#8217;s see what&#8217;s inside.</p>
<p>The CPU is a 1GHz Qualcomm Snapdragon, the small internal storage (4GB) is dedicated to the system and cannot store media files. You will have to add a micro SD to take pictures, watch videos or listen to MP3 files. The device supports 3G, WiFi N, Bluetooth 2.1 EDR, has light and proximity sensors, a gyroscope and a GPS. Considering they are targeting emerging markets, the included FM radio is a smart addition. Consumers will be happy to be able to listen to music without having to consume their data plan or purchase tunes.</p>
<p>The screen is probably the most important part of the phone and is probably the most disappointing. The resolution (320&#215;480) is standard for the price, but the quality of the display isn&#8217;t great. The most visible problem is color rendering. I don&#8217;t know how many colors the screen can display, but we can clearly see dithering and banding problems on gradients. Most people wouldn&#8217;t mind, but as a designer, it&#8217;s hard not to notice.</p>
<div><a href="http://svay.com/blog/wp-content/uploads/2013/04/P1060471.jpg"><img class="aligncenter size-full wp-image-2440" alt="P1060471" src="http://svay.com/blog/wp-content/uploads/2013/04/P1060471.jpg" width="1024" height="576" /></a></div>
<div></div>
<div>The battery is a 1580 mAh Li-Ion pack that probably won&#8217;t last more than one day of moderate use. Like most smartphones, you will probably have to charge the device every night.</div>
<p>Overall, the Keon is what you can expect from a 100€ phone : a device with compromises to make it affordable. Can the OS bring more value to it?</p>
<h2>The operating system</h2>
<p><a href="http://svay.com/blog/wp-content/uploads/2013/04/P1060477.jpg"><img class="aligncenter size-full wp-image-2439" alt="P1060477" src="http://svay.com/blog/wp-content/uploads/2013/04/P1060477.jpg" width="1024" height="576" /></a></p>
<h3>What&#8217;s included</h3>
<p>At the very beginning, the OS was simply meant to launch a browser, with a name to show that: Boot2Gecko. Now, the OS has been rebranded to FirefoxOS and offers what&#8217;s expected from a smartphone OS:</p>
<div>
<ul>
<li>a lockscreen</li>
<li>a homescreen/app launcher</li>
<li>a notification center</li>
<li>a search engine</li>
<li>a task switcher</li>
<li>a set of standard apps: telephone, contacts, messages, e-mail, calendar, camera, clock, videos, photos, music, radio, HERE maps, usage, browser and marketplace.</li>
</ul>
</div>
<p>There are no widget or live tiles. If you like to get information at a glance, you&#8217;re out of luck.</p>
<h3>The visual design</h3>
<p>The interface feels a bit dated and has some way to go to match what Android and iOS offer.</p>
<p>Icons are not always consistent and feel amateurish sometimes. Font rendering is OK and the standard font is a nice and modern sans serif. Animations can be found everywhere and are smooth most of the time.</p>
<p>Globally, the UI is responsive, except when the CPU is struggling with a computing intensive task obviously.</p>
<h3>User experience</h3>
<p>On the user experience side, FirefoxOS has borrowed many things from iOS and Android, and feels familiar if you&#8217;re coming from one of these worlds.</p>
<p>The lockscreen doesn&#8217;t do much. It displays the time and allows you to access the camera quickly or to unlock the phone. Both actions requires 2 gestures: a swipe to reveal the buttons, and a tap to activate the selected option. It&#8217;s more work than on the iPhone for instance.</p>
<p>The homescreen is similar to the iOS one. It can only be scrolled on one dimension, which is a good thing I think. Knowing where you are is easy, and you simply flick through the &#8220;cards&#8221; to browse.</p>
<p>There are 3 kinds of cards. The first one is a blank one that only displays the time. I&#8217;m not quite sure what its purpose is.<br />
When you scroll to the right, you&#8217;ll get the second type of cards. These cards are shelves for app icons.<br />
When you scroll to the left, you&#8217;ll get to a search engine, to find stuff in your phone or on the Web.<br />
Just like iOS, you can long-tap icons to enter &#8220;reorganize&#8221; mode so that you can delete or move apps.</p>
<div><a href="http://svay.com/blog/wp-content/uploads/2013/04/homescreen.jpg"><img class="aligncenter size-full wp-image-2433" alt="homescreen" src="http://svay.com/blog/wp-content/uploads/2013/04/homescreen.jpg" width="960" height="480" /></a></div>
<div></div>
<div></div>
<div>The notification center is inspired by Android. You pull it from the status bar and it provides a list of the last notifications. The notification center also has 5 buttons. The first ones turn on or off WiFi, data, Bluetooth and airplane mode. The last one is a shortcut to Settings.</div>
<div><a href="http://svay.com/blog/wp-content/uploads/2013/04/notifications.jpg"><img class="aligncenter size-full wp-image-2435" alt="notifications" src="http://svay.com/blog/wp-content/uploads/2013/04/notifications.jpg" width="320" height="480" /></a></div>
<div></div>
<div></div>
<div>The task switcher can be accessed by pressing the home button during 2 seconds. This feature reminds me of webOS with its card metaphor. You can even throw a card away (swipe up) to delete it.</div>
<div>
<div id="attachment_2446" class="wp-caption aligncenter" style="width: 660px"><a href="http://svay.com/blog/wp-content/uploads/2013/04/task-switcher1.jpg"><img class="size-full wp-image-2446" alt="Firefox OS on the left, webOS on the right" src="http://svay.com/blog/wp-content/uploads/2013/04/task-switcher1.jpg" width="650" height="480" /></a><p class="wp-caption-text">Firefox OS on the left, webOS on the right</p></div>
</div>
<div></div>
<div></div>
<div>The bundled apps are fairly straightforward and usually offer the minimum feature set.</div>
<div></div>
<div>Unfortunately, it also applies to the browser, which is disappointing. Besides opening web pages, it only has tabs, bookmarks, history and settings to clear browsing data. That is literally all. Nothing more. No private browsing, no way to change the default search engine, no sharing, no synchronization.</div>
<p>After a few days of use, I also stumbled on a few bugs. I&#8217;m running Boot2Gecko 1.0.1.0-prerelease which is a developers preview, so it was to be expected. According to Mozilla, updates are coming and will fix those issues.</p>
<div>
<h2>Conclusion</h2>
</div>
<div>At the end, FirefoxOS is a promising OS for entry level phones but Mozilla still has some work to do to make it a solid operating system. For a developer preview, the OS is already impressive and I can&#8217;t wait to see what innovative paradigms Mozilla can bring to the game. It&#8217;s nice to have an actual device for development.</div>
<div>I&#8217;ve already started to develop apps for the OS. I&#8217;ll probably write a new article to tell you what developing for this platform is like.</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/review-of-the-first-firefoxos-phone-the-geeksphone-keon/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Quelles solutions pour regarder des vidéos Youtube sur une connexion Free.fr ?</title>
		<link>http://svay.com/blog/quelles-solutions-pour-regarder-des-videos-youtube-sur-une-connexion-free-fr/</link>
		<comments>http://svay.com/blog/quelles-solutions-pour-regarder-des-videos-youtube-sur-une-connexion-free-fr/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 20:57:35 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2412</guid>
		<description><![CDATA[Comme tous les abonnées de Free, je ne peux quasiment pas regarder de vidéos sur Youtube. Bien que ma connexion soit de la fibre, le débit pour lire les vidéos est catastrophique. Il suffit de voir ce test de vitesse fourni par Youtube pour se rendre compte que c&#8217;est inutilisable. &#160; Comme de son côté, [...]]]></description>
				<content:encoded><![CDATA[<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> Comme tous les abonnées de Free, je ne peux quasiment pas regarder de vidéos sur Youtube. Bien que ma connexion soit de la fibre, le débit pour lire les vidéos est catastrophique. Il suffit de voir ce test de vitesse fourni par Youtube pour se rendre compte que c&#8217;est inutilisable.</p>
<p><a href="http://svay.com/blog/wp-content/uploads/2013/04/youtube-stats.png"><img alt="youtube-stats" src="http://svay.com/blog/wp-content/uploads/2013/04/youtube-stats.png" width="580" height="340" /></a></p>
<p>&nbsp;</p>
<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> Comme de son côté, Free n&#8217;a visiblement pas l&#8217;intention d&#8217;agir, j&#8217;ai cherché des solutions.</p>
<h3><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> Changer de fournisseur d&#8217;accès à Internet</h3>
<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> Suggéré par <a href="http://twitter.com/edasfr">@edasfr</a> et <a href="http://twitter.com/Voulf">@Voulf</a>, cette solution est un peu radicale. Étant donné que le problème est uniquement entre Free et Google, il suffit de passez chez un autre fournisseur pour retrouver un confort de lecture acceptable. Je ne pense pas le faire dans l&#8217;immédiat, mais ce serait la vraie bonne solution.</p>
<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--></p>
<h3>Contourner les serveurs de cache de Youtube</h3>
<div>Le <a href="http://korben.info/free-youtube-solution-chargement-video.html">lien</a> suggéré par <a href="http://twitter.com/Artusamak">@Artusamak</a> montre que le goulot d&#8217;étranglement entre Free et Youtube concerne surtout les serveurs de cache du dernier. J&#8217;imagine que ces serveurs hébergent des copies des vidéos destinées à la lecture et sont censés améliorer la performance de lecture. Mais comme la liaison entre ces serveurs et Free est saturée, c&#8217;est raté.</div>
<div>L&#8217;idée pour contourner le problème serait de lire les vidéos directement depuis les serveurs principaux de Youtube.</div>
<div>Pour cela, on peut écrire des règles de firewall ou utiliser un fichier de configuration de proxy dans son navigateur.</div>
<div></div>
<div>Vous pouvez par exemple copier-coller le code suivant et le mettre dans un fichier .pac. Hébergez-le et faites pointer votre navigateur dessus :</div>
<pre>function FindProxyForURL(url, host) {
    if (isInNet(host,"173.194.52.0","255.255.252.0") ) return "PROXY localhost:1";
    return "DIRECT";
}</pre>
<div>Dans Firefox, ça se configure dans les Préférences &gt; Avancé &gt; Réseau &gt; Connexion &gt; Adresse de configuration automatique du proxy.</div>
<div></div>
<div>Cette solution a l&#8217;air de marcher, mais plusieurs personne m&#8217;ont indiqué que certaines vidéos ne peuvent pas être lues, car pas disponibles.</div>
<h3>Passer par un serveur proxy</h3>
<div>Une autre solution est de passer par un serveur tiers, qui ferait passer le trafic réseau par des liens moins engorgés.</div>
<div>Contrairement à la solution précédente, cette méthode est généralement payante. Dans mon cas, j&#8217;ai testé cinq services:</div>
<div>
<ul>
<li><a href="http://www.vpnbook.com"><strong>VPNBook</strong></a>, un service de VPN avec des serveurs en Roumanie : gratuit;</li>
<li><a href="http://www.hidemyass.com/"><strong>HideMyAss.com</strong></a>, une liste de proxy &#8220;anonymes&#8221; (suggérée par <a href="http://twitter.com/ValentinSteph">@ValentinSteph</a>) : gratuit;</li>
<li><strong><a href="http://www.proxfree.com">ProxFree</a></strong>, un proxy Web : gratuit</li>
<li><a href="http://aws.amazon.com/fr/ec2/"><strong>Amazon EC2</strong></a>, serveur virtuel à la demande. Offre Instance micro : prix très variable selon la durée et charge d&#8217;utilisation (éligible à une année gratuite pour les nouveaux clients). Le serveur allumé tout le mois coûterait environ 15€, auxquels il faut ajouter le coût de la bande passante;</li>
<li><strong><a href="http://www.ovh.com/fr/vps/vps-classic.xml">OVH VPS</a></strong>, serveur virtuel (suggéré par <a href="http://twitter.com/madsgraphics">@madsgraphics</a>). Offre Classic 1 : 5€ par mois.</li>
</ul>
<h4>Les proxys publics</h4>
<p>D&#8217;après mes tests, <strong>les proxys ou VPN gratuits sont généralement inutilisables</strong>.</p>
<p>Dans la liste de proxys <a href="http://hidemyass.com/proxy-list/">http://hidemyass.com/proxy-list/</a>, j&#8217;ai pioché quelques serveurs et aucun ne semblait fonctionner. J&#8217;ai rapidement abandonné.</p>
<p>VPNBook semblait intéressant avec son proxy OpenVPN. Mais au final, je n&#8217;ai pas réussi à avoir une connexion stable à cause d&#8217;un problème de DNS. J&#8217;ai également laissé tomber cette solution.</p>
<p>ProxFree semble fonctionner à peu près, mais c&#8217;est essentiellement pour un besoin ponctuel.</p>
<h4>Amazon EC2</h4>
<p>Pour Amazon EC2, il est assez facile et rapide de créer un serveur linux. En moins de 10 minutes, on peut choisir un type de serveur, sa localisation et se retrouver connecté en SSH à sa machine virtuelle.</p>
<p>D&#8217;aileurs, c&#8217;est avec SSH qu&#8217;on va pouvoir faire un tunnel pour rediriger le trafic. Il suffit de taper cette commande dans un terminal (sous Mac ou Linux) :</p>
<pre>ssh -D 8080 user@monserveur.amazonaws.com</pre>
</div>
<p>Il faut ensuite indiquer au navigateur d&#8217;utiliser localhost sur le port 8080 comme un proxy SOCKS5.</p>
<p>Cette solution semble fonctionner, mais la bande passante semble un peu limitée. Avec mon serveur en Amérique du Nord, je peux télécharger à environ 2Mb, avec des hauts et des bas.<br />
<strong>Les vidéos se chargent un peu mieux avec Amazon EC2, mais il y&#8217;a tout de même des coupures où le trafic tombe à zéro.<br />
</strong>Ce proxy pourra sinon servir à consulter des contenus qui ne sont limités aux USA, comme Pandora ou Hulu. Et comme le serveur ne coûte rien quand il est éteint, on peut le lancer que lorsqu&#8217;on en a besoin.</p>
<h4>OVH</h4>
<p>Pour OVH, la démarche est très similaire à Amazon. On commande et on lance son serveur en quelques minutes. D&#8217;après mon test, les performances sont meilleures qu&#8217;avec Amazon, et j&#8217;arrive à lire des vidéos quasiment sans interruption, et même en HD 720p. <strong>OVH est donc la solution que je vais garder pour le moment</strong>. Reste à voir dans la durée si ça tiendra.</p>
<p>Si vous avez d&#8217;autres techniques, n&#8217;hésitez-pas à les poster dans les commentaires !</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/quelles-solutions-pour-regarder-des-videos-youtube-sur-une-connexion-free-fr/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>DIY Raspberry Pi Airplay Speaker for less than 70€</title>
		<link>http://svay.com/blog/diy-raspberry-pi-airplay-speaker-for-less-than-70euro/</link>
		<comments>http://svay.com/blog/diy-raspberry-pi-airplay-speaker-for-less-than-70euro/#comments</comments>
		<pubDate>Sat, 12 Jan 2013 18:36:13 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2391</guid>
		<description><![CDATA[Most Airplay speakers are expensive. They usually cost between 150€ and 600€. I decided to build a cheap Airply Speaker myself for less than 70€. If you want to build one too, here are the instructions with links to get supplies. To build a small Airplay speaker, here is what you will need: 1 plastic [...]]]></description>
				<content:encoded><![CDATA[<p>Most Airplay speakers are expensive. They usually cost between 150€ and 600€. I decided to build a cheap Airply Speaker myself for less than 70€. If you want to build one too, here are the instructions with links to get supplies.</p>
<p><img class="aligncenter size-large wp-image-2392" alt="raspberrypi_diy_airplay_speaker_components" src="http://svay.com/blog/wp-content/uploads/2013/01/raspberrypi_diy_airplay_speaker_components-1024x682.jpg" width="750" height="499" /></p>
<p>To build a small Airplay speaker, here is what you will need:</p>
<ul>
<li>1 plastic box: 8€ from Muji</li>
<li>1 power adapter: 7€ from <a href="http://www.rs-components.com/raspberrypi">RS Components</a></li>
<li>1 Raspberry Pi: 32€ from <a href="http://www.rs-components.com/raspberrypi">RS Components</a></li>
<li>1 Edimax EW-7811un USB WiFi dongle: 10€ from <a href="http://www.amazon.fr/Edimax-EW-7811UN-Nano-Adaptateur-sans/dp/B003MTTJOY/ref=sr_1_1?ie=UTF8&amp;qid=1358012974&amp;sr=8-1">Amazon</a></li>
<li>1 pair of USB powered speakers: 8€ from <a href="http://www.pearl.fr/peripheriques/audio-pc/enceintes-mono-et-2_0/haut-parleurs-actifs-usb_PX1244.html">Pearl.fr</a></li>
<li>1 SD Card: 0€. You probably already have one.</li>
</ul>
<h1>Assembling</h1>
<p>Extract the speaker drivers and the amplifier from the USB powered speakers. The amplifier happens to be a LM4863 and the drivers have a diameter of 5cm.</p>
<p>Cut two holes on the side with a 4.5cm with a hole saw (that goes on an electric drill). The hole must be a little smaller than the driver for them not to fall into the box.</p>
<p>Place the speaker drivers from the outside of the box, and glue the border from the inside of the box.</p>
<p>Solder the speakers to the amplifier.</p>
<p><a href="http://www.raspberrypi.org/downloads">Install the official Debian</a>, <a href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=35&amp;t=17957#p185054">install Shairport</a>, <a title="Setting up a WiFi connection on the RaspberryPi" href="http://svay.com/blog/setting-up-a-wifi-connection-on-the-raspberrypi/">configure the WiFi connection</a>. Make sure that WiFi connection and the shairport software are launched at boot time.</p>
<p>Plug the amplifier to the Raspberry Pi with the audio jack and the USB plug.</p>
<p>Pack everything into the box.</p>
<p>Plug the power.</p>
<p>That&#8217;s all!</p>
<p>The sound is fairly loud (enough for a kitchen or a bathroom) but the amplifier suffers from some minor interference noise. To make it look cooler, I will probably wrap it in a felt sleeve and add a cork top. I might also add a 5V battery to make it autonomous, but it would increase the cost of the projet.</p>
<p>At the end, the device is cheap, stylish and sounds pretty good for the cost. Feel free to ask questions in the comments.</p>
<p><img class="aligncenter size-large wp-image-2393" alt="raspberrypi_diy_airplay_speaker" src="http://svay.com/blog/wp-content/uploads/2013/01/raspberrypi_diy_airplay_speaker-1024x682.jpg" width="750" height="499" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/diy-raspberry-pi-airplay-speaker-for-less-than-70euro/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Setting up a WiFi connection on the RaspberryPi</title>
		<link>http://svay.com/blog/setting-up-a-wifi-connection-on-the-raspberrypi/</link>
		<comments>http://svay.com/blog/setting-up-a-wifi-connection-on-the-raspberrypi/#comments</comments>
		<pubDate>Wed, 19 Dec 2012 19:48:54 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2378</guid>
		<description><![CDATA[I&#8217;ve recently tried to setup a WiFi connection with the RaspberryPi and encountered some issues: the connection didn&#8217;t start automatically and it wasn&#8217;t stable. I&#8217;m using an Edimax EW-7811Un USB dongle, which is supposed to be supported out of the box with Raspian Wheezy (2012-12-16). After researching the issue, I finally have a configuration that [...]]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-2386" alt="raspberrypi-wifi" src="http://svay.com/blog/wp-content/uploads/2012/12/raspberrypi-wifi.jpg" width="580" height="340" /></p>
<p>I&#8217;ve recently tried to setup a WiFi connection with the RaspberryPi and encountered some issues: the connection didn&#8217;t start automatically and it wasn&#8217;t stable. I&#8217;m using an Edimax EW-7811Un USB dongle, which is supposed to be supported out of the box with Raspian Wheezy (2012-12-16).</p>
<p>After researching the issue, I finally have a configuration that works reliably. Here are the steps I&#8217;ve followed.</p>
<h2>Setting up the configuration</h2>
<p>Edit the /etc/network/interfaces file to look like this:</p>
<pre>auto lo

iface lo inet loopback
iface eth0 inet dhcp

#auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp</pre>
<p>Then add your WiFi parameters to /etc/wpa_supplicant/wpa_supplicant.conf.<br />
Here are my parameters to connect to my freebox (French ISP router).</p>
<pre>network={
        ssid="YOURSSID"
        scan_ssid=1
        key_mgmt=WPA-PSK
        proto=WPA
        psk="YOURPASSWORD"
}</pre>
<p>At this point, the you should be able to start the connection with this command:</p>
<pre>sudo ifup wlan0</pre>
<p>In some cases, you might need to do <code>sudo ifup wlan0</code> first.</p>
<h2>Connect automatically when booting</h2>
<p>To make the connection work when the RaspberryPi boots, I have added a few lines to /etc/rc.local (<a href="http://stinebaugh.info/auto-start-your-wifi-on-raspberry-pi/">source</a>) :</p>
<pre>echo "Starting WiFi..."
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
sleep .5s
dhclient wlan0
echo "WiFi should be started"

exit 0</pre>
<h2>Keep the connection alive</h2>
<p>To make sure that the connection stays up, I&#8217;ve done two things.</p>
<p>First, disable the power management of the WiFi dongle. Create a new /etc/modprobe.d/8192cu.conf file with this content (<a href="http://forum.doozan.com/read.php?6,8618">source</a>):</p>
<pre>options 8192cu rtw_power_mgnt=0 rtw_enusbss=0</pre>
<p>Then, make the RaspberryPi ping the router every minute. Open your crontab:</p>
<pre>$ crontab -e</pre>
<p>and add this line at the end :</p>
<pre>*/1 * * * * ping -c 1 192.168.0.254</pre>
<p>Replace the IP address by the actual IP address of your router.</p>
<p>It took me some time to get it right, but now the Pi connection seems to work fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/setting-up-a-wifi-connection-on-the-raspberrypi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CheaterPress</title>
		<link>http://svay.com/blog/cheaterpress/</link>
		<comments>http://svay.com/blog/cheaterpress/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 07:36:27 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2371</guid>
		<description><![CDATA[LetterPress is an addictive iOS game where you have to combine letters to form words. CheaterPress is an HTML5 app I built to help you find inspiration (ahem). The app was only built as a personal challenge. Use it responsibly. (And I promise not to use it myself). The cool thing is how it works: you take a [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.atebits.com/letterpress/">LetterPress</a> is an addictive iOS game where you have to combine letters to form words. CheaterPress is an HTML5 app I built to help you find inspiration (ahem). The app was only built as a personal challenge. Use it responsibly. (And I promise not to use it myself).</p>
<p>The cool thing is how it works: you take a screenshot of the game (iPhone4, iPhone5, iPad) and you upload it. What you get is a list of matching words. I might detail how it works later.</p>
<p>The app currently works fine on desktop browsers but is still buggy on Safari iOS. The code is on github : <a href="https://github.com/mauricesvay/CheaterPress">https://github.com/mauricesvay/CheaterPress</a></p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/cheaterpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ImageResolver.js</title>
		<link>http://svay.com/blog/imageresolver-js/</link>
		<comments>http://svay.com/blog/imageresolver-js/#comments</comments>
		<pubDate>Fri, 28 Sep 2012 08:26:23 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2363</guid>
		<description><![CDATA[I presented ImageResolver.js during the last ParisJS meetup. ImageResolver.js is a small javascript library that tries to extract a relevant image from any URL. The lib runs in the browser and has to two design goals: be extensible, by using plugins to support more websites; save resources, by limiting the number of HTTP requests needed [...]]]></description>
				<content:encoded><![CDATA[<p>I presented <a href="https://github.com/mauricesvay/ImageResolver">ImageResolver.js</a> during the last <a href="http://parisjs.org/#meetup-23">ParisJS meetup</a>. ImageResolver.js is a small javascript library that tries to extract a relevant image from any URL. The lib runs in the browser and has to two design goals:</p>
<ul>
<li>be extensible, by using plugins to support more websites;</li>
<li>save resources, by limiting the number of HTTP requests needed for image resolution. Some plugins make zero HTTP requests and guess the image URL right away.</li>
</ul>
<p>ImageResolver.js currently supports 9gag, Imgur (widely used on Reddit), flickr (requires an API key) and Instagram. For regular webpages, it will try OpenGraph meta tags (popularized by Facebook) then fallback to HTML parsing.</p>
<p>Here are the slides of my presentation (in french):</p>
<p><script async class="speakerdeck-embed" data-id="506335f1d6efd30002010a61" data-ratio="1.3333333333333333" src="//speakerdeck.com/assets/embed.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/imageresolver-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Où sont les Vélibs ?</title>
		<link>http://svay.com/blog/ou-sont-les-velibs/</link>
		<comments>http://svay.com/blog/ou-sont-les-velibs/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 06:12:40 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2337</guid>
		<description><![CDATA[Cela va faire un mois que j&#8217;ai un pris mon abonnement Vélib. Traverser la ville à vélo est plutôt plaisant, il fait presque beau et la plupart des parisiens sont en vacances. Tout se passe bien, à condition de réussir à trouver un vélo. Si comme moi vous avez déjà consulté votre appli mobile pour [...]]]></description>
				<content:encoded><![CDATA[<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->Cela va faire un mois que j&#8217;ai un pris mon abonnement Vélib. Traverser la ville à vélo est plutôt plaisant, il fait presque beau et la plupart des parisiens sont en vacances. Tout se passe bien, à condition de réussir à trouver un vélo. Si comme moi vous avez déjà consulté votre appli mobile pour constater qu&#8217;il y&#8217;a environ zéro vélo disponible dans les alentours (en comptant ceux en panne), vous vous êtes sûrement demandé :<br />
&#8220;<em>Mais ils sont où ces vélos, bordel ?</em>&#8220;.</p>
<p>Pour satisfaire ma curiosité, et peut-être la vôtre, j&#8217;ai décidé de représenter les mouvements des vélos dans Paris pendant 24 heures. Pour cela, je n&#8217;ai pas posé de GPS sur tous les vélos, mais j&#8217;ai simplement &#8220;emprunté&#8221; les infos fournies par le site <a href="http://www.velib.paris.fr/">http://www.velib.paris.fr</a> pour les visualiser sur une carte. Encore une bonne occasion pour faire de la visualisation de données sur des moyens de transport.</p>
<div id="attachment_2340" class="wp-caption aligncenter" style="width: 594px"><a href="http://svay.com/experiences/velib/" target="_blank"><img class=" wp-image-2340 " title="Lancer l'application de visualisation" src="http://svay.com/blog/wp-content/uploads/2012/08/velib-dataviz-1024x504.png" alt="Carte des vélibs à Paris" width="584" height="287" /></a><p class="wp-caption-text">Lancer l&#8217;application de visualisation</p></div>
<h3>Qu&#8217;est-ce qu&#8217;on apprend ?</h3>
<p>Les données que j&#8217;ai collectées concernaient le 31 juillet 2012, un beau mardi d&#8217;été.</p>
<ul>
<li>La nuit, pas trop de surprises, il y a peu de mouvements;</li>
<li>À partir de 8h, les stations commencent à se clairsemer. Les Parisiens qui ne sont pas en vacances se rendent au boulot;</li>
<li>Ce mouvement continue jusqu&#8217;à 10h environ;</li>
<li>La journée, la plupart des vélos sont concentrés dans les arrondissements centraux et le sud de Paris;</li>
<li>À partir de 18h jusqu&#8217;à 20h, les gens rentrent chez eux, permettant aux stations de l&#8217;est et du nord de refaire le plein.</li>
</ul>
<p>J&#8217;ai également noté que les stations rive gauche ont toujours plus de vélos que les stations rive droite. Il faudrait vérifier les données pour voir si elles ont simplement plus de capacité ou si elles sont juste moins utilisées.</p>
<h3>Comment ça marche ?</h3>
<p>Sur le plan technique, l&#8217;outil de visualisation est assez simple. Réalisé en HTML5, il s&#8217;appuie sur les bibliothèques jQuery et <a href="http://modestmaps.com">ModestMaps</a>. La (jolie) carte est signée <a href="http://maps.stamen.com/">Stamen Design</a> et les données ont été sournoisement collectées par moi-même.</p>
<p>Tout ça ne me permet pas forcément de trouver plus facilement un vélo, mais au moins je sais <em>où sont ces vélos, bordel !</em></p>
<div></div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/ou-sont-les-velibs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Compte rendu du hackathon Music Hack Paris 2012</title>
		<link>http://svay.com/blog/compte-rendu-du-hackathon-music-hack-paris-2012/</link>
		<comments>http://svay.com/blog/compte-rendu-du-hackathon-music-hack-paris-2012/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 11:45:10 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2320</guid>
		<description><![CDATA[Ce dimanche avait lieu le Music Hack Paris à la Cartonnerie. J&#8217;ai pu assister aux démonstrations des projets. Quand on arrive à la Cartonnerie, on tombe d&#8217;abord sur une simple vitrine dépolie avec une petit écriteau &#8220;Music Hack Paris&#8221;. L&#8217;entrée où je retire mon badge est une pièce étroite. Mais dès qu&#8217;on passe cette étape, [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><img class="wp-image-2322 aligncenter" title="music-hack-paris-01" src="http://svay.com/blog/wp-content/uploads/2012/04/music-hack-paris-01.jpg" alt="Google devrel Manager presenting the demos" width="580" height="376" /></p>
<p>Ce dimanche avait lieu le Music Hack Paris à la Cartonnerie. J&#8217;ai pu assister aux démonstrations des projets.</p>
<p>Quand on arrive à la Cartonnerie, on tombe d&#8217;abord sur une simple vitrine dépolie avec une petit écriteau &#8220;Music Hack Paris&#8221;. L&#8217;entrée où je retire mon badge est une pièce étroite. Mais dès qu&#8217;on passe cette étape, on arrive au milieu d&#8217;un lieu à la décoration faite de poutres et vieilles machines. Tout le monde s&#8217;active. Il ne reste plus qu&#8217;une heure aux participants pour finir leur projet.</p>
<p style="text-align: center;"><img class="aligncenter" title="music-hack-paris-02" src="http://svay.com/blog/wp-content/uploads/2012/04/music-hack-paris-02.jpg" alt="Photo of La Cartonnerie" width="584" height="312" /></p>
<p>L&#8217;objectif des hackers et des musiciens était d&#8217;innover autour de la création, de la consommation et de la découverte musicale. L&#8217;ambiance est décontractée et bruyante. Les percussions, la guitare et les sons synthétiques se mélangent avec le bruit des claviers d&#8217;ordinateurs.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-2324" title="music-hack-paris-03" src="http://svay.com/blog/wp-content/uploads/2012/04/music-hack-paris-03.jpg" alt="Hackers tinkering with physical objects and Arduinos" width="584" height="364" /></p>
<p>Ce hackathon organisé par l&#8217;UNECO, le Google Cultural Institute et Joshfire avait pour cadre la <a href="http://www.unesco.org/new/fr/unesco/events/prizes-and-celebrations/celebrations/international-days/jazz-day/">Journée Internationale du Jazz</a>. Et au final, une quinzaine d&#8217;équipes ont sacrifié leurs heures de sommeil pour présenter leur &#8220;hack&#8221; dimanche après-midi.</p>
<p>Un des projets qui a attiré mon attention est InstaTube. L&#8217;équipe est partie du constat suivant : beaucoup de gens écoutent la musique grâce aux diaporamas accompagnés de musique dont regorge YouTube. Ils ont donc créé un outil simple qui permet de générer un diaporama à partir d&#8217;un fichier MP3 et de quelques mots clés. L&#8217;application se charge de trouver des images et des vidéoclips, de remixer le tout en rythme et d&#8217;envoyer le tout sur YouTube. La démo a parfaitement fonctionné et le résultat est peut être plus convaincant que ce qu&#8217;on trouve d&#8217;habitude sur le site de partage de vidéos.</p>
<p>Les autres projets étaient aussi intéressants mais peut être moins aboutis. On a pu voir des instruments de musique à base Kinect, de la musique générée par capteurs de téléphones, des sculptures métalliques musicales, des pendules pilotant un arduino, un arduino faisant des percussions et des séquenceurs web collaboratifs en temps réel. Les élections du dimanche faisaient même partie de l&#8217;événement avec le hack de <a href="http://twitter.com/sylvinus">@sylvinus</a> qui faisait chanter des tweets sur la Marseillaise, en Javascript. Bref, beaucoup d&#8217;imagination de la part des participants.</p>
<p>Pour mieux vous rendre de compte de ce qu&#8217;il s&#8217;est passé, j&#8217;ai monté rapidement une vidéo qui montre quelques-unes des démos qui ont été présentées.</p>
<p><iframe src="http://www.youtube.com/embed/9E8k3_hTCbo?rel=0" frameborder="0" width="580" height="295"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/compte-rendu-du-hackathon-music-hack-paris-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hacking RFID with NodeJS</title>
		<link>http://svay.com/blog/hacking-rfid-with-nodejs/</link>
		<comments>http://svay.com/blog/hacking-rfid-with-nodejs/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 18:50:49 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2267</guid>
		<description><![CDATA[tl;dr: you can write JS code (see below) to read RFID tags with NodeJS. Last week-end, I found my old RFID reader in a drawer. It&#8217;s a mir:ror, made by Violet, you know, the company that invented Wi-Fi rabbits. The device is a USB HID device and used to ship with a lousy app that [...]]]></description>
				<content:encoded><![CDATA[<p><em>tl;dr: you can write JS code (see below) to read RFID tags with NodeJS.</em></p>
<p><iframe width="570" height="340" src="http://www.youtube.com/embed/XuvjUeyzwg0" frameborder="0" allowfullscreen></iframe></p>
<p>Last week-end, I found my old RFID reader in a drawer. It&#8217;s a mir:ror, made by Violet, you know, the company that invented <a href="http://www.karotz.com/">Wi-Fi rabbits</a>. The device is a USB HID device and used to ship with a lousy app that could trigger a few predefined actions. But the company is kind of dead now and the driver is no longer available.</p>
<p>So, how hard would it be to write a driver that could do whatever I want? The thing is that I need it to work on OSX. And it would be great if programs could be written in JS, because it&#8217;s a language I&#8217;m comfortable with.</p>
<p>Being a lazy programmer, I first searched the Web for existing drivers. I found some software written in <a href="https://github.com/leh/ruby-mirror">ruby</a> and <a href="http://sourceforge.net/projects/libmirror/">.Net</a>. The first one expects the mir:ror to be available in /dev, which is not the case on my Mac (no idea why). The second one is for Windows obviously. Moreover, I don&#8217;t know any of these languages.</p>
<p>Out of luck, I wondered: is it possible to communicate with USB HID devices in NodeJS? Thirty seconds of googling later, I stumbled on this cool node extension: <a href="https://github.com/hanshuebner/node-hid">Node HID</a> that does exactly what I&#8217;m looking for (you could also program keyboards, keypads, mice, etc.).</p>
<p>The next step was to code the driver. Hopefully, the protocol is simple and documented on this blog: <a href="http://blog.nomzit.com/2010/01/30/decoding-the-mirror-comms-protocol/">http://blog.nomzit.com/2010/01/30/decoding-the-mirror-comms-protocol/</a>.</p>
<p>Below is the code of the driver. It can read RFID tags, detect when the device is upside down, and disable the annoying lights and sound.</p>
<pre>var HID = require('HID');

var devices = new HID.devices(7592, 4865);
var hid;
if (!devices.length) {
  console.log("No mir:ror found");
} else {
  hid = new HID.HID(devices[0].path);
  hid.write([03, 01]); //Disable sounds and lights
  hid.read(onRead);
}

function onRead(error, data) {
  var size;
  var id;

  //get 64 bytes
  if (data[0] != 0) {

    console.log("\n" + data.map(function (v) {return ('00' + v.toString(16)).slice(-2)}).join(','));

    switch (data[0]) {
    case 1:
      //Orientation change
      switch (data[1]) {
      case 4:
        console.log("-&gt; mir:ror up");
        break;
      case 5:
        console.log("-&gt; mir:ror down");
        break;
      }
      break;
    case 2:
      //RFID
      switch (data[1]) {
      case 1:
        console.log("-&gt; RFID in");
        break;
      case 2:
        console.log("-&gt; RFID out");
        break;
      }

      size = data[4];
      id = (data.splice(0)).splice(5, size);
      console.log(id.map(function (v) {return ('00' + v.toString(16)).slice(-2)}).join(','));
      break;
    }
  }
  hid.read(onRead);
}</pre>
<p>Now that NodeJS can react to RFID tags, we can do all sorts of things, like switching between spaces on a Mac. Check out the video to see a demo.</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/hacking-rfid-with-nodejs/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>CSS Color Palette Extractor</title>
		<link>http://svay.com/blog/css-color-palette-extractor/</link>
		<comments>http://svay.com/blog/css-color-palette-extractor/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 23:34:42 +0000</pubDate>
		<dc:creator>Maurice Svay</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Webstandards]]></category>

		<guid isPermaLink="false">http://svay.com/blog/?p=2293</guid>
		<description><![CDATA[There are already many web apps that extract colors from CSS. But none of them seemed to do what I need them to do. So I built my own. My goal was to create a tool that would help me consolidate the palette of an ever growing CSS. To achieve this goal, I needed a [...]]]></description>
				<content:encoded><![CDATA[<p><!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->There are already many web apps that extract colors from CSS. But none of them seemed to do what I need them to do. So I built my own.</p>
<div id="attachment_2294" class="wp-caption aligncenter" style="width: 580px"><img class=" wp-image-2294 " title="twitter-bootstrap-extracted-palette" src="http://svay.com/blog/wp-content/uploads/2012/02/twitter-bootstrap-extracted-palette.png" alt="Twitter Bootstrap extracted palette" width="570" height="171" /><p class="wp-caption-text">Twitter Bootstrap extracted palette</p></div>
<div id="attachment_2303" class="wp-caption aligncenter" style="width: 580px"><img class=" wp-image-2303 " title="facebook-extracted-palette" src="http://svay.com/blog/wp-content/uploads/2012/02/facebook-extracted-palette.png" alt="Facebook extracted palette" width="570" height="171" /><p class="wp-caption-text">Facebook extracted palette</p></div>
<p>My goal was to create a tool that would help me consolidate the palette of an ever growing CSS. To achieve this goal, I needed a tool that can:</p>
<div>
<ul>
<li>extract all colors from the CSS code. Most extractors rely on regular expression to perform this task. It may work for most cases, but they tend to fail with rgba or named values.</li>
<li>order colors in a sensible way. I want colors on one side and greyscale on another. I also want colors ordered by hue. Ordering hex values by alphabetical order doesn&#8217;t make sense.</li>
<li>roughly show how much a color is used. This way, I know that lesser used colors might be merged with dominant colors. Obviously, more occurrences in CSS doesn&#8217;t mean that the color will be more present on the website. But that&#8217;s better than nothing.</li>
</ul>
</div>
<p>The result is CSS Color Palette Extractor, a pure JS app that does what I need. You can <strong><a href="http://svay.com/experiences/css-color-palette-extractor/">try the demo</a></strong> and <strong><a href="https://github.com/mauricesvay/css-color-palette-extractor">fork it on github</a></strong>.</p>
<p>On the technical side, the app uses the great <a href="http://glazman.org/JSCSSP/">CSS parser written by Daniel Glazman</a> to extract color values. It also includes <a href="https://github.com/brehaut/color-js">code from Andrew Brehaut</a> for color management/conversion. My own code is a bit rough but does the job. There are a few known issues. I haven&#8217;t found how to make the parser work with media queries. If you&#8217;re doing responsive design, simply extract medium per medium. Also, my app cannot extract colors from gradient backgrounds.</p>
<p>It&#8217;s sometimes nice to step back from code and analyze what&#8217;s going on. I hope that CSS Color Palette Extractor will help you to do just that. If you want to use the code, feel free to <a href="https://github.com/mauricesvay/css-color-palette-extractor">fork it on github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://svay.com/blog/css-color-palette-extractor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: svay.com @ 2013-05-18 21:03:04 by W3 Total Cache -->