Archive for Uncategorized

Configure BSNL EVDO DATACARD on Ubuntu

Since BSNL has released its EVDO internet accessing data card, it has gained a lot of popularity amongst the users. Needless to say people may face many difficulties configuring it for ubuntu. But then again, it’s these challenges that keep the linux users up and moving.

Cutting straight to the point, configuring it for ubuntu may be as simple as the following four steps:
1.In superuser mode, type lsusb at the shell prompt.

root@santosh-laptop: lsusb.

This will list all the usb ports on your pc.

2.Then at the shell prompt type in the command

root@santosh-laptop:wvdialconf.

If this works, it will say modem detected at some port.But life again ain’t so easy.It may well not recognise any modem and give a output something like below:

bsnl1

Now to overcome the problem you have to make the following changes:

1.Remove comment on the below lines in /etc/init.d/mountdevsubfs.sh:

mkdir -p /dev/bus/usb/.usbfs
domount usbfs ”” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb.

Note: The above lines will be found in the do_start() function.

2. Now type in the following command:

modprobe usbserial vendor=0×05c6 product=0xfffe

Now the vendor and the product id may be different for your data card. You have to find that out for yourself.

Hint: These numbers were listed in my lsusb output —> 19d2 and fffe. Just add 0x before them to make them hexadecimal.

3. Now again type in the command wvdialconf at your shell prompt.This will edit the file /etc/wvdial.conf. Open it using any editor and make in the following changes:

type in–> Stupid Mode = 1 at the end of this file.
Also type in the username and the password infront of the username and password row. Type in your phone name as #777.

4.Now type in the command wvdial at the shell prompt:

root@santosh-laptop:wvdial

Hurray !! your net has been connected and it looks something like this:

bsnl2

Acknowledgement: Thanks to Santosh Mukherjee (sam.sensation@gmail.com) for writing this post.

Firefox Memory Hacks

Firefox is by far the most popular browser today because it is fast and provides ample amount of options.

But we can enhance the Speed and reduce the Memory Consumption by using some smart tricks. While performance is generally good for single – page browsing but when loading multiple tabs (> 10 ) with loads of supporting content like large images, huge number of thumbnails and other such things , the speed reduces considerably and the Memory consumption abnormally grows up.

In this section we’ll try to reduce the memory consumption in such cases primarily by adjusting and changing key hidden preferences.

A Note: While these hacks may reduce your memory consumption a lot and hence help in speeding up the machine but they are certainly away from Industry Standards.

Reducing RAM Usage.

You might have noticed that when Firefox is minimized or not used for a long time then it’s memory Consumption doesn’t reduce, in fact it increases (at times by huge amounts).

On Windows, when a program is minimized and not used for long time then Windows swaps out the RAM memory used onto the disk, so that other program might use RAM. But Firefox, by default, doesn’t allow Windows to swap it out and hence the memory consumption increases.

Now we can reduce the RAM usage by performing following steps –

* Open a new tab in the Firefox and type “about:config” , without quotes, and hit enter. A huge list will appear.
* Now Right – Click and then select New -> Boolean.
* Type “config.trim_on_minimize” and press enter. Then in the new window that appears select “true”.
* Restart the Browser.

About:Config

Setting the value of “config.trim_on_minimize” to true allows Windows to swap out the memory when the program is minimized.

Check out the Difference! It is quite large.

Play with Cache Memory

1. Firefox utilises a cache memory to store certain visual items like images, thumbnails etc. so as to enhance the speed.

Now open a new tab in Firefox and type “about:cache” in it and hit enter. You will see a page describing the memory and disk cache statistics. Click on “List Cache Entries” link in the “Memory cache device” section and you will see all the images caches and their details.

Now you can change the value of both Memory Cache and Disk cache according to your need.

Want to Save Memory or Increase Speed ?

Following table gives the default memory allocation –

Installed Ram(MB) Automatic Cache Allocation(MB)
32 2
64 4
128 8
256 14
512 22
1024 32
2048 44
4096 58

Now if you want to increase speed, then enhance the Amount of Memory and if you want to save memory then reduce the amount of memory. You can change the memory by performing following steps -

# Open a new tab in the Firefox and type “about:config” , without quotes, and hit enter. A huge list will appear.
# Now Right – Click and then select New -> Integer.
# Type “browse.cache.memory.capacity” and press enter. Then in the new window that appears , type the desired value in Kilo Bytes (e.g set it 32768 which is equivalent to 32MB )
# Restart the Browse

Warning – Don’t Increase it too much, else it might result in some unexpected results!

In a way exactly similar to Memory Cache Capacity, we have Disk Cache Capacity and you can modify that too by the same process as above.

Just change “browser.cache.memory.capacity” to “browser.cache.disk.capacity” in the second step.Although it is better not to change it, as it has no real affect on speed and as well as RAM memory consumption.

Note: For the above two to work, make sure that “browser.cache.memory.enable” is set to true.

2.Well, if you are really short of memory and are ready to sacrifice a SMALL amount of speed for it , then following two hacks will prove quite useful –

Perform the Following steps -

* Open a new tab in the Firefox and type “about:config”, without quotes, and hit enter. A huge list will appear.
* Now Right – Click and then select New -> Boolean.
* Type “browser.cache.memory.enable” and press enter. Then in the new window that appears select “false”.
* Restart the Browser.

After doing the above steps Firefox won’t store decoded images, chrome (application user interface elements) and secure pages in memory.

Now Feel the Difference in Memory Consumption!

3.Now the Final Hack of this post. Perform the Following steps –

* Open a new tab in the Firefox and type “about:config”, without quotes, and hit enter. A huge list will appear.
* Now Right – Click and then select New -> Integer.
*

* Type “browser.sessionhistory.max_total_viewers” and press enter. Then in the new window that appears put 0.
* Restart the Browser.

While using internet, Firefox caches your previous pages to make your internet browsing faster. But in some cases this is just complete waste of memory. After above hack Firefox won’t cache your previous pages.

Note: It DOESN’T save a very large amount of memory and reduces speed by a whisker, so worth if you don’t have a large RAM.

Hope you enjoy the hacks and utilize them to the best possible extent.

Wireless Problem on fedora 8/9/10

This post is for those people who are not able to use wireless on Fedora 8/9/10. The problem arises in computers with Broadcom wireless cards as the drivers are not packaged with the Operating System. I first encountered this problem on Fedora 9. That time I had to use NDISwrapper to wrap the wireless driver. That was quite a tedious task.

After moving to Fedora 10, I had to again set up the wireless drivers. But what I found was that RPM’s are available for Broadcom 802.11 STA Wireless Driver from rpmfusion.org for Fedora 8, 9 and 10. It means that you now have an easy way to set your wireless working.

To install the drivers using yum, follow the following steps :

  1. Enable the rpmfusion non-free repository and rpmfusion non-free repository.
  2. su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

  3. Update & Install the driver.
  4. su -
    yum update
    yum install broadcom-wl
    
  5. The installation is done. Reboot your computer. Enable Network Manager and you will see your wireless device working.

P.S. The above procedure is applicable to Broadcom’s BCM4311-, BCM4312-,BCM4321-, and BCM4322-based wireless card.You can check your wireless card type by typing ‘lspci’ command.
If the last line of the output matches the following line, then you are
having a Broadcom based wireless card.
0b:00.0 Network controller: Broadcom Corporation BCM43** 802.11b/g (rev 01)