Review of the first FirefoxOS phone : the Geeksphone Keon

geeksphone-keon

Following Palm’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 handsets just came out last week. Built by the spanish company Geeksphone, the Keon and the Peak are not targeted to end users: they are development devices. I ordered the cheapest one to see what the user experience is like, and maybe create an app in the future.
Continue reading

Quelles solutions pour regarder des vidéos Youtube sur une connexion Free.fr ?

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’est inutilisable.

youtube-stats

 

Comme de son côté, Free n’a visiblement pas l’intention d’agir, j’ai cherché des solutions.

Changer de fournisseur d’accès à Internet

Suggéré par @edasfr et @Voulf, 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’immédiat, mais ce serait la vraie bonne solution.

Contourner les serveurs de cache de Youtube

Le lien suggéré par @Artusamak montre que le goulot d’étranglement entre Free et Youtube concerne surtout les serveurs de cache du dernier. J’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’est raté.
L’idée pour contourner le problème serait de lire les vidéos directement depuis les serveurs principaux de Youtube.
Pour cela, on peut écrire des règles de firewall ou utiliser un fichier de configuration de proxy dans son navigateur.
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 :
function FindProxyForURL(url, host) {
    if (isInNet(host,"173.194.52.0","255.255.252.0") ) return "PROXY localhost:1";
    return "DIRECT";
}
Dans Firefox, ça se configure dans les Préférences > Avancé > Réseau > Connexion > Adresse de configuration automatique du proxy.
Cette solution a l’air de marcher, mais plusieurs personne m’ont indiqué que certaines vidéos ne peuvent pas être lues, car pas disponibles.

Passer par un serveur proxy

Une autre solution est de passer par un serveur tiers, qui ferait passer le trafic réseau par des liens moins engorgés.
Contrairement à la solution précédente, cette méthode est généralement payante. Dans mon cas, j’ai testé cinq services:
  • VPNBook, un service de VPN avec des serveurs en Roumanie : gratuit;
  • HideMyAss.com, une liste de proxy “anonymes” (suggérée par @ValentinSteph) : gratuit;
  • ProxFree, un proxy Web : gratuit
  • Amazon EC2, serveur virtuel à la demande. Offre Instance micro : prix très variable selon la durée et charge d’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;
  • OVH VPS, serveur virtuel (suggéré par @madsgraphics). Offre Classic 1 : 5€ par mois.

Les proxys publics

D’après mes tests, les proxys ou VPN gratuits sont généralement inutilisables.

Dans la liste de proxys http://hidemyass.com/proxy-list/, j’ai pioché quelques serveurs et aucun ne semblait fonctionner. J’ai rapidement abandonné.

VPNBook semblait intéressant avec son proxy OpenVPN. Mais au final, je n’ai pas réussi à avoir une connexion stable à cause d’un problème de DNS. J’ai également laissé tomber cette solution.

ProxFree semble fonctionner à peu près, mais c’est essentiellement pour un besoin ponctuel.

Amazon EC2

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.

D’aileurs, c’est avec SSH qu’on va pouvoir faire un tunnel pour rediriger le trafic. Il suffit de taper cette commande dans un terminal (sous Mac ou Linux) :

ssh -D 8080 user@monserveur.amazonaws.com

Il faut ensuite indiquer au navigateur d’utiliser localhost sur le port 8080 comme un proxy SOCKS5.

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.
Les vidéos se chargent un peu mieux avec Amazon EC2, mais il y’a tout de même des coupures où le trafic tombe à zéro.
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’on en a besoin.

OVH

Pour OVH, la démarche est très similaire à Amazon. On commande et on lance son serveur en quelques minutes. D’après mon test, les performances sont meilleures qu’avec Amazon, et j’arrive à lire des vidéos quasiment sans interruption, et même en HD 720p. OVH est donc la solution que je vais garder pour le moment. Reste à voir dans la durée si ça tiendra.

Si vous avez d’autres techniques, n’hésitez-pas à les poster dans les commentaires !

DIY Raspberry Pi Airplay Speaker for less than 70€

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.

raspberrypi_diy_airplay_speaker_components

To build a small Airplay speaker, here is what you will need:

  • 1 plastic box: 8€ from Muji
  • 1 power adapter: 7€ from RS Components
  • 1 Raspberry Pi: 32€ from RS Components
  • 1 Edimax EW-7811un USB WiFi dongle: 10€ from Amazon
  • 1 pair of USB powered speakers: 8€ from Pearl.fr
  • 1 SD Card: 0€. You probably already have one.

Assembling

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.

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.

Place the speaker drivers from the outside of the box, and glue the border from the inside of the box.

Solder the speakers to the amplifier.

Install the official Debian, install Shairport, configure the WiFi connection. Make sure that WiFi connection and the shairport software are launched at boot time.

Plug the amplifier to the Raspberry Pi with the audio jack and the USB plug.

Pack everything into the box.

Plug the power.

That’s all!

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.

At the end, the device is cheap, stylish and sounds pretty good for the cost. Feel free to ask questions in the comments.

raspberrypi_diy_airplay_speaker

 

Setting up a WiFi connection on the RaspberryPi

raspberrypi-wifi

I’ve recently tried to setup a WiFi connection with the RaspberryPi and encountered some issues: the connection didn’t start automatically and it wasn’t stable. I’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 works reliably. Here are the steps I’ve followed.

Setting up the configuration

Edit the /etc/network/interfaces file to look like this:

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

Then add your WiFi parameters to /etc/wpa_supplicant/wpa_supplicant.conf.
Here are my parameters to connect to my freebox (French ISP router).

network={
        ssid="YOURSSID"
        scan_ssid=1
        key_mgmt=WPA-PSK
        proto=WPA
        psk="YOURPASSWORD"
}

At this point, the you should be able to start the connection with this command:

sudo ifup wlan0

In some cases, you might need to do sudo ifup wlan0 first.

Connect automatically when booting

To make the connection work when the RaspberryPi boots, I have added a few lines to /etc/rc.local (source) :

echo "Starting WiFi..."
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
sleep .5s
dhclient wlan0
echo "WiFi should be started"

exit 0

Keep the connection alive

To make sure that the connection stays up, I’ve done two things.

First, disable the power management of the WiFi dongle. Create a new /etc/modprobe.d/8192cu.conf file with this content (source):

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Then, make the RaspberryPi ping the router every minute. Open your crontab:

$ crontab -e

and add this line at the end :

*/1 * * * * ping -c 1 192.168.0.254

Replace the IP address by the actual IP address of your router.

It took me some time to get it right, but now the Pi connection seems to work fine.

CheaterPress

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 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.

The app currently works fine on desktop browsers but is still buggy on Safari iOS. The code is on github : https://github.com/mauricesvay/CheaterPress