Archive for Ubuntu

How to install EVDO on Debian GNU/Linux or Ubuntu?

Help for Configuring EVDO broadband with ZTE CDMA Tech - EVDO USB modem for BSNL    Connection in Debian GNU/Linux (etch) or Ubuntu.

P r o c e d u r e

  1. Find The Modem, Vendor and ProdID
  2. Detect the modem using modprobe
  3. Plug in modem and see whether it has been found by using dmesg
  4. Install dialer “wvdial” if it is not already installed
  5. Configure /etc/wvdial.conf to put phone number, user name and password
  6. Connect to Internet
  7. How to detect modem automatically at start up
  • Special Notes for ones using IPTables for Direct connection
  • S t e p s   i n  D e t a i l

    Login as Super User or Administrator (use “su” command or Root Terminal)
    STEP I Find The Modem, Vendor and ProdID
    cat /proc/bus/usb/devices
    S a m p l e
    cat /proc/bus/usb/devices

    P: Vendor=05c6 ProdID=6000 Rev= 0.00
    S: Manufacturer=ZTE, Incorporated
    S: Product=ZTE CDMA Tech


    Note: the above command will give a list of devices connected.
    Please Find your device and its Vendor and ProdID

    OR directly grep it
    cat /proc/bus/usb/devices | grep Vendor

    will give the Lines with word “Vendor” only
    These are the lines significant in my case

    cat /proc/bus/usb/devices | grep Vendor
    P: Vendor=05c6 ProdID=6000 Rev= 0.00

    OR use command

    lsusb

    lsusb
    Bus 001 Device 002: ID 05c6:6000 Qualcomm, Inc.

    Using any of the above three you can find your EVDO modem - Vendor and ProdID

    Vendor=05c6
    ProdID=6000

    STEP II Detect the modem using modprobe

    Now use modprob to detect the modem

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

    Note : REMEMBER to add “0X” before your Vendor/ProdID
    if Vendor=05c6 on modrpobe vendor=0×05c6
    if ProdID=6000 on modrpobe product=0×6000

    After Command ‘modprobe’ Plug the EVDO Modem to your USB port

    STEP III Plug in modem and see whether it has been found by using dmesg

    check the debug message using command ‘dmesg’

    dmesg | tail

    usbserial_generic 1-3:1.0: generic converter detected
    usb 1-3: generic converter now attached to ttyUSB0
    usbserial_generic 1-3:1.1: generic converter detected
    usb 1-3: generic converter now attached to ttyUSB1
    usbserial_generic 1-3:1.2: generic converter detected
    usb 1-3: generic converter now attached to ttyUSB2

    from the above dmesg command, you can find the modem device
    now your modem Device is ttyUSB0

    STEP IV Install dialer “wvdial” if it is not already installed
    use command “wvdial” for connecting to internet
    if ‘wvdial’ not install, install using command

    apt-get install wvdial

    (Sorry I have to assume that you already have a net connection or some how get wvdial from your friendly open source neighbour

    (You can download wvdial from http://open.nit.ca/download/wvdial-1.54.0.tar.gz

    or ftp://ftp.us.debian.org/debian/pool/main/w/wvdial/wvdial_1.54.0.orig.tar.gz)

    STEP V Configure /etc/wvdial.conf to put phone number, user name and passowrd
    then use command ‘wvdialconf’ for configuring wvdial

    edit the file /etc/wvdial.conf to add phonenumber, username and passwd using command ‘gedit /etc/wvdial.conf’

    gedit /etc/wvdial.conf

    eg:
    [Dialer Defaults]
    Stupid Mode = on
    Modem = /dev/ttyUSB0
    Baud = 9216000
    Init = ATZ

    Phone = #777
    Username = XXXXXXXXXX
    Password = XXXX
    New PPPD = yes

    note:
    BSNL User’s Please check your username start with your STD code

    Ernakulam(Kerala, India) user STD code - 0484
    The username should be 4842345678

    STEP VI Connect to Internet
    Connect to Internet

    use command wvdial

    wvdial

    now you are connected to internet :)

    STEP VII How to detect modem automatically at start up

    We can put modprobe in startup by adding
    usbserial vendor=0×05c6 product=0×6000‘ to file “/etc/modules

    gedit /etc/modules
    usbserial vendor=0×05c6 product=0×6000

    After this you can just plug the modem to USB and use command ‘wvdial’ to connect to internet

    note: to run ‘wvdial’ as normal user, need privilege to use modem

    for that go to menu (gnome)

    Desktop -> Administration - > Users and Group

    select the user from list and press “Properties”, will pop the Properties window

    go to “User Privileges” tab and
    Select the option ‘Connect to internet using a modem” and click OK

    now this user can use command ‘wvdial’ to connect to internet

    Special Notes for those using IPTables for Direct connection

    How to share this connection using iptables

    normally this connection uses interface ppp0

    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

    now make this machine as the gateway :)

    Note : use command ‘ifconfig’ to find the interface after you connected to internet

  • Source : http://legreensolutions.com/index.php?option=com_content&task=view&id=19&Itemid=1

Tweaking grub settings : Ubuntu (5.10 / 6.06.1 / 6.10)

Most of you have probably at least heard of “grub” but may not be completely familiar with it. What it does or how to make it work for you is quite another story for most people. I’d like to outline a few minor tweaks that anyone can make to grub to update their boot-time options.

Your grub config on an Ubuntu system is outlined at /boot/grub/menu.lst. There is quite a lot of commenting in that file so, if you take the time to read through, you’ll should be able to figure out quite a bit on your own. I want to outline a couple things that I often tweak within grub.

First and foremost you should make a backup of the file before you make any changes. As always, there is a chance that you could make errors in your changes and it’ll save your day if you’ve made a backup. Make a backup using a command like:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst-backup

After you’ve made your backup copy you’ll want to edit the file to make a few changes. You would do that using the following:

sudo gedit /boot/grub/menu.lst

Now we get to the fun stuff! What to look at and what to change? So many questions. Below are some of the settings that can be changed within grub and what they do.

default - allows you to specify the default grub listing. This defaults to 0 and you generally don’t need to change this.

timeout - allows you to change the countdown before grub automagically boots into the default listing. By default it should be set to 3 (seconds). If you need more time to choose the kernel or OS to boot into you can change this. Simply change the entry from:

timeout 3

to something like

timeout 10

or, of course speed things up, setting it at

timeout 1

hiddenmenu - allows you to specify whether or not your grub menu will be hidden at boot time. By default it is hidden and prompts you to press ESC to see the menu. If you would prefer to see the menu each time you boot simply comment out the line. Example, you would change:

hiddenmenu

to

# hiddenmenu

The file then moves into some commented code to show you examples of listing and the style and options you can set. Below that underneath

## ## End Default Options ##

you’ll see the kernels or OS’ that you have listed for your system. These break down into four main options. This is an example of my current listing for the 2.6.17-10-generic kernel:

title Ubuntu, kernel 2.6.17-10-generic

root (hd0,0)

kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash

initrd /boot/initrd.img-2.6.17-10-generic

quiet

savedefault

boot

A few of these settings are optional but the required options are:

title - this is the menu listing you will see at boot. You can change this to whatever you’d like. An example could be:

title Ubuntu - The best distro ever! (2.6.17-10-generic)

(the reason that I listed the kernel version is so I can tell future updates or other customizations apart from this. You generally want to run the latest kernel and, in certain situations, run a previous. It is generally a good idea to list the kernel version in whatever “nickname” you set for your grub listing title.)

root - this is where the root of the file systems is located.  Your partitions may be someplace on hda, but hd is the very root. You won’t want to change this but you might notice a difference if you’re running a dual-boot system.

kernel - the kernel option is where to find and what kernel to use for this option. If you create a custom kernel you’ll need to specify the path to that file. Or, in some situations you might be booting multiple distributions and in that case you’d need to specify the path to each kernel.

Also, the root option specifies the partition to find the distribution or OS files. This must be set correctly in order to find the kernel and other options.

ro, quiet and splash - these are optional but load the pretty splash screen that you see at boot time.

initrd - this loads the image that goes along with the kernel option above. The kernel (vmlinuz) and initrd (img) file are generally stored in the same place. Make sure that your paths match the exact file if you are customizing your menu.lst.
savedefault - this refers to the default option listed above. As this is our default option and latest kernel it is specified as such. If you take a look at your file you’ll notice the first listing is the only one with the savedefault option.
You should be a little bit more confident in tweaking your grub listing at this point. There isn’t a lot to it but it is one of the most critical system settings. If you ruin your grub file your system (or any system on your machine!) will not boot. Be careful with it but, as usual, your system is only as powerful as you are educated so take the time to know how your system runs. In most cases you wont need to edit grub, but for those of you feeling adventureous perhaps try to change the timeout setting or change the title for your options. Best way to learn is to try!