Archive for July, 2008

Guia Erasmus / Erasmus guide

July 25, 2008

Este blog nació con el ánimo de intentar mostrar al mundo como he vivido en Dinamarca, mi año de Erasmus en la DTU de Lyngby que jamás podré olvidar. Por ello, he intentado recopilar en una mini-guía lo que considero imprescindible que debes saber antes de ir allí.

Puedes ver la guía aquí

¡Espero que te sirva!

———————————————————————–

This blog intention was to show my world how I’ve lived in Denmark during my Erausmus at DTU (Lyngby), a year I will never forget. Due to that, I’ve tried to write a mini-guide where you cand find the information I consider the most important before going there..

You can read the guide here

¡Hope it helps!

Howto PAN in linux

July 21, 2008

I generally write in Spanish, but this time I’m gonna try to go a step further so more people can get some profit from my experiences.

I’m going to show you how to create a PAN (Personal Area Network) between two computers running Linux using bluetooth devices. This PAN is supoussed to be set up any time you plug your bluetooth adapter.

First of all, I’ll try to explain how I have set up my network so the following explanation will be easier to understand, here’s in a simple schema:

My LAN

My LAN

I have on router with access point, one personal computer, one server (used to P2P, remote login, FTP…) and my laptop. I usually connect to the network using the wireless connection (shown in blue), but sometimes it seems to fail so I get out of connection and I’m too lazy to move some meeters to reset the router. So, in order to avoid this, I’m gonna show you how to create a bluetooth conection between the server and the laptop (shown in red) that can be used as a gateway to the Internet for both my laptop and my mobile phone or as a simple LAN to perform some administration tasks through ssh.

For both sides:
Be ensure that you have the bnep module compiled in your kernel:


Networking --->
<M>Bluetooth subsystem support --->
<M>BNEP protocol support

The server side:
It is using a bluetooth adapter Conceptronic. The MAC will be used in the client side you can use hcitool dev to get it.

First of all edit the /etc/default/bluetooth adding the following lines:

....
PAND_ENABLED=1
PAND_OPTIONS="--listen --role NAP --devup /etc/bluetooth/pan/dev-up"
....

This will enable PAND and tell the system how to act, if you see, when the system PAND receives a connection it will execute the /etc/bluetooth/pan/dev-up script which has to be set up like this:

#!/bin/sh
ifup bnep0
ifconfig bnep0 up
ifconfig bnep0 192.168.5.1
ifconfig bnep0 netmask 255.255.255.252

Remeber to make it executable and restart the bluetooth system:

$ chmod +x /etc/bluetooth/pand/dev-up
$ /etc/init.d/bluetooth restart

The client side
As well as for the server edit the /etc/default/bluetooth adding the following lines (notice the MAC gotten before is now used):

...
PAND_ENABLED=1
PAND_OPTIONS="--connect 00:80:5A:20:4E:F7 --devup /etc/bluetooth/pan/dev-up"
...

In the same way, the file specifying how to act when the system notices the connection has to be edited, so here is how /etc/bluetooth/pan/dev-up should look like:

#!/bin/sh
ifup bnep0
ifconfig bnep0 up
ifconfig bnep0 192.168.5.2
ifconfig bnep0 netmask 255.255.255.252

Remeber to make it executable and restart the bluetooth system:

$ chmod +x /etc/bluetooth/pand/dev-up
$ /etc/init.d/bluetooth restart

Now, everytime you connect the bluetooth adapter, a new interface bnep0 should be brought up in both sides with the specified rules. You can see it using the ifconfig command. You should be able to do any tasks from both sides like ping, ssh… here’s an expample:

root@Stronghold:/etc/bluetooth/pan# ifconfig
bnep0 Link encap:Ethernet HWaddr 00:80:5a:20:4e:f7
inet addr:192.168.5.1 Bcast:192.168.5.3 Mask:255.255.255.252
inet6 addr: fe80::280:5aff:fe20:4ef7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3925 (3.8 KiB) TX bytes:7047 (6.8 KiB)
root@Stronghold:/etc/bluetooth/pan# ping 192.168.5.2
PING 192.168.5.2 (192.168.5.2) 56(84) bytes of data.
64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=59.9 ms
^C
— 192.168.5.2 ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 59.977/59.977/59.977/0.000 ms

Additional comments:

  • Of course, you will have to change some information as the MAC and the IP address
  • If you get the following error:
    ExoduS:/home/kets# pand --connect 00:80:5A:20:4E:F7 -n
    pand[10820]: Bluetooth PAN daemon version 3.30
    pand[10820]: Connecting to 00:80:5A:20:4E:F7
    pand[10820]: Connect to 00:80:5A:20:4E:F7 failed. File exists(17)

    It’s because you have already a connection set up in your computer, probably running on the background you can see it with pand -l and destroy it with pand -K

  • By now I’m just using this connetion as a simple LAN not as a gateway to the Internet. If you wish to do that, you’ll have to set up some iptables rules in the server side, these rules are very well explained in the first link of the following section.

Useful links:
http://www.howtoforge.com/bluetooth_pand_debian_etch
http://bluez.sourceforge.net/contrib/HOWTO-PAN

Hope it helps & don’t hesitate to contact me for any help.

Fiestas en Teruel

July 20, 2008

Bien, pensaba pasar sin escribir el fin de semana pasado, pero me siento obligado tras un par de comentarios de amigos diciéndome que por que no subía al “blog” la increíble experiencia, así que allá vamos.

Se suponía que iba a subir con varios amigos de Zaragoza y probablemente todo el fin de semana, de viernes a domingo. Al final resulta que subí sólo con dos amigas venidas de Barcelona y de sábado a domingo.

Tras perderme en la estación Delicias de Zaragoza, es imposible entrar si no sabes bien como es conseguí recoger a Diana y Gema para ponernos rumbo a Teruel sobre las dos de la tarde. Un viaje con poco que decir, ya que por la nueva autovía se llega en un momento, parada en Cariñena a comprar algo de provisiones y llegada a Teruel donde nos esperaría JuanLuis.

Nos pusimos al tema de beber desde el primer momento, llegamos a la plaza del Torico cuando todavía faltaba una hora para la puesta del pañuelo, no queríamos mojarnos mucho así que buscamos un lugar un poco a cubierto, gran error, estar cerca de la plaza supone bañarte en diversos licores, se iba llenando de más y más gente, hasta que a eso de las 4 estar allí era insoportable, olor a vino de mala calidad, pies sobre unos cuantos centímetros de bebida y muy poco espacio y de repente sucedió, un hombre se acerco a la estatua del pequeño toro, subió y saludo antes de colocar el típico pañuelo rojo, toda la gente grito extasiada, baño de más vino y afortunadamente luego de agua cayendo desde las ventanas.

Seguíamos bebiendo, empezó a llegar gente con la que habíamos quedado y con la que parecía imposible encontrarse Yuste y Boro primero, luego en la estación de autobuses con Arturo, Guille, Lili, GuadalaJavi, Iago y Mara. Seguimos bebiendo y esperando mucho rato hasta que conseguimos movernos. Gran sorpresa cuando apareció MaryQueen y compañía, venían de propio desde San Fermines y sólo para poder pasar una noche con nosotros. Ya era de noche así que nos dirigimos a una especie de peña, encontrándonos a mucha gente por el camino, al final conseguimos llegar a un sitio bastante bueno, la barra cerca y con bastante espacio. Saltamos, reímos, bebimos, bajamos al coche a por provisiones, subimos, seguimos bebiendo, riendo y cantando. Algunos se habían pasado y hubo que acompañarlos al coche, me perdí al volver entre la turba y al final conseguí llegar y estar un rato más con esa gente que tantas ganas tenía de ver.

Sobre las 6 besos y abrazos de despedida y no tan despedida, vuelta al coche a intentar dormir. Empieza a amanecer, vienen Guille y Lili, más despedidas. Duermo una hora, hay mucho ruido y luz fuera, no sería un problema en una cama, pero en el coche no se puede conciliar el sueño tan fácilmente. A las 13 a comer, con Gema y Diana porque Arturo no aparece. Comida no tan barata como cabía de esperar, un poco de descanso y vuelta a casa.

Al final, casi 24 horas que pasarán a la historia tras haber estado con mucha gente que nunca había tenido en placer de conocer en tierras españolas, cada vez queda más claro que habrá muchas más…

(Una de las pocas fotos que se hicieron, yo me dejé la cámara en el coche olvidada cada vez que bajaba)

Quedada en Teruel

Quedada en Teruel

Buena música, este miércoles

July 14, 2008

Sé que no soy muy leído, pero sabéis que soy de ayudar a los amigos y esta es una oportunidad espléndida. Un amigo que hace música de esta que yo nunca he sabido apreciar, la definiría como electrónica, pero no os asustéis, no es chumba-chumba podrá deleitarnos este miércoles en la 1.30 en el club PLATA.

Podéis ver algo más en su página web.

HumanBeansProject-flyer

HumanBeansProject-flyer


¡Nos vemos ahí!

Frases para recordar…

July 10, 2008

Hacía ya un tiempo que no subía ninguna frase y no quiero que este apartado caiga en el olvido así que ahí va la siguiente:

Frase célebre

Frase célebre

Muchas cosas pierde el hombre,
que a veces las vuelve a hallar;
pero les debo enseñar,
y es bueno que lo recuerden:
Si la vergüenza se pierde
jamás se vuelve a encontrar

Esta frase me hizo pensar bastante cuando la leí por primera vez en un restaurante argentino de Zaragoza. Supongo que en cierto modo me sentí algo identificado y desde entonces la menciono de vez en cuando cuando conozco a alguien extremadamente vergonzoso, ¿eh María? 😉

Tampoco penséis que soy un desvergonzado y mucho menos un sinvergüenza, pero considero que muchas veces el hacer sin pensar en el “que pensarán” ayuda a conocerse mucho.