what i am...???

Once upon a time, I,
dreamt I was a butterfly,
flittering hither and thither,
to all intents and purposes a butterfly.....
suddenly I awoke......
Now I do not know whether
I was then a man dreaming I was a butterfly,
whether I am now a butterfly dreaming I am a man

Sunday, June 22, 2008

Command line dialup in ubuntu 8.04

if you are interested in command line internet dialup in ubuntu 8.04 just follow down the steps given below.

  1. connect the wire from the modem to the computer
  2. open terminal
  3. enter password where ever needed
  4. type wvdialconf. some commands can be seen now
  5. now type sudo gedit /etc/wvdial.conf
  6. add 172222 after phone = (if you are using bsnl connection)
  7. set user name and password as your landline number with code
  8. save the file
  9. now type wvdial and you will be connected to the internet
if there is any error in any of the steps please mail me at junisesafvan@gmail.com me or comment here

Monday, June 16, 2008

increase screen resolution in ubuntu 8.04

i here by noticed my friend nithin's pc which is working on ubuntu 8.04 hardy has got low resolution. its maximum resolution is just 800 x 600. so i googled how to increse the resolution and now got good resolution of 1200 x 728 at 50Hz.

Following are the steps to be followed
use your password when ever required
  1. copy the following text and save it as xorg.conf in ur desktop

    # xorg.conf (X.Org X Window System server configuration file)
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    # Edit this file with caution, and see the xorg.conf manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg

    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"

    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"

    Section "Device"
    Identifier "Configured Video Device"

    Section "Monitor"
    Identifier "Configured Monitor"
    HorizSync 28-40
    VertRefresh 43-60
    modeline "800×600@56" 36.0 800 824 896 1024 600 601 603 625
    modeline "800×600@72" 50.0 800 856 976 1040 600 637 643 666
    modeline "800×600@75" 49.5 800 816 896 1056 600 601 604 625
    modeline "800×600@60" 40.0 800 840 968 1056 600 601 605 628
    Modeline "1024×768@60" 64.56 1024 1056 1296 1328 768 783 791 807
    Modeline "1152×720@60" 66.75 1152 1184 1432 1464 720 735 742 757
    modeline "1152×768@54" 64.995 1152 1178 1314 1472 768 771 777 806
    Modeline "1280×800@60" 83.91 1280 1312 1624 1656 800 816 824 841
    modeline "1280×854" 80.0 1280 1309 1460 1636 854 857 864 896
    modeline "1280×768@60" 80.14 1280 1344 1480 1680 768 769 772 795
    modeline "1280×720@60" 74.48 1280 1336 1472 1664 720 721 724 746
    modeline "1280×800@75" 107.21 1280 1360 1496 1712 800 801 804 835
    modeline "1280×768@75" 102.98 1280 1360 1496 1712 768 769 772 802
    modeline "1280×720@50" 60.47 1280 1328 1456 1632 720 721 724 741
    modeline "1280×800@60" 83.46 1280 1344 1480 1680 800 801 804 828
    modeline "1440×900@75" 136.49 1440 1536 1688 1936 900 901 904 940
    modeline "1440×900@60" 106.47 1440 1520 1672 1904 900 901 904 932
    modeline "1600×1024@60" 136.36 1600 1704 1872 2144 1024 1025 1028 1060
    modeline "1680×1050@60" 147.14 1680 1784 1968 2256 1050 1051 1054 1087
    modeline "1680×1050@75" 188.07 1680 1800 1984 2288 1050 1051 1054 1096
    modeline "1920×1200@60" 193.16 1920 2048 2256 2592 1200 1201 1204 1242

    Section "Screen"
    Identifier "Default Screen"
    Device "Configured Video Device"
    Monitor "Configured Monitor"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1440×900@60" "1600×1024@60" "1440×900@75" "1680×1050@60" "1280×800@60" "1680×1050@75" "1280×720@50" "1920×1200@60" "1280×768@75" "1280×800@75" "1280×720@60" "1280×768@60" "1280×800@60" "1280×854" "1152×720@60" "1152×768@54" "1024×768@60" "800×600@60" "800×600@75" "800×600@72" "800×600@56"

    # edited by junise safvan
    # contact on junisesafvan@gmail.com

    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"

  2. now take the backup of the original xconf.org by typing the following command in terminal

    sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.1

  3. now move the new file to the required location by typing the following command in terminal

    sudo mv /home/'ur username'/Desktop/xorg.conf /etc/X11/xorg.conf

  4. now press ctrl+alt+backspace for kernal restart

  5. login back and open system => preference => screen resolution

    select the resolution you wanted and press apply

  6. if you cant read any thing with this resolution (usually such things doesn't happens), press alt+ctrl+F1 to enter the text mode

  7. type sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.2

    sudo mv /etc/X11/xorg.conf.backup.1 /etc/X11/xorg.conf

  1. Press Alt+Ctrl+F1.
  2. Enter the login detail.
  3. Enter sudo /etc/init.d/gdm stop
  4. Enter sudo Xorg -configure
  5. The new xorg.conf file xorg.conf.new will be created in the home folder.
  6. Back up the original xorg.conf file
    sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bkup1
  7. Copy the new xorg file to /etc/X11/
    sudo cp ~/xorg.conf.new /etc/X11/xorg.conf
  8. Start gdm
    sudo /etc/init.d/gdm start

Select the appropriate resolution from system preference.......

Friday, June 13, 2008

wifi and dialup modem for compaq presario c700

one of kake's friend mr. siju came to ascent for installing ubuntu last month. kake installed gutsy in his lap. but gutsy does not support many drivers for compaq presario. many things like wifi, dialup modem etc may not work with this installation. so he came again for installing these drivers along with some other softwares.

hence i installed hardy heron in his lap. but the driver problem still persists. even wifi cannot be configured. i googled this error and understood the problem is with the restricted hardware driver atheros hardware access layer.

to install the wifi driver for this laptop, follow the following steps.
  1. open system>administration>hardware drivers
  2. deselect atheros hardware access layer (HAL)
  3. now download this link
  4. extract this file by right clicking it
  5. open synaptic and ensure the build-essential is installed
  6. open terminal and cd to the extracted folder
  7. type sudo make clean
  8. type make
  9. type make-install
  10. type modprobe ath_pci
  11. reboot the system
follow the steps described below for installing the dialup modem

  1. download alsa driver
  2. run it by double clicking
  3. download hsfmodem driver
  4. extract this file
  5. run the extracted file
  6. script in terminal sudo gedit /etc/wvdial.conf
  7. add 172222 after phone =
  8. set user name and password as your landline number with code
  9. save and close the gedit window
  10. type wvdial to get connected to network
if you had any problems in any steps or want to install dialup modem in any other lap, feel free to contact me on junisesafvan@gmail.com

Friday, June 6, 2008

matlab robot

i got a mini project to be guided on the topic remote controlled robot from the mes college of engg. but the students told me that they want to do a different project which must be noticed even though the IR remote controlled devices are very common project.

hence i discussed it with kake. kake told me to avoid the remote part and interface the robot with a PC via serial port. i was afraid since i only know the serial communication using the turboC which has many tedious works to be done.

kake suggested me to try with matlab which has a lot of toolboxes. he was sure there will be toolbox for serial communication via serial port.

i googled with the hope to complete the project at least in one month. but i got a set of statements with we can transmit a single byte or even a file itself serially

so tried with sending some byte of data for each action to takeplace such as '0' for forward motion, '1' for turning left, '2' for turning right and '3' for stopping all actions.

the code was having just 8-10 lines and i made it in conditioned infinite loop. if i am entering any byte other than the mentioned one the program will exit.

in the robot side i used a microcontroller AT89C52 to control the motion of the robot. it can serially communicate with the outside if the communication is in CMOS logic. but the RS232 is TTL logic which won't respond with our microcontroller. so we have to use a new ic to convert TTL logic to CMOS and vice versa.

to avoid data loss we have to assign a fixed baud rate at the transmitter side and at the receiver side. the baud rate i used is 4800 bps

i programmed the microcontroller to frequently check for the reception of data. on the basis of the received bit, i switched the control to different operations as already mentioned.

but the difficulty with this was, we have to type each byte inside single quotations. for example while the robot is traveling at any edges, we want to stop the robot, we type '4' and press enter. this will take some time and the robot may fall down. my students also requested to make the program larger. so i went for using GUI in matlab.

it was very simple to make GUI in matlab using guide command. i made five buttons namely forward, left, right, stop and close. while we press the any button the corresponding byte will be serially sent to the robot. close is used to close the GUI window.

to have more details on this project please get to my wiki page.

Thursday, June 5, 2008

Maxima, a Computer Algebra System

Maxima is a free computer algebra system based on a 1982 version of Macsyma. It is written in Common Lisp and released under the GNU General Public License and runs on all platforms such as Unix, BSD, and Linux as well as under Microsoft Windows.

Maxima is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, and sets, lists, vectors, matrices, and tensors.

I got the idea of maxima while attending the class of Mr. Deepak sir of NITC in last foss meet. Now i am using it usually. try to use it find the power of maxima.

you can download maxima from this link. you can use windows installer for using in windows and for linux/mac you have to compile the sourcecode which can be downloaded from the same page.

but the problem with maxima is that it has no graphical user interface. if you have any difficulties in using maxima in the terminal, there comes a derivative of maxima called wxmaxima which has got the GUI interface.

you can download the windows version of wxmaxima from here.
to have the linux version you can either use synaptic or download the sourcecode from here and compile it.