lunes, 12 de octubre de 2009

Using wifi for the fonera's Internet connection

Having the fonera as a second access point can be a good thing if you have it far away from your main wifi router, but doing that in the standard way fonera allows you means cabling.

However the addons allow you to connect your fonera to the Internet via wifi (sounds ideal to use the fonera as a repeater, doesn't it?). This however seens a bit tricky, so I'm going to write down how I managed to do it, or at least part of it.

The setup is done via Advanced -> Internet Connection, there we must choose WLAN (QRM) as the wanted mode and then fill in the needed data for this connection.

I tried with a WEP connection and had some trouble, the config you type there will be passed to wpa_supplicant and quotes are not allowed, so had to enter the value in hexa instead of using the string mode. After that, things should be working, but I still could not get from the fonera to my router, the problem was that I had set the Authentication Mode as Auto Select, setting it as Open solved the problem.

There seem to be some problems with this fon firmware, probably with the madwifi being too old and buggy and I see things like a reflection of the WPA2 network on another channel and stating it is WEP based, ... So... this kind of works, but I still prefer my own OpenWrt based stable firmwares, the guys at OpenWrt rock ;-)

BTW: as I was playing with the wifi and until I got this setup to "work", the only way to access the fonera was through the ethernet, which I had connected directly to my laptop, at that time the fonera was picking up address and I was accessing it using "ssh -L 8080:localhost:80 root@" so that I could access the web interface on my laptop at localhost:8080.

miércoles, 7 de octubre de 2009

piping partimage using stdout

I don't use partimage a lot and when I use it I tend to use it via it's text interface, but the other day we wanted to send the output of partimage to another computer through the network, and partimaged was not an option.

After looking around a couple of times the final answer came from a changelog file and we ended up with this magical line that I'm writing here and which works really well.

Linea mágica para mandar la salida de partimage por la red usando la salida estándar:

partimage -f3 -d -V0 -B gui=no save /dev/sda1 stdout | nc -w 60 address port

It seems partimage has some kind of problems while doing a restore of a compressed file, so the recipe for that should be something like...

nc -w 60 address port | gunzip | partimage -f3 -B gui=no restore /dev/sda1 stdin

or you can make nc listen as usual.