Acer Extensa 5520 wireless problem under linux

This laptop has a Broadcom 4311 wireless adapter and it doesn’t work under openSUSE. An ifconfig eth1 up shows

SIOCSIFFLAGS: No such file or directory

It turns out that we must patch the firmware although the bcm43xx driver is included in kernel 2.6.22:

wget http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
wget http://linuxwireless.org/download/bcm43xx/fwcutter/bcm43xx-fwcutter.tar.bz2
tar -xzf bcm43xx-fwcutter.tar.bz2
bcm43xx-fwcutter/bcm43xx-fwcutter -w /lib/firmware wl_apsta -3.130.20.0.o

Reboot, and voila … there is wireless

More info about this problem at the linux driver homepage

openSUSE 10.3 typopgraphy is suprisingly good

I must say incredible good looking. Even better than Windows typography. Heck, if Ubuntu’s fonts were this good … Maybe because of the 19″ monitor ?

The only thing you need to do is to install MS font pack and the default dpi setting need to be tuned. But it looks so good that I’m thinking of switching to openSUSE now :P

Update: I can make the fonts on Ubuntu look like in Windows now, we just need to turn anti-alias off in /etc/fonts/local.conf

Update: it seems not turning anti alias off will solve the problem …

Can not compile Cisco VPN client on openSUSE 10.3 64bit

Update: as i guessed, this appears to be a bug from revision 4.8.00.0640, the older 0490 works just fine on my Ubuntu 64 bit (with the patch of course)

Just got the new openSUSE 10.3 on my work PC with 64 bit kernel set up and like i expected, there are errors during compiling the kernel module:

Making module
make -C /lib/modules/2.6.22.5-31-default/build SUBDIRS=/home/xn1/vpnclient modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5-31-obj/x86_64/default’
make -C ../../../linux-2.6.22.5-31 O=../linux-2.6.22.5-31-obj/x86_64/default modules
CC [M] /home/xn1/vpnclient/interceptor.o
In file included from /home/xn1/vpnclient/Cniapi.h:15,
from /home/xn1/vpnclient/interceptor.c:34:
/home/xn1/vpnclient/GenDefs.h:110:2: warning: #warning 64 bit
/home/xn1/vpnclient/interceptor.c: In function ‘recv_ip_packet_handler’:
/home/xn1/vpnclient/interceptor.c:639: warning: assignment makes integer from pointer without a cast
/home/xn1/vpnclient/interceptor.c:660: warning: passing argument 2 of ‘CniNewFragment’ makes pointer from integer without a cast
/home/xn1/vpnclient/interceptor.c: In function ‘do_cni_send’:
/home/xn1/vpnclient/interceptor.c:778: error: invalid operands to binary -
make[4]: *** [/home/xn1/vpnclient/interceptor.o] Fehler 1
make[3]: *** [_module_/home/xn1/vpnclient] Fehler 2
make[2]: *** [modules] Fehler 2
make[1]: *** [modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.5-31-obj/x86_64/default’
make: *** [default] Fehler 2
Failed to make module “cisco_ipsec.ko”.

Google doesn’t help at all :-(

Update: not only openSUSE, the new Gutsy 64 bit falls for this too

Run Cygwin on Vista as Administrator

Errm … as we already know, our admistrator account (the one that we use to log onto Vista) doesn’t really have access permission to all over the system. So when you do make install in cygwin you have permission error. The workaround is to activate the real Administrator account:

Right click on Computer and choose Manage. Select Computer Management (Local) > System Tools > Local Users and Groups > Users and double click the Administrator user. Uncheck Account is disabled. Right click on the Administrator user and choose Set password and enter a password for the Administrator user.

Now the Administrator account is activated, fire up cmd and execute the following commands:

cd c:/cygwin/bin
runas /user:Administrator bash

The last command will open up cygwin with the Administrator account. But now it’s environment is not set up properly, we still need to copy the skeleton files to proper home folder /home/Administrator/:

. /etc/profile

Using Firestarter with Cisco VPN Client

Although fs-security ( the company behind Firestarter ) states that the firewall works out of the box with the Cisco VPN client when transparent tunneling is enabled, it seems that it’s not true. When the firewall is on, i can connect to my VPN server though, but all others services don’t work at all i.e. HTTP / IM / SSH … even when i tried the rules posted on their website.

The solution is inserting some exception rules for the virtual VPN interface in file /etc/firestarter/user-pre :

iptables -A INPUT -j ACCEPT -s xxx.xxx.xxx.xxx -p esp
iptables -A INPUT -j ACCEPT -s xxx.xxx.xxx.xxx -p udp -m multiport –sports isakmp,10000
iptables -A INPUT -j ACCEPT -i cipsec0
iptables -A OUTPUT -j ACCEPT -d xxx.xxx.xxx.xxx -p esp
iptables -A OUTPUT -j ACCEPT -d xxx.xxx.xxx.xxx -p udp -m multiport –dports isakmp,10000
iptables -A OUTPUT -j ACCEPT -o cipsec0

Of course, replace xxx.xxx with yor VPN server’s IP. And please note that if you are using vpnc instead of Cisco VPN client then replace cipsec0 with the name of vpnc virtual interface (something like tun0 afaik).

Thank to Arun for those rules.

Synchronizing between Sony Ericsson w810i and Evolution using USB cable.

First, you must install OpenSync, an open source synchronization framework at http://www.opensync.org/wiki/download, either compile from source or use the pre compiled packaged for Ubuntu from this repository. Please note that the version numbers of OpenSync and it’s plugins must match. I installed the following packages:

  • OpenSync
  • Msynctool
  • Evolution 2 plugin
  • SyncML plugin (this plugin requires libsyncml)

After finishing the installation you mus add the sync group and it’s members:

$ msynctool --addgroup Sync1
$ msynctool --addmember Sync1 syncml-obex-client
$ msynctool --addmember Sync1 evo2-syn

Configure the SyncML member:

$ msynctool --configure Sync1 1

It will open nano to edit the config file. This is mine:

<config>
<bluetooth_address></bluetooth_address>
<bluetooth_channel></bluetooth_channel>
<interface>0</interface>
<identifier>Sony Ericsson</identifier>
<version>1.1</version>
<wbxml>1</wbxml>
<username></username>
<password></password>
<type>5</type>
<usestringtable>0</usestringtable>
<onlyreplace>0</onlyreplace>
<recvLimit>0</recvLimit>
<maxObjSize>725000</maxObjSize>
<contact_db>addressbook</contact_db>
<!-- calendar_db>calendar</calendar_db -->
<!-- note_db>tasks</note_db -->
</config>

Configure the Evolution member:

$ msynctool --configure Sync1 2

My config file for Evolution:

<?xml version="1.0"?>
<config>
<address_path>default</address_path>
<calendar_path/>
<tasks_path/>
</config>

If the default path doesn’t work then you must change default address path to something like:

<address_path>file:///path/to/your/evolution/address/book</address_path>

Now plug the USB cable cable in your phone (you don’t need to select the phone mode, just leave it). From this part we have a small problem as we need root permission to use the usb and if we sync as root Evolution doesn’t has any entry at all to sync because Evolution is run as normal user. So we must get the permission from udev:

$ lsusb
... Bus 002 Device 003: ID 0fce:d042 Sony Ericsson Mobile Communications AB

Take note of the Bus and Device number, and run the following command:

$ udevinfo -a -p $(udevinfo -q path -n /dev/bus/usb/002/003)
...
ATTRS{product}=="Sony Ericsson W810"
ATTRS{manufacturer}=="Sony Ericsson"
...
ATTRS{idProduct}=="d042"
ATTRS{idVendor}=="0fce"
...

Create a custom file in /etc/udev/rules.d/ called custom.rules and put the following in the file:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d042", MODE="0660", OWNER="YOUR-NAME-HERE"

using the information from the udevinfo command we ran above. Now we are happy to go !

$ msynctool --sync Sync1

It should looks like this:

Synchronizing group "W810-Evolution"
Member 2 of type evo2-sync just connected
received event dsession
received contact dsession
Member 1 of type syncml-obex-client just connected
All clients connected or error

It’s done :-)

Boring Sunday

Ended doing/learning nothing. Went out for a break at Pizza Hut with Bi ( we don’t have nowhere else to go ).

Zzz I’m feeling totally numb. None. Nothing. Nix. Still have excercises for game theory tomorrow …….. To hell with it, go to bed now and try to sleep. Life is mine and i live it my way …

The VPS is doing fine, i learned a lot with it. If i got a laptop next month, i’ll switch my PC over to linux.

Đánh được tiếng Việt không nào ?

First time with a VPS

Just moved this site to a VPS. Having your own hosting box is quite cool ( well it’s not actually a box :P ). I reckon that the site loads much faster now.

All my vietnamese posts screwed up after upgrading to WP 2.2.1

Hell, i lost all vietnamese posts after auto-upgrade from Fanstatico. The encoding went completly wrong. Going to recover the posts from Google cache. I have no time to investigate where the bug is, maybe database crashes or unicode is not supported by the upgrade script … Anyway still lucky as all of my posts were indexed by google. Now you know another benefit of SEO :P

Update: Something is wrong with this WP update. I published the recovered posts, but the encoding is still fucked up …

Update: At last i found the solution: every Wordpress automatic upgrade from Fanstatico must remove these 2 lines of code in wp-config.php:

define(’DB_CHARSET’, ‘utf8′);

define(’DB_COLLATE’, ”);

OK this is how Google will look like in 5 years