Tuesday, December 25, 2012

Livebox2, episode 2

De retour chez mes parents qui ont changé leur Livebox d'Orange, et encore des problèmes de connectivité...


Malheureusement, le mode telnet n'étant plus disponible, les scripts de monitoring que j'avais écrit précédement ne fonctionnent plus...

J'ai jeté un oeil et l'interface de la livebox expose ses donnéees en REST au format JSON. Il serait dont possible de faire un programme qui récupère les données de manière automatique. Ici une preuve de faisabilité en 2 lignes de curl. Aussi sur le gist, une copie du javascript qui tourne sur la boite pour les curieux.

Je devrais pouvoir facilement mettre a jour mon script initial, mais au final celui ci est difficile d'utilisation sur d'autres plateformes.

Je me demande si je ne devrais pas faire un programme plus générique, capable de faire du monitoring des différentes Box ADSL. J'hésite entre une solution nodejs+highcharts ou une solution ruby... Suite au prochain épisode.

Mise à jour: ce projet python ligne de commande permet d automatiser le site speedtest.net en ligne de commande. Pratique.

[...]
Hosted by MEDIACTIVE (Toulouse): 1034.339ms
Testing download speed........................................
Download: 0.69 Mbit/s
Testing upload speed..................................................
Upload speed: 0.37 Mbit/s

Lexmark S305 on Ubuntu 11.04 and 12.04 - fixing the packages

My parent's S305 Lexmark printer was sitting unused in the 1.5 years since it had been purchased.

Yes it was compatible with Linux claimed the box, but the installation scripts we had were not working with our Ubuntu 11.04 computer.

Thanks to an update in Lexmark packages, I finally might have something that works.

A year ago, the printer was malfunctionning. Oh yes, you could download the packages from Lexmark's site (lexmark-inkjet-legacy-wJRE-1.0-1.i386.deb.sh), but first you had to edit the installer, and even then the printer was not working on our Ubuntu 1104 computer. The lexmark programs were either crashing, being unresponsive, or going 100%CPU. In the best case, half of the page was printed.

I gave it a last try today, before returning it to the shop (we re patient here).

I found out that Lexmark had new packages, downloaded them (lexmark-inkjet-legacy-1.0-1.i386.deb  lexmark-printer-utility-1.0-2.i386.deb  lexmark-scan-legacy-1.1-1.i386.deb), and installed them (dpkg -i lexmark*.deb)

Alas, the printer utility installer is broken:
Installing %%JARVIS_VENDOR_PREFIX%%hcp backend ...
cp: impossible d'évaluer «/usr/local/lexmark/printer_utility/bin/%%JARVIS_VENDOR_PREFIX%%hcp»: Aucun fichier ou dossier de ce type

You can fix the installer using this script. To install it, run this from the directory where you have downloaded the debs.

wget https://gist.github.com/raw/4374626/e946d2a3ad2e24657ddd32a84f31927970773745/fix_lexmark.sh
chmod +x fix_lexmark.sh
./fix_lexmark.sh
dpkg -i build/lexmark-printer-utility_1.0-1_i386.deb

You will notice that the new package is one revision below the original, that's because the DEBIAN/control in lexmark-printer-utility_1.0-2_i386.deb was invalid I guess...

Now from the first time the printers installs and prints without crashing. Unfortunately my black ink dried, and I get garbage out, but it does exactly the same from my Mac, so I guess it works now. Update as soon as we change the ink...

Lexmark, you still have work to do to claim you support Linux. The quality of those Ubuntu packages is crap.