Foto del Día National Geographic

04 December, 2011

Telmex Nightmare (Huawei Modem)

I spent some time today trying to fix some of the problems the WI-FI modem given by Telmex was having.

Since my 2wire modem was broken (don't know what happened, just stopped working), I got some issues with my wireless internet. The modem that Telmex gave to me as a replacement of the 2wire is a "new" Huawei hg530.

The main and most annoying issue with the Huawei is that from time to time the DNS stop working. When I check the default network configuration of the DHCP, I can see the default GW, route and DNS is in other words, the modem itself. Therefore, if something is broken it must be the modem, and trying to change it is not that easy, given the fact that there's a lot of WAN configuration, it could mean more time configuring than what I want to bear with. So the quick fix is to reconfigure dhcp services.

The first step is to gain access to the modem. This is done easily by googling it. The steps:
- Open a browser with the address
- Type "TELMEX" as user and your WEP key as password.

The second step is to configure the DHCP DNS's
- In the left frame, open Basic->DHCP and type the google DNS's : and

The changes are applied on the fly, but I couldn't connect properly until I restarted the modem, so I recomend to do so.

The last issue I wanted to solve now that I have access to the modem configuration, is to change the encription algorithm. By default you have a WEP key of 64 bits that is very easy to crack, so I changed it to WPA2-PSK. It's still crackable but it's way more dificult. Need to go to Basico->LAN Inalambrica and change the Encription method and key.

Now I have a bit better expierence... until now... let's see later.

17 July, 2011

Setting up Fedora Core 15 with Gnome 3 for Java Development

After installing fc15:

Update the system

$ yum -y update
$ yum install kernel-devel
$ reboot

I've an nvidia driver, that just works with the default driver (nouveau) but it doesnt use the full potential of the nvidia card, so I needed to install the official Nvidia drivers via rpmfusion:

$ rpm -Uvh
$ rpm -Uvh
$ yum install akmod-nvidia xorg-x11-drv-nvidia-libs
$ vi /boot/grub/grub.conf

and check if it's added

rdblacklist=nouveau nouveau.modeset=0

in the kernel line

$ reboot

After that, you might need to install Oracle Java in the desktop

Download Oracle JDK latest version

$ chmod +x /path/to/file/jdk-6u25-linux-*-rpm.bin
$ /path/to/file/jdk-6u25-linux-*-rpm.bin
$ alternatives --install /usr/bin/java java /usr/java/latest/bin/java 20000
$ alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 20000
$ alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
$ alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
$ alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 20000

Some commands to test everything is ok:

$ java -version

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

$ javac -version
javac 1.6.0_22

Java(TM) Web Start 1.6.0_22

Until now you have a whole OS with desktop and Java tools, but you cannot program without a little bit of multimedia:

Flash plugin (64bits, if you have 32 bits machine, the commands are slightly different):

$ rpm -ivh
$ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
$ yum install flash-plugin nspluginwrapper.x86_64 nspluginwrapper.i686 alsa-plugins-pulseaudio.i686 libcurl.i686

Bluetooth service works out-of-the-box in FC15 in my dell computer, but it's necessary to enable the service, otherwise you see the bluetooth icon in an undefined status.

$ systemctl status bluetooth.service

bluetooth.service – Bluetooth Manager
Loaded: loaded (/lib/systemd/system/bluetooth.service)
Active: inactive (dead)
CGroup: name=systemd:/system/bluetooth.service

$ systemctl enable bluetooth.service

ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/dbus-org.bluez.service’
ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/’

systemctl start bluetooth.service

Now to wath videos and MP3 you need xine and codecs:
$ yum install gstreamer-plugins gstreamer-plugins-* xine xine-*

The default theme in FC15 is minimalistic and dark, it only needs a few changes:
$ gsettings set show-seconds true
$ gsettings set show-date true
$ vi /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
$ vi /usr/share/gnome-shell/theme/gnome-shell.css

... and if the font it's bigger than you can bear, just check out Universal Access Settings and make the font size smaller.

# If you are a chrome fan, flash might not work in the 64 bits environment, it needs an small fix:

sudo mkdir -p /opt/google/chrome/plugins
sudo ln -s /usr/lib64/mozilla/plugins-wrapped/ /opt/google/chrome/plugins/

And voilá, you have a fully functional linux environment so that you can create the most amazing Java programs in the world :P.

Mr H.

04 May, 2011

USB 2.0 Not recognized by Virtualbox Guest OS

It seems this is a common issue in Virtualbox using Linux as a host OS, and I think it should be addressed by Oracle either adding a button get all stuff configured or creating a 2-steps how-to like this blog entry in the official documentation.

First you must install Oracle VM Virtualbox Extension Pack. Download it from the link above, and follow:

- Select File-> Preferences, it opens a dialog box with configuration preferences
- Select "Extensions" and click the arrow in the right side to add the Extension Pack
- Select the file downloaded, for example: Oracle_VM_VirtualBox_Extension_Pack-4.0.6-71344.vbox-extpack
- Click open and wait until process is complete.

Now that you have USB 2.0 support, you need to add the user running Virtualbox to the vboxusers groups, otherwise you wont be able to see the usb devices:

- edit /etc/group

in the line

add the userid of the host OS user running Virtualbox, like this:

And voilá, you can start your guest OS and it should be recognizing properly all your usb 2.0 devices.

Hope this helps.

01 December, 2010

Android emulator on fc14 x64 not working

I was testing Android sdk on a dell laptop with fc14 x64. Android SDK still relies on 32 bit stuff, therefore I got some errors while installing then testing the emulator:

$ ./emulator @SansungGalaxyS
SDL init failure, reason is: No available video device

I got a good advice from a quite old forum entry:

Problems are 32 bit libraries missing. I didn't need to install all stuff they say, I traced a bit the binary file and found the libraries missing:

$ strace ./emulator

# yum yum provides
# yum provides
# yum install libXrender-0.9.6-1.fc14.i686 libXext-1.1.2-2.fc14.i686

it installs some other dependent packages.

Finally gotcha! Again started the emulator and worked fine!

22 October, 2010

Solaris 10 SSHD not starting

I got crazy this morning cuz sshd service wasn't working on our lab's server. It's absolutely necessary if we want to work remotely. I lost the former output of the problem, but I want to show you (and me, when this is cleared from my cache) some of the commands i used to sove this problem:

# svcadm enable ssh
here doesn't display any message.

# svcs -l ssh
here displays the service status. It was offline. It should be online since i "enable" it. It shows also its dependencies. "autofs" service was offline.

# svcs -d svc:/system/filesystem/autofs:default
online 12:27:03 svc:/milestone/name-services:default
online 12:27:10 svc:/system/filesystem/local:default
online 12:27:17 svc:/network/rpc/bind:default
offline* 12:27:21 svc:/network/nfs/client:default

I offlined nfs client service because Richard screwed the NAS so he needs to repair it in oder to be able to enable this service.

# svcs -x
If typed alone -x option shows all services that hasn't started. If you add the service name, it prints:

svc:/system/filesystem/autofs:default (automounter)
State: offline since Fri Oct 22 12:27:22 2010
Reason: Unknown
See: automount(1M)
See: /var/svc/log/system-filesystem-autofs:default.log
Impact: There are 22 dependent services.

svc:/network/nfs/client:default (NFS client)
State: offline since Fri Oct 22 12:27:21 2010
Reason: Start method is running.
See: mount_nfs(1M)
See: /var/svc/log/network-nfs-client:default.log
Impact: This service is not running.

What I did to solve was edit /etc/vfstab and comment the line where the NFS it's mounted. Then I typed (after a lot of research):

# svcadm clear svc:/system/filesystem/autofs:default
# svcadm disable svc:/system/filesystem/autofs:default
# svcadm enable svc:/system/filesystem/autofs:default
# svcs -x svc:/system/filesystem/autofs:default

And finally
# svcs -l ssh

And it worked!

Hope it still works after rebooting the system :D.

18 July, 2010

Pre-Nacional Absoluto (2)

Here comes the second part of my tournament review. After defeating Arely, I was in good mood for the next round. I knew that with 2.5/4 I was probably going to be paired with a stronger player then I prepared my mind for a tough struggle.

Round five was a kind of disaster right from the opening. I played against Juan Manuel García, from Jalisco. I hesitated for an instance to play 1.d4 and practice some of the stuff I had been training and play for the minimal advantages. At the end I played 1. e4 and we played an Accelerated Dragon.

I fell into a trap of that move order and finished in an inferior position quickly. I was feeling bad during the game because all those tricks I had trained them a lot of years before with my former trainer Benjamin Ferrera (RIP), a Cuban immigrant well known for his book on the Dragon. I knew those traps, I just couldn't take out the dust of my mind.

I was 2.5/5 before last round. I needed to win. I had gone to the tournament with the clear objective to finish at least with +1. And it was my last chance to not to lose so many rating points (Arely hadn't international rating so my rated games score was 1/3).

I was taking a break with Juan Carlos, Luis and Saul in the hotel lobby bar when Luis said he wanted to check the next round pairing. When he came back I was shocked. I had to play against Luis. The first question all launched us was if we did wanted to play or just make a quick draw. I said I had gone to the tournament to play and so did Luis, therefore we needed to make this interesting for training purposes given the fact he's my friend.

To spice the things up, I beat him last April in the National Open Chess Champ in Monterrey with a sicilian. I knew for sure he wanted to taste my blood so I didn't expect an easy battle.

We agreed to pre-arrange the opening setup. I play 1.e4 and he usually plays Sicilian game. After some discussion about when it was fair to pre-arrange the moves, he said he plays the Dragon and asked me if I would like to play it. I said yes, of course, one of the openings I best score is the white side of the dragon. So we agreed the first 8 moves and played them at blitz speed:

Pre-Nacional Absoluto 2010
Héctor Juárez Velázquez (IPN)
Luis López Raygoza (AGS)
1. e4 c5
2. Nf3 d6
3. d4 cd4
4. Nxd4 Nf6
5. Nc3 g6
6. Be3 Bg7
7. f3 Nc6
8. Bc4 0-0

Here finished our agreenment and from now, we started to play. With Bc4 white intends to stop forever the d5 central breakthrough and enter into a sharp game with opposite castling. Now the race begin, the first to approach his enemy's king will be victorious.

9. Qd2 Bd7
10. 0-0-0 Rb8!?

I don't know very much theory of this variation (I promise, I will re-read the labyrinth), but I would prefer to set the rook to c8 for the following reasons:

- In b8 it is obstructed by its b pawn.
- In c8 white must care about Rxc3 exchange sacrifice
- I will never take the b5 pawn, then, even if he is able to open the b-file I've enought time and ways to obstruct his attack.

But he'd study it and perhaps it fits better his style than Rc8. I don't know, I hope later Mr. Polugayevzky can give me further ideas, by now I'm writing only in my current state of preparation and memory!!

11. h4

This is my favourite plan. Launch immediatly the h pawn to black's king and try to weave the mating net. He has many options to slow down my attack and counterattack in the queenside to finally win the race.

11. ... b5
12. Bb3

I think I must keep me from taking the pawn. If I do so, his rook move will be justified.

12. ...Nxd4

He pointed me out after the game that perhaps this is an strategic mistake, because he lose some pressure in the center and exchange a good knight spending a tempo. I'm not completely sure about that because now I must take the knight with my bishop and I no longer have the threat Bh6. It's a matter of taste.

13. Bxd4 a5

Now the red light started to blink. His pawn storm can break into my king castle with tempo because he will push them against my minor pieces. Now I have many options. I can push my pawn to h5 and continue the crossroad (as defined by Tartakover), but I realized I have no room for my bishop. He's threatening a4 and the only square free for my bishop is d5, and after e6 it's trapped. The attack doesn't justify the piece sac.

If I try to make room for my bishop with a3 he move a4 and b4 and my king is in trouble. I needed to make room for my bishop with tempo in order to stop his threats and start my own's. I realized it was maneouvre in which I could accomplish this. I spend 22 minutes to figure it out.

14. e5! de5

The option is the retreat of the knight to e8 but in that case I can continue my attack without hesitation, then I'd have room for the bishop and time to exhange the dark squared bishops and push the h pawn to h5.

15. Bxe5

Now I'm attacking the b8 rook, taking advantage of what I think is not its best placement. And I'm threatening to take the d7 bishop so it must be protected. His response is unique.

15. ...Rb7

Now I have the rook where I wanted it. In the case he attacks my bishop with a4 I can move it to d5 attacking the rook. It gives me the time to save the bishop and at the same time my attack can run faster with no worries. Now he stopped and thought for about 20 minutes.

16. h5 b4
17. hg6!

The starting point of a combination that gave me the upper hand in the attack. I weakened his king at the cost of a piece, and now he needed to give back some material in order to protect his king. He accepted the sacrifice almost immediatly.

17. ...bc3
18. gf7+ Rxf7

Forced. If Kh8 he's mated after Qg5! when I threat Nxh7+ and if Kxh7 Rh1 and mate, or if Nxh7 Qxg7 mate.

19. Bxf7+ Kxf7
20. Bxc3 Qd6

Now the things had settled. I had a rook and two pawns for a knight and a bishop. He'd the bishop pair, so the material is somehow balanced. Although he'd the bishop pair, the were not coordinated and my two rooks and bishop were very active. He'd an exposed king whereas mine is completely safe. So I had a dynamic advantage, that I had to exploit if I didn't want to face a pretty difficult endgame. Again, I spend about 15 minutes to figure out how to continue.

21. g4 Be6?

This was a mistake that put his king under fire. It was necessary 22....h6.

22. g5 Ne4?

One error follows another. This was the point of black's play, perhaps he didn't saw my reply:

23. Rxh7

Now his g7 bishop is pinned and if Nxc3, Qxc3 and there's no way black can protect the g7 bishop. After about 15 minutes, he replied:

23. ... Nf6

He gave a full piece. Nevertheless, his position was lost at this point.

24. gf6 ef6
25. Bd4!

The last subtlety. In some variations it gave me the possibility to play Rg1.

25. ... Qb5
26. Qh6 Kg8
27. Rg1 Bg4

A kind of trap. However there's no danger.

28. Rxg4 Qf1+
29. Kd2

And with no further checks, he resigned.

Finally I succeeded to finish the tournament with +1. I could savour the moment just a few minutes, it was Sunday night and next day I had to work...

26 June, 2010

Pre-Nacional Absoluto

These were my two best games in the pre-nacional absoluto tournament that was held in the Fiesta Americana Reforma Hotel from June 4th to June 6th.

I will remember this tournament for the weird performance I did, because I won three Sicilians and lost both non-Sicilian games. It's seems I feel comfortable in Sicilian positions with both sides, and I got the chance to experiment some of the stuff I had been studying with José Luis, my friend and trainer.

I not only got the chance to play an specific variation in the Sveshnikov Sicilian José Luis and I analyzed from the NIC 94, but got the chance to practice my endings technique in the very first round against a 1700 player. I won this first game, in which I wanted to play the Sveshnikov, but my opponent deviated the main line and went for 3. b3 followed by d4 and Nxd4, which seems to be dubious. We got into some fireworks and after things calmed down, I had an extra pawn in a pretty difficult endgame. I pressed with my extra pawn and avoided successfully the minor pieces threats.

The second game I lost badly with Ruben Canales in a Tarrash French with 3... Nf6. I played poorly in the opening and when the game was close to balanced I lost the thread and finished in a lost endgame that he exploited with good technique.

The third game is the first I want to annotate. It was played against Arely de Loera, a very young girl from Morelos. She surprised me a bit, because she knew and played a line José Luis and I were checking last week. I was preparing the line with white (I'm a strong believer that white is better in the Sveshnikov), but the best way to understand and improve an opening is playing it by both sides.

1. e4 c5
2. Nf3 Nc6

I want to enter directly to the Sveshnikov. I left for another moment my beloved Hedgehog.

3. d4 cd4
4. Nxd4 e5?!

I played automatically this move. After I made it I knew I played the opening mechanically and gave her the chance to have a good game. Now, after 5. Nb5 d6, it's not mandatory to play the Knight to c3, so white could play c4 for a Maroczy or just play Bd3 and after a6 she can bring his b5 Knight to d5 via c3 (and not to a3).

5. Nb5 d6
6. N1c3?!

She also played mechanically and returned the favour!

6... Nf6

of course, going back to the main line. Next moves are just theory.

7. Bg5 a6
8. Na3 b5
9. Nd5 Be7
10. Bxf6 Bxf6
11. c4!?

here we go! this is the line we were preparing. This move tries to weaken black's queenside and if black advances his pawn to b4, white obtains a very good game, activating the a3 knight with tempo and strengthen the d5 knight. Therefore, this move creates a sharp game right from the opening with chances for both sides. Black's main attempt is to take the initiative at the cost of a pawn. We now have the eternal struggle between a bishop pair against a very strong Knight and square at d5.

11... 0-0

I don't refuse complications.

12. cb5 Nd4

The idea. I also get a good knight whereas maintain my bishop pair and better development. White gets a pawn and a rock-solid structure, her main problem is tempo and the poorly positioned Knight at a3.

13. b6!

In NIC Yearbook 94 this move is just mentioned as a sideline, but for me this is the best answer for white and I intended to play this move with white if I could get into this position. I was a little afraid of entering into her preparation so I spend almost half an hour to remember first the ideas and next the move orders of this variation, and trying to complicate the struggle, I was playing for a win.

14. ... Bb7

The main idea in this variation is to exchange the light squared bishop for the Knight on d5 and take on b6, after that black gets a reasonable play. With the white's next move, my preparation finished.

15. Nc7

The staring point of a wrong plan. Trying to maintain the extra pawn only plays in black's favour. Now the black's light squared bishop broaden its influence automatically and I get more development advantage, which will be decisive. Now white protects her central pawn and tries to complete her development by castling.

15. ... Rc8
16. Bd3 Bg5
17. 0-0 Bf4!

I'm proud of this bishop manoeuvre. It threatens some tactical blows although it is a positional move indeed. Now I get some pressure in the h1-a8 diagonal and she must concern about mating threats. Is she plays g3 now, the positional motif reveals for itself, because my light squared bishop is a killer and now I can make the standard retreat to h6 and then launch the attack via f5.

18. Nc4?!

She's not paying attention to my threats and follow her plan blindly. Now the threat is Na5 in order to catch the b7 bishop. She won't get the time to do so.

18. ... f5!

This move needs to pass the silicon test!, but in my analysis I win by force if she tries to trap my bishop: 19. Na5 fe4! 20. Nxb7?? Bxh2! and white at least lose her queen whereas black has still mating threats. She also cannot take on f5 because of 19. ef5 Bxh2! 20. Kxh2 Qh4+ 21. Kg1 Nf3! and white should resign.

19. Qe1??

This was the last chance to play g3, although white weakens her kingside badly. Now white falls in a mating net. This can be shown as a tactical problem to beginners:

20. ... Bxh2!
21. Kxh2

White's king is not safe with Bh1 because of Qh4 and the knight in d4 and the dark squared bishop weaves the mating net.

21. ... Qh4+
22. Kg1 Nf3!
23. gf3 Qg5

There are other ways to win. I chose the more direct one. Rf6 also wins by force, and if white plays Qd2 mate comes after Rg6+, and if white plays ef5 mate comes after Rh6.

White resigns.

I will analyse and commentate my last game against Luis Lopez Raygoza, which was an interesting and sharp game. Now time's over. See you next time!