Wednesday, July 8, 2009

Year2038 Problem


The year 2038 problem or unix millennium bug(same as y2k problem) may cause some computer software to fail before or in the year 2038. The problem affects all software and systems that store system time as a signed 32 bit integer .For the uninitiated, time_t is a data type used by C and C++ programs to represent dates and times internally. time_t is actually just an integer, a whole number, that counts the number of seconds since January 1, 1970 at 12:00 AM Greenwich Mean Time. A time_t value of 0 would be 12:00:00 AM (exactly midnight) 1-Jan-1970, a time_t value of 1 would be 12:00:01 AM (one second after midnight) 1-Jan-1970, etc.

By the year 2038, the time_t representation for the current time will be over 2 140 000 000. And that's the problem. A modern 32-bit computer stores a "signed integer" data type, such as time_t, in 32 bits. The first of these bits is used for the positive/negative sign of the integer, while the remaining 31 bits are used to store the number itself. The highest number these 31 data bits can store works out to exactly 2 147 483 647. A time_t value of this exact number, 2 147 483 647, represents January 19, 2038, at 7 seconds past 3:14 AM Greenwich Mean Time. So, at 3:14:07 AM GMT on that fateful day, every time_t used in a 32-bit C or C++ program will reach its upper limit.

One second later, on 19-January-2038 at 3:14:08 AM GMT, disaster strikes.

Read More

Sunday, July 5, 2009

Connecting Internet In Ubuntu Using any USB Dial Up Modem(Telson CDMA Modem)

I am writing this with my experience I did this in the BSNL Telson CDMA Handset Modem . and got connected to Internet in Ubuntu with out installing any other driver or software. You can do this in 4 simple step in just 2 minute .
Step 1
Before we start first we have to identify that does your modem is dictated in the ubuntu step 1 is for that.
Go to Application>> Accessories >> Terminal and type
sudo lsusb then the prompt will ask your sudo(root) Password and if the password is correct All usb devices will be desplayed in the terminal. Check your modem name is in the list. If it is there you can go to the second step
arun@glasshome:~$ sudo lsusb
[sudo] password for arun:
Bus 007 Device 004: ID 04f2:b016 Chicony Electronics Co., Ltd
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 004: ID 1165:0002 Telson Electronics Co., Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Fo
undation 1.1 root hub
Bus 002 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root
hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 15d9:0a4c
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
arun@glasshome:~$



Step 2
Type this in terminal
sudo wvdialconf /etc/wvdial.conf
wvdialconf is used to build the configuration file for wvdial. (run it as root or use sudo)…running it as normal user will result in permission errors as the file being edited belongs to root…
$ sudo wvdialconf
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
Modem Port Scan<*1>: S0 S1 S2 S3
WvModem<*1>: Cannot get information for serial port.

ttyACM0<*1>: ATQ0 V1 E1 -- OK

ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ
0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Telson
ttyACM0<*1>: Speed 4800: AT -- OK ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800;
that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB m
odem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf. ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

If u came this far, then comes the
step 3
Edit the default Modem configuration by typing the command
sudo gedit /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Modem = /dev/ttyACM0
Baud = 460800
; Phone =
; Password =
; Username =

you can see the file is like this.
Edit it add ur dialing number in the place of
Like that add your data and save the file . Dont forgot to remove the ; symbol before the details in the file.
Step 4
Type sudo wvdial in terminal and The wvdial software start dialing the connection and Internet is Now connected and enjoy... Dont close the termnal because we are connected through the terminal.
Read More
Powered By Blogger · Designed By Seo Blogger Templates