Saturday, October 18, 2008

Building and running a dbus program in n810

sudo apt-get install libdbus-glib-1-dev

Wednesday, October 15, 2008

Create USB networking with n810 from Ubuntu hardy

It seems that everything with maemo is pain to do at first. And its true. I just tried to set up usb networking and it took me around 3 hours to do it. I think its only because of the lack of community documentation. If you search for maemo resources in net, you will be amazed how reluctant a community can be in documenting. Anyway, lets start. I did this with Ubuntu hardy.

For the device:
Note: you need to do most of the things in root mode. TO be root you need to install "becomeroot" and the issue the command "sudo gainroot" in xterm. How to install become root can be found by searching the Internet.
You first need to install the g_ether module in the kernel of the device so that the usb networking is virtually working as ethernet connection. For that first connect the device with your computer and if the memory card is mounted in linux, unmount it, otherwise your usb interface would be busy and you will get something like device is busy. To unmount right click on the volume that is mounted on your desktop and unmount.
Then issue the following command in the device:
insmod /mnt/initfs/lib/modules/2.6.21-omapl/g_ether.ko
and that will load the g_ether module into your kernel. and if you issue the command lsmod, you should see something like this:
Module Size Used by
g_ether 26416 0 - Live 0xbf058000
g_file_storage 27560 0 - Live 0xbf050000
cx3110x 56200 0 - Live 0xbf041000
umac 258788 1 cx3110x, Live 0xbf000000 (P)

where you can see the g_ether module. Now your usb networking mode is enabled. You should issue the command
ifup usb0
to make your usb interface up. The usb interface is named usb0 and gets teh ip address 192.168.2.15 autometically. Now you need to configure your host.

Host machine:
Ubuntu normally is not equipped with usb networking mode. We need to enable it first. for doing this, edit the /etc/network/interfaces file and append the following lines to it:
auto usb0
iface usb0 inet static
address 192.168.2.14
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
and then restart your networking service using the command:
/etc/init.d/networkign restart
if you find some problem such as:
SIOCSIFADDR: No such device
usb0: ERROR while getting interface flags: No such device
then you know that your usb interface is busy so the networking daemon cannot capture it. Just unplug the usb cable from the socket and then try the restarting again. It will happen. Now you have a usb0 interface in you ifconfig. And should be able to ping the device after you attack the usb cable again.

Thursday, September 18, 2008

Problems with audio in hardy heron: culprit pulse audio

When i have upgraded to hardy, after that I started to have audio problems. It seems that one application is locking another application from playing. Then I found out that its a problem with flash enabled sites such as youtube. When they play, they prevent other applications such as VLC from playing. So I installed libflashsupport.
#sudo apt-get install libflashsupport

which solved the problem. But then again, when I am listen to youtube, I couldnt start a voice chat in skype. Oh GOD! it turned out to be pulseaudio, the audio server they are using with hardy instead of alsa is the main problem. It is not robust yet and many programs are not comfortable with it. To get rid of all the problems, you can return to alsa and remove pulseaudio. How to remove is told in this wiki.

Monday, September 15, 2008

Firefox in ubuntu is very slow

I was seriously doubting those who were the fans of firefox because whenever I logged in to Ubuntu and used firefox, my net connection was so slow. But with IE it was lightning fast. So I searched a bit and found the following solution which somewhat speeded it up a little bit.
  1. Open a new tab by typing Ctrl-t
    (That’s the Ctrl key on your keyboard and the letter t key at the same time)
  2. Enter about:config in the address bar of Firefox
  3. Enter ip into the Filter: text box
  4. Look for the network.dns.disableIPv6 entry in the table below the Filter: text box
  5. Double click the network.dns.disableIPv6 entry
  6. Restart Firefox
ref: http://techxplorer.com/2007/02/22/slow-browsing-using-firefox-on-ubuntu/

Saturday, September 13, 2008

Sony vaio CR11s webcam not working on ubuntu hardy

My web cam was not working in skype and I found this little solution which worked very well. The essential thing is the module r5u870 which makes the video device to work. We will first bring the latest module from the svn development trunk directly and then install it. Thats all.

  1. Remove any r5u870 or the ry5u870 modules you may already have. (command:
    #modprobe -r r5u870
    )
  2. Install svn if you dont have it installed already (it should be already installed)
  3. Issue the folliowing commands to download, make and install the new module into your karnel.
    svn co http://svn.mediati.org/svn/r5u870/trunk ~/r5u870
    cd ~/r5u870
    sudo make
    sudo make install
    modprobe r5u870
Thats it!! Your webcam should start working now. You can check it out with skype->option->video call or with ekiga. Have fun!!!

ref: http://ubuntuforums.org/showthread.php?t=821343

Suspend / hibernate problem with hardy heron in Sony Vaio VGN CR11s

I think most of us have the problem of suspending the computer with gusty/hardy. I have read so many threads and nobody seems to have an answer to it. Everybody is boasting like "yeah! I know I can do it, but haven't take a look at it yet." funny huh? Why dont you take a look when u know u can do it!!! And some other threads are scary and tells that we really need to recompile kernel and so some other scary stuff. And it was then when I stumbled into a nice little thread where a guy said to issue the command
#sudo rmmod uvcvideo
before suspending the laptop. I did it, and with some doubt slowly close the lid of my vaio. And, magic :) it worked. It went to suspend mode and wake back again :)
ref: http://ubuntuforums.org/showthread.php?t=712331
For other issues with the sony vaio and hardy please take a look at the following thread...
(i lost the address, I will add it as soon as i find it again)

Thursday, September 11, 2008

Ubuntu: adding more space to root partition

I had given a mare 2.5 gigs of space to my gusty when I installed it and over the time it proved to be pretty miser :) So, I decided to add more space to it. I went to windows vista right click on my computer->properties->manage->disk to get disk management snapshot. From there I shrank my D: drive 4 gigs. Then comes the question of how to add this 4 gigs to my ubuntu root drive. If we boot to ubuntu then we cannot do any partition task as the root drive is mounted. So, we need a live CD. Every ubuntu CD is live, so if u got one then just boot from it and it will start a live session. From there, start gParted (the partitioning tool of ubuntu system->administration->gparted) and if the unallocated space is beside the ubuntu root partition you can just resize the root partition and grow it to include the unallocated storage. But here I faced another problem. My D: drive was a primary partition and so the unallocated space resulted from the shrinking of D: drive was just after that. But my linux installation is insize an extended partition. And, sorrowfully, I can see from gparted that the extended partition is locked and I cannot resize it due to the fact that the swap partition which is in extended partition is in use and locked. To recover, I right click on swap partition and unmount (unswap) it, so my extended partition is no longer locked. Then I resized the extended partition to include the unallocated space just preceeding it, and then resize the root partition of ubuntu to include the new unallocated space that I included inside the extended partition. And that was it!! Just apply the changes, and you are done :)