Custom Search

Monday, October 12, 2009

Setting dial up connection using pppconfig

*************** SETTING DIAL UP CONNECTION START *****************

Setting dial up connection using pppconfig

-----------------------------1
#apt-get install ppp pppconfig

-----------------------------2
root@priyar:~# pppconfig

***Main Menu***
Select "Create" with the arrow keys, then press Enter key.

***Provider Name***
Type provider (Eg:bsnl) and press Enter key.

***Configure Nameservers (DNS)***
select the "Dynamic" option and press Enter key.

***Authentication Method for provider***
Select "Chat" with the arrow keys, then press Enter key.

***Login Prompt***
Change "ogin:" to "Username:",then press Enter key. <---- Important in the case of BSNL connection.

***Password Prompt***
Use default or Change "ssword:" to "Password:",then press Enter key.

***User Name***
Enter the username given to you by your ISP.

***Password***
Enter the password your ISP gave you.

***Speed***
Enter your modem port speed (e.g. 9600, 19200, 38400, 57600, 115200).I suggest that you leave it at 115200.

***Pulse or Tone***
Select method of dialing.

***Phone Number***
Enter the number to dial.(Eg:172222)

***Choose Modem Config Method***
Select "yes" and press Enter key.

***Select Modem Port ***
Select "Manual Enter the port by hand." and press Enter key.

***Manually Select Modem Port***
Type /dev/ttySHSF0 and press Enter key.

***Properties of provider***
Select "Finished Write files and return to main menu" and press Enter key.

Finished configuring connection and writing changed files.The chat strings for
connecting to the ISP are in /etc/chatscripts/bsnl, while the options for pppd
are in /etc/ppp/peers/bsnl.You may edit these files by hand if you wish.

***Main Menu***
Select "Quit Exit this utility" and press Enter key.

-----------------------------3
To establish a connection.
root@priyar:~# pon bsnl

-----------------------------4
To view the progress of the connection.

root@priyar:~# tail -f /var/log/messages

Oct 7 19:07:04 priyar pppd[4453]: pppd 2.4.4 started by root, uid 0
Oct 7 19:07:05 priyar chat[4455]: abort on (BUSY)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO CARRIER)
Oct 7 19:07:05 priyar chat[4455]: abort on (VOICE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO DIALTONE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO DIAL TONE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO ANSWER)
Oct 7 19:07:05 priyar chat[4455]: abort on (DELAYED)
Oct 7 19:07:05 priyar chat[4455]: send (ATZ^M)
Oct 7 19:07:05 priyar chat[4455]: expect (OK)
Oct 7 19:07:05 priyar chat[4455]: ATZ^M^M
Oct 7 19:07:05 priyar chat[4455]: OK
Oct 7 19:07:05 priyar chat[4455]: -- got it
Oct 7 19:07:05 priyar chat[4455]: send (ATDT172222^M)
Oct 7 19:07:05 priyar chat[4455]: expect (CONNECT)
Oct 7 19:07:05 priyar chat[4455]: ^M
Oct 7 19:07:31 priyar chat[4455]: ATDT172222^M^M
Oct 7 19:07:31 priyar chat[4455]: CONNECT
Oct 7 19:07:31 priyar chat[4455]: -- got it
Oct 7 19:07:31 priyar chat[4455]: send (^M)
Oct 7 19:07:31 priyar chat[4455]: expect (Username:)
Oct 7 19:07:31 priyar chat[4455]: 115200 ^M
Oct 7 19:07:32 priyar chat[4455]: C^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: *******************************************^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: * WELCOME TO NIB C1 NODE, DOT, KOLLAM *^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: * !!!!! WISH YOU HAPPY SURFING !!!!! *^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: *******************************************^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: User Access Verification^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: Username:
Oct 7 19:07:32 priyar chat[4455]: -- got it
Oct 7 19:07:32 priyar chat[4455]: send (4752333333^M)
Oct 7 19:07:32 priyar chat[4455]: expect (ssword:)
Oct 7 19:07:32 priyar chat[4455]: 4752333333^M
Oct 7 19:07:32 priyar chat[4455]: Password:
Oct 7 19:07:32 priyar chat[4455]: -- got it
Oct 7 19:07:32 priyar chat[4455]: send (??????)
Oct 7 19:07:32 priyar chat[4455]: send (\d)
Oct 7 19:07:33 priyar pppd[4453]: Serial connection established.
Oct 7 19:07:33 priyar pppd[4453]: Using interface ppp0
Oct 7 19:07:33 priyar pppd[4453]: Connect: ppp0 <--> /dev/ttySHSF0
Oct 7 19:07:40 priyar pppd[4453]: PAP authentication succeeded
Oct 7 19:07:40 priyar pppd[4453]: local IP address 61.1.233.144
Oct 7 19:07:40 priyar pppd[4453]: remote IP address 61.1.232.5

-----------------------------5
To check connection.
root@priyar:~#ping www.google.com
or
root@priyar:~# nslookup www.google.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 66.102.7.99
Name: www.l.google.com
Address: 66.102.7.103
Name: www.l.google.com
Address: 66.102.7.104
Name: www.l.google.com
Address: 66.102.7.105
Name: www.l.google.com
Address: 66.102.7.106
Name: www.l.google.com
Address: 66.102.7.147

-----------------------------6
Connection termination.
root@priyar:~# poff bsnl

-----------------------------
*************** SETTING DIAL UP CONNECTION END *****************

CSS Tutorials 1

CSS Tutorials 1
********************************************************1
CSS --> Language used for web page layout and format.

It allow to apply special properties to any elements or tags in the html page.

-----------------------------------Method-1

Simplest way to apply CSS properties to html tags is to use "style" attribute with html in tag.

As value of "style" attribute we can specify one or more CSS properties.


Example:>>>>1

style="color:red;font-size:small;text-align:center;"

Here color,font-size,text-align are CSS property name and red,small,center are corresponding property values.
Here semicolon is used for seperate two CSS properties.
Here colon is used for seperate CSS property name and value.


<div style="color:red;font-size:small;text-align:center;"> Hello How are you </div>

This method need more coding.
This method is easy to understand but not using widly.

-----------------------------------Method-2

In this method all our style informations are put in one place called stylesheet.
Using html tag "style" .

<style type="text/css">
------ put all our style informations here ------
</style>

Here "type" is an attribute of "style" tag.


Example:>>>>1

<style type="text/css">
#test1
{
color:red;
font-size:small;
text-align:center;
}
</style>

<div id="test1"> Hello How are you </div>


# ----> is called CSS selector,because it is used for select one or more element or tag with in tha page to apply CSS property.
# ----> it select element or tag by ID.
Here id "test1" is used for uniqly identify the div tag with in that html page.


Example:>>>>2

<style type="text/css">

#test1{ <--------- Rule-1
color:red;
font-size:small;
text-align:center;
}

h1{ <--------- Rule-2
color:red;
font-size:small;
}

p{ <--------- Rule-3
text-align:justify;
}

</style>

----------------------Method-3
External stylesheet.
Link external stylesheet file to our page like image.
This method reduce code to be downloaded by the browser.
Web browser have to download external stylesheet file only once.
The extension of external stylesheet is "*.css".
This is most widely using method.

The html tag "link" is used to link stylesheet file.

<link type="text/css" rel="stylesheet" href="stylesheet1.css" />

Here "href" attribute of "link" tag specify the external stylesheet to be link.

===================

********************************************************2
CSS SELECTORS
===================

CSS selectors specify or select the parts of the page we want to style and CSS properties we want to apply that parts.
These selectors style our page based on properties of elements or html tags.
Different types of CSS selectors.
1) Type selector or element(tag) name selector.
2) ID selector.
3) CLASS selector.

===================
1) Type selector or element(tag) name selector.

It can apply to all tags or elements of specific type in a document or page.
It specify the name of the html tag.
h1{
color:red;
font-size:small;
}

===================
2) ID selector

ID selector start with "#".
ID means unique identifier.
It only can apply to one element or tag in a page.
Using "id" attribute of html tags or elements.
we can't have two element or tag with same ID in same page,because it not allowed in some browser.

Example:>>>>1

Suppose we want to apply same style to all paragraph in a page.

<style type="text/css">
#para
{
text-align:justify;
}
</style>

<p id="para"> some text1 </p>
<p id="para">some text2 </p>

Here we created an ID selector "para" for all "p" tags in this page.
But we can't have two element or tag with same ID in same page,So it not possible.

In this type situations we using "class" attribute of html tags or elements.

===================
3) CLASS selector

CLASS selector start with dot ".".
Using "class" attribute of html tags or elements.
It can apply to any element or tag in a perticular class in a page.

Example:>>>>1

Suppose we want to apply same style to all paragraph in a page.

<style type="text/css">
.para
{
text-align:justify;
}
</style>

<p class="para"> some text1 </p>
<p class="para">some text2 </p>
===================
********************************************************3
Combined Selector
===================
These selectors style our page based on properties of elements or html tags.
1)Type selector or element(tag) name selector with ID selector.
2)Type selector or element(tag) name selector with CLASS selector.
3)Type selector or element(tag) name selector with ID selector and CLASS selector
4)Multiple CLASS selector.
5) PSEUDO CLASS selector.
6)Attribute selector.

===================
1)Type selector or element(tag) name selector with ID selector.

<style type="text/css">
p#para <------- This selector select any "p" tag with ID "para"
{
text-align:justify;
}
</style>

<p id="para"> some text </p>

===================
2)Type selector or element(tag) name selector with CLASS selector.

<style type="text/css">
p.para <------- This selector select any "p" tag with CLASS "para"
{
text-align:justify;
}
</style>

<p class="para"> some text </p>

===================
3)Type selector or element(tag) name selector with ID selector and CLASS selector

<style type="text/css">
p#ipara.cpara <------- This selector select "p" tag with ID "ipara" and CLASS "cpara" only,this is rarely used.
{
text-align:justify;
}
</style>

<p class="cpara" id="ipara"> some text </p>

===================
4)Multiple CLASS selector.

We can assign more than one class to given html elment by separating class name with space in class attribute of tags.
Combining two class selector into single selector.

<style type="text/css">
.cpara1.cpara2 <------- This selector select tags with both CLASS "cpara1" and "cpara2" only.
{
text-align:justify;
}
</style>

<p class="cpara1 cpara2" > some text </p>

===================
5) PSEUDO CLASS selector.

Suppose we want to change color of hiperlink to red.

<style type="text/css">
a <------- This is an elment selector for html tag "a".
{
color:red;
}
</style>

<a href="www.google.com"> Click here </a> <--- Here element selector will work correctly.
<a name="name1"> Hello how are you </a> <--- Suppose we not need to color it ,But above element selector also will coloring it to red,that is a problem.

To avoid this type problem we using PSEUDO CLASS selector.

------------------------------------------------<>
Here ":link" is the PSEUDO CLASS and it combined with element selector "a".

<style type="text/css">
a:link <------- It select all elements or tags of type "a" when they are a link
{
color:red;
}
</style>

<a href="www.google.com"> Click here </a>

Problem solved.

------------------------------------------------<>
Some PSEUDO CLASSES

:link <--- hiperlink
:visited <--- visited link
:hover <---- mouse over, we can apply to any elements or tags.
:active <---- clicked or mouse press down.
:focus <---- keyboard focus ,we can apply to any elements or tags

<style type="text/css">
a:link <------- It select all elements or tags of type "a" when they are a link.
{
color:red;
}

a:visited <------- It select elements "a" when they are visited and apply style.
{
color:blue;
}

a:hover <------- It select elements "a" when mouse over and apply style.
{
color:yello;
}

a:active <------- It select elements "a" when clicked or mouse press down and apply style.
{
color:green;
}

a:focus <------- It select elements "a" when keyboard focus and apply style.
{
color:orange;
}
</style>

===================
6)Attribute selector.

Suppose we want to set the text size in a text field.
<style type="text/css">
input <--------It select all "input" tags and apply style, that is a problem.
{
font-size: 200%;
}
</style>

<form action="" method="POST">
<div><input type="text" name="unam" value=""/></div>
</div><input type="submit" name="submit" value="submit"/></div>
</form>

Here style will be applied to both text field and submit button.We can solve this problem by using "ID" or "CLASS" selector.
We can also solve this problem by using Attribute selector.

------------------------------------------------<>
<style type="text/css">
input[type="text"] <--------It select only "input" tags with type attribute is text (type="text") and apply style.
{
font-size: 200%;
}
</style>

<form action="" method="POST">
<div><input type="text" name="unam" value=""/></div>
</div><input type="submit" name="submit" value="submit"/></div>
</form>

Problem solved.
===================
********************************************************4
Complex Selectors (Advanced Selectors)
===================
Complex selectors style our page not only based on properties of elements or tags but also based on structure of our page.
1)Selector Grouping.
2)Sentence Selector.
3)Child Selector (>).
4)jsent Selector (+).
5) PSEUDO Element Selector.

===================
1)Selector Grouping

It allow to group more than one selectors and apply to ally of them a common set of CSS properties

------------------------------------------------<>
h1{
color:red
font-family: verdana,sans-serif; <----
}

p{
text-align:justify;
font-family: verdana,sans-serif; <----
}

Here tags "h1" and "p" have same property "font-family: verdana,sans-serif".
We can make it so simple by using "Selector Grouping" as follows.

------------------------------------------------<>
h1,p <---- grouping tag selectors "h1" and "p" and applying common properties
{
font-family: verdana,sans-serif; <----
}

h1{
color:red
}

p{
text-align:justify;
}

===================
2)Sentence Selector

Suppose we want to make only paragraph one red color with out affecting paragraph three.
Note here class of paragraph one and paragraph three are same.
We can do it by using "ID selector" in paragraph one,but that is inconveniant.So we using "Senetence selector" for it.
Using "Sentence selector" we can select "p" tag of class "leader" that is inside the "div" tag of class "latest".
Here style is applied to only right most element or tag that is "p.leader", and the previous elements ".latest" or "div.latest"
are used to specify the context or enclosing elements.

<style type="text/css">
.latest p.leader <--- means apply style to tag "p" of class "leader" which is inside tha tag with class "latest".
{
color:red;
}
OR
div.latest p.leader <--- means apply style to tag "p" of class "leader" which is inside tha tag "div" of class "latest".
{
color:red;
}
</style>


<div class="article latest"> <--- this "div" tag has two classes.
<p class="leader"> paragraph one </p>
<p> paragraph two </p>
</div>

<div class="article">
<p class="leader"> paragraph three </p>
</div>
------------------------------------------------<>
Example:
div.latest div.new p.new
{
color:blue;
}

Means apply style to right most element "p.new" which is inside the element "div.new"
which is inside the tag "div.latest".

===================
3)Child Selector (>)

------------------------------------------------<>
Suppose we want to display List items in the 'Unordered list' are in 'bold' and List items
in the 'Ordered list' are in 'normal'.
we can do it by using "Sentence selector"

<style type="text/css">
ul li <---apply style to all List items inside the Unordered list.(Rule-1)
{
font-weight:bold;
}

ul ol li <---apply style to all List items that inside the Ordrered list that inside the Unordered list.(Rule-2)
{
font-weight:normal;
}
</style>

<ul>
<li>List item-1</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-2</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-3</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>
</ul>

Here Rule-1 apply "bold" style to all list items inside the Unordered list.Then the Rule-2 remove this "bold"
style from only list items that inside the Ordered list that inside the Unordered list and apply new style "normal".
We can also do it with "Child selector" as follows.

------------------------------------------------<>
<style type="text/css">
ul > li <---means List items that directly inside the Unordered list.
{
font-weight:bold;
}

ol > li <---means List items that directly inside the Ordered list.
{
font-weight:normal;
}
</style>

<ul>
<li>List item-1</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-2</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-3</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>
</ul>

After this 'List items-1','List items-2','List items-3' are displayed in "bold" and
all 'List item-a','List items-b' inside the Ordrered list are displayed in "normal" style.

------------------------------------------------<>
ul <---- Unordered list
ol <---- Ordered list
li <---- List items(Ordered or Unordered)

===================
4)jsent Selector (+).

User to apply stye to a perticulat element or tag that come immediatlyt after
a perticular tag.

ul + p <-- apply style to "p" tag that come immediatly after "ul" tag.
{
text-indent:0;
}

===================
5)PSEUDO Element Selector.

"PSEUDO Element" actually not an element or tag in the html document.

------------------------------------------------<>
Examples of "PSEUDO Elements" are:
:first-line
:first-letter

------------------------------------------------<>
p:first-line <--- to select first line of paragraph and apply style.
{
font-weight:bold;
}

p:first-letter
{
font-sizet:300%;
color:red;
}
===================
********************************************************5
INHERITANCE
===================
All text properties support a special value called "inherit".

There are two types of properties is CSS.
1) Properties that inherit value from parent element or tag(Inherited Properties).
2) Properties that do not inherit value from parent element or tag(NonInherited Properties).


We can make 'NonInherited Properties' to 'Inherited Properties' by using the property value "inherit".
for example "border" propery is a NonInherited Propertiey.

All of the text properties in CSS are Inherited properties,that is they are automatically inherited to
child elements or tags by default.So not need to using the property value "inherit" in child elements or tags.

Visit "www.w3.org" to find which properties are Inherited and NonInherited.

The default value of "color: property is "inherit", that is "color:inherit".This means the "color" property
inherit value from its parent element or tag.

------------------------------------------------<>

Impotant Note : All browsers contain some default predefined stylesheet Rules for ecah tags to set default styles.
User defined stylesheet Rules overriding these styles.

That is there are two types of Rules.
1)Browser built in stylesheet Rules.
2)User defined stylesheet Rules.

These two types of Rules are combined to get finished style.
The process of combining the properties from multiple Rules for a perticular tag to get finished result is called CASCADING.


a:link{
text-decoration:none;
}

Browser contain a default Rule to set 'underline' for hyperlink.
This stylesheet override this default 'underline' style and removing underline from hyperlink.


------------------------------------------------<>
<style type="text/css">
body{ <----- Rule-1
color:red;
font-family: verdana,sans-serif;
border:1px solid blue;
}

ul{ <----- Rule-2
border:inherit;
}
</style>

<body>
<p> Paragraph one </p>
<p> Paragraph two </p>

<ul>
<li>List item-1</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-2</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>

<li>List item-3</li>
<ol>
<li>List item-a</li>
<li>List item-b</li>
</ol>
</ul>
</body>

Here "body" is the parent element of tags "p","ul","li" and "ol".
So all text properties specified in the parent element are by default automatically
inherited to all child elements.So here text properties "color:red" and "font-family: verdana,sans-serif"
are automatically inherited to child tags.So we can see all text in this page in color red and font verdana.
Here "border:1px solid blue;" is a Noninheried property ,so it not automatically inherited to child tags.If you want
to inherit this "border" property to a perticular child tag, then we need to explicitly specify it in style sheet of that tag.
Here we inherited the Noninherited property "border" from parent tag "body" to child tag "ul" by specifying explicitly
in it in style sheet of that "ul" tag

------------------------------------------------<>
<style type="text/css">
body{
color:red;
font-family: verdana,sans-serif;
border:1px solid blue;
}

ul{ <------- Explicitly inheriting the Noninherited property "border".
border:inherit;
}

p,ol{ <----- Overriding the default inherited property "color:red" with "color:black".
color:black;
}
</style>

------------------------------------------------<>
<style type="text/css">
ul{
color:blue;
}

ol{
color:black;
}
</style>

Here "ul" is the parent tag of "ol" tag.So inherited property "color:blue" is automatically inherited to child tag "ol".
Here we Overriding the default inherited property "color:blue" with "color:black".
===================
********************************************************6
CASCADING
===================
Important feature of CSS.
CASCADING is a process by which an element or tag goes through the Rules in the stylesheet and comes at other end when it finish styling.
When an element or tag goes through the stylesheet it select the maching Rules and apply styles specified in that Rules.
For each elements or tags in the html document the browser goes through the Rules in the stylesheet and comes at other end.
The process of combining the properties from multiple Rules for a perticular tag to get finished result is called CASCADING.
CASCADING does not necessary to happend from top to bottom of our stylesheet.

The order in which the Rules are declared are one of the factor that control the order in wich they are applied to the elements or tags.
Order of Rules in stylesheet are important.

------------------------------------------------<>
You can put Rules in stylesheet at any order you like.In this case
we need an other way to controling the order in which stylesheet Rules are applied to elements or tags.
For that CSS using SPECIFICITY.

Most specific "Selector" of an element or tag have higher priority and apply last.
If specificity of two Rules are different then order does not matter.
Order of two Rules are matter only when they are equaly specific, in this case thier order specify the priority.
Properties in the Higher priority Rule apply last.

------------------------------------------------<>
How browser Measuring SPECIFICITY(priority).

1)Browser first break up Grouped selectors into seperate selectors
2) then count number of IDs appears in the selector.
3) If two Rules have same number of IDs,then the browser count number of CLASS or PSEUDO in the selectors of perticular tag.
4) If two Rules of a perticulat tag have same number of CLASS or IDs,then the browser count number of properties in each Rules.
If number of properties are same,then the browser apply the Rules in the order they are specified in the stylesheet.

------------------------------------------------<>
1)Browser first break up Grouped selectors and make seperate selectors.
CSS actually treat Grouped selectors as seperate Rule for each selectors.
Grouped selectors are seperated by comma.

----------------Examples------------------
a:link,a:visited
{
font-style:normal;
font-weight:normal;
text-decoration:none
}

CSS treat this Grouped Selector as seperate selectors as follow:

a:link <----Rule-1
{
font-style:normal;
font-weight:normal;
text-decoration:none
}

a:visited <----Rule-2
{
font-style:normal;
font-weight:normal;
text-decoration:none
}

2) then count number of IDs appears in the selector.

----------------Examples------------------
<style type="text/css">
#ibody .cpara1 <------Rule-1
{
color:blue;
}

.cpara1 <------Rule-2
{
color:red;
}
</style>

<body id="ibody">
<p class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 contain one ID and one CLASS , and Rule-2 contain one CLASS.
So Rule-1 has higher priority because it contain one ID.So properties in the Rule-1 apply last.
So here Paragraph one and two are displayed in "Blue" color.
Here actually Rule-2 firstly apply style "color:red" to Paragraph one and two,then the Rule-1 override this
style with "color:blue".

----------------Examples------------------
<style type="text/css">
.cpara1 <------Rule-1
{
color:red;
}

#ipara1.cpara1 <------Rule-2
{
color:blue;
}
</style>

<body id="ibody">
<p id="ipara1" class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-2 has higher priority(specificity) so it apply last.
Here actually Rule-1 firstly apply style "color:red" to Paragraph one and two,then the Rule-2 override this
style with "color:blue".
So here Paragraph one display in "blue" color and Paragraph two in "red" color.

3) If two Rules have same number of IDs,then the browser count number of CLASS or PSEUDO in the selectors of perticular tag.

----------------Examples------------------
<style type="text/css">
#ibody p.cpara1 <------Rule-1
{
color:blue;
}

#ibody p <------Rule-2
{
color:red;
}
</style>

<body id="ibody">
<p class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 and Rule-2 have same number of IDs.So browser count number of CLASSes.
Here Rule-1 has one CLASS and Rule-2 has no CLASS.So Rule-1 has higher priority(specificity) and apply last.

----------------Examples------------------
<style type="text/css">
p.cpara1 <------Rule-1
{
color:blue;
}

p <------Rule-2
{
color:red;
}
</style>

<body id="ibody">
<p class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 and Rule-2 have zero IDs.So browser count number of CLASSes.
Here Rule-1 has one CLASS and Rule-2 has no CLASS.So Rule-1 has higher priority(specificity) and apply last.

4) If two Rules of a perticulat tag have same number of CLASS or IDs,then the browser count number of properties in each Rules.
If number of properties are same,then the browser apply the Rules in the order they are specified in the stylesheet.

----------------Examples------------------
<style type="text/css">
p.cpara1 <------Rule-1
{
color:red;
font-weight:bold;
}

p.cpara1 <------Rule-2
{
color:blue;
}
</style>

<body id="ibody">
<p id="ipara1" class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 and Rule-2 have zero (same number of) IDs and same number of CLASSes.So the browser count
number of properties in Rule-1 and Rule-2.Here Rule-1 has more properties,so it has higher priority(specificity)
and apply last.So Paragraph one and two display in "red" and "bold".

----------------Examples------------------
<style type="text/css">
a:link,a:visited <------Rule-1
{
font-style:normal;
font-weight:normal;
text-decoration:none;
}

a:hover,a:focus <------Rule-1
{
text-decoration:underline;
}
</style>

Here browser first seperate the grouped selectors.So we get 4 selectors "a:link","a:visited","a:hover" and "a:focus".
Here number of IDs,CLASSes and PSEUDO classes of 4 selectors are same.So the browser count number of
properties in each selectors.Here selectors "a:link" and "a:visited" have more number of properties, so it have higher
priority and apply last.

----------------Examples------------------
<style type="text/css">
p.cpara1 <------Rule-1
{
color:red;
}

p.cpara1 <------Rule-2
{
color:blue;
}
</style>

<body id="ibody">
<p id="ipara1" class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 and Rule-2 have same priority,so the browser apply ths style in the order of Rules in the stylesheet.
That is apply Rule-1 first then Rule-2.So the Paragraph one and two are displayed in "blue" color, because Rule-2
override Rule-1.

===================
!imporant
---------------------------------------
This is an another way to control the order in which properties are applied to elements or tags in our page.
This method is used for give gratest priority to perticular propertyand is applied last after all other properties have been applied.
Here we using the keywors "!important" to specify grater priority.

Note: Avoid using "!important",that is not a good method.It is mainly usefull when you designing a website using Content
Management System(CMS).Because CMS using its own stylesheet. To override this stylesheet we can use this "!important"
technique.

<style type="text/css">
p
{
font-style:normal;
font-weight:normal;
color:red !important; <--- We using keyword "!important" to give higher priprity to this property
}
</style>

----------------Examples------------------
<style type="text/css">
p.cpara1 <------Rule-1
{
color:blue;
}

p <------Rule-2
{
font-style:normal;
font-weight:normal;
color:red !important; <--- We using keyword "!important" to give higher priprity to this property
}
</style>

<body id="ibody">
<p class="cpara1"> Paragraph one </p>
<p class="cpara1"> Paragraph two </p>
</body>

Here Rule-1 has one CLASS and Rule-2 has no CLASS.So Rule-1 has higher priority(specificity) and apply last.
Here when applying low priority Rule-2, the browser not apply the property "color:red !important" to "p" tag,because it is marked as
"!important" browser hold(saved) this property and apply it only last after applying higher priority Rule-1.
So here even Rule-1 has higher priority, Paragraph one and two are displayed in "red" color.

Here browser apply style by going on 2 passes.
In the first pass browser only apply properties which do not have "!important" marking.
In the second pass browser only apply properties which have marked "!important".

===================
CASCADING STEPS

For each element or tag in the html document the browser apply style to it in 4 passess.

1) The first pass for the built in stylesheet of the browser.Webdevelopers dont warry about that.
2)The second pass is for our stylesheet(auther stylesheet).In this pass only includes the properties that not marked "!important".The browser
orders the Rules according to their specificity(priority) by First counting the number is IDs then number of CLASSes or
PESUDO classes and finaly the number of properties in each selector.If after counting these 3 things there are any selectors that
are equaly match in terms of specificity(priority),then they are apply in the order they are exist in the stylesheet.
Then for each selector that match the current element or tag the properties specified in that Rule are applied to it.The least priority
selectors are apply first and higher priority selectors are apply last.
3) In the thired pass same thing(thing happend in Pass 2) is happend but only for the properties which are marked "!important".
4)The forth pass is for the user control properties that have marked "!important" in the user stylesheet.We dont worry about it.

===================
********************************************************7
CSS Properties
===================
color:red;
or
color:#222222;
------------------------------------------------<>
text-align:right; <----Align text to right
text-align:left;
text-align:center;
text-align:justify; <----- lines are wrap at exact spot on the same page and give a rectangular block look to paragraph.
justify is not realy recomented to use on web.
------------------------------------------------<>
CSS support number of different unit of measurements they are:
1) em <----- It depend of current font.This change when font size change.
1em ---> correspods to the height of the capital letter "M" in the current font.
3m ---> correspods to 3 times the height of the capital letter "M" in the current font.

2)pt <----(points)This is an absolute measurement.Not change when font size change.Used in documents for specifying font size.
24pt

3)px <----(Pixels)This is an absolute measurement.Not change when font size change.But change(vary) with screen resolution.
24px

Note : Using Points(pt) instead of Pixels(px) is a good practice
------------------------------------------------<>
text-indent:3em; <--- To gegin further from the margin than the other lines.

It take any CSS measurements "em","pt","px".
------------------------------------------------<>
font-family:verdana,Geneva,sans-seriff;

verdana --> for Windows users.
Geneva --> for Mac uses.
sans-seriff --> standard font.

We have to specify a list of font names here.Because there is a chance that a perticular font not available in some computers.
So we have to specify some standard font names.
------------------------------------------------<>
font-size:10pt;

It take any CSS measurements "em","pt","px".
font-size:small;
font-size:largel;
font-size:x-small; <--- extra small
font-size:x-large; <--- extra large
------------------------------------------------<>
font-style:italic;
font-style:normal;
------------------------------------------------<>
font-weight:bold; <---- To controle boldness of text.
font-weight:normal;
font-weight:bold
------------------------------------------------<>
font-variant:small-caps; <--- Dislay all lowercase letters in small uppercase latters.
------------------------------------------------<>
line-height:normal; <--To controle line spacing.
line-height:1.5;
------------------------------------------------<>
font-decoration:none; <---- To remove underline.
font-decoration:underline; <---- To add underline.
font-decoration:line-through; <--- To draw line through the center of the text.
font-decoration:overline: <---- To add overline(line above text).
------------------------------------------------<>
word-spacing:0.1em <--- To add space between words.
letter-spacing:0.1em <--- To add space between letters.

*********************FINISHED*************************

Wednesday, October 7, 2009

How to install modem driver and setting connection in Linux debian ubuntu fedora

How to install modem driver and setting connection in Linux debian ubuntu fedora
In this tutorial we install a modem driver and setting up dial up connection in Linux debian ubuntu fedora.

*************** DRIVER INSTALATION START **********************

-----------------------------1
To list all PCI devices.
root@priyar:# lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
01:00.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:00.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
01:01.0 Communication controller: Conexant HSF 56k HSFi Modem (rev 01) <-------- Internal modem
01:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

----------------------------2
To check modem installed or not.
root@priyar:# ls /dev/ttyS
ttyS0 ttyS1 ttyS2 ttyS3 < --------------------No ttySHSF0 file

-----------------------------3
root@priyar:# ls /dev/modem <------------------- file not exist

-----------------------------4
Download "hsfmodem_7.80.02.04full_i386.deb.zip" from http://www.linuxant.com/drivers/hsf/full/downloads.php

Extarct "hsfmodem_7.80.02.04full_i386.deb.zip" to Desktop

root@priyar:~# cd /home/root/Desktop/hsfmodem_7.80.02.04full_i386.deb

-----------------------------5
Change to extracted directory.
root@priyar:~/Desktop/hsfmodem_7.80.02.04full_i386.deb# ls
hsfmodem_7.80.02.04full_i386.deb LICENSE

-----------------------------6
Installing downloaded driver.
root@priyar:~/Desktop/hsfmodem_7.80.02.04full_i386.deb# dpkg -i hsfmodem_7.80.02.04full_i386.deb
Selecting previously deselected package hsfmodem.
(Reading database ... 115654 files and directories currently installed.)
Unpacking hsfmodem (from hsfmodem_7.80.02.04full_i386.deb) ...
Setting up hsfmodem (7.80.02.04full) ...

----------------------------7
Checking for installed binary.
root@priyar:~# hsf
hsfconfig hsfdcpd hsfmodconflicts hsfstop

----------------------------8
Running the command for modem configuration.
root@priyar:~# hsfconfig <----------------------------- is a command.
Conexant HSF softmodem driver, version 7.80.02.04full

If you need license keys, assistance or more information, please go to:
http://www.linuxant.com/

When reporting a problem for the first time, please send
us the file generated by "hsfconfig --dumpdiag".


No pre-built modules for: Debian-5.0 linux-2.6.26-1-686 i686-SMP

Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)
Please install the 'kernel-headers-2.6.26-1-686' package. You can install
it with the 'apt-get install kernel-headers-2.6.26-1-686' command.

Where is the linux source build directory that matches your running kernel?
[/usr/src/linux] <------------- Type linux source build directory path or press Enter key.

WARNING: missing file /usr/src/linux/include/linux/autoconf.h <--------------*
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).

First, ensure that the proper kernel source and compiler packages
from your distribution vendor and/or the community are installed.

The Linux kernel can then be reconfigured by running "make menuconfig"
under the kernel source directory (usually /usr/src/linux).

Verify that the proper options for your system are selected.

Then compile and install your new kernel (for more information about
this procedure, see the README file under the kernel source directory),
reboot the system using the new kernel, and re-run "hsfconfig".

Note: Here Modem Configuration Failed.

-----------------------------9
Checking /usr/src/ directory content.
root@priyar:~# ls /usr/src/
linux-kbuild-2.6.26

-----------------------------10
Checking /lib/modules/2.6.26-1-686/ directory content.
root@priyar:~# ls /lib/modules/2.6.26-1-686/ <----------here no /build directory
extra/ modules.ccwmap modules.inputmap modules.pcimap modules.usbmap
kernel/ modules.dep modules.isapnpmap modules.seriomap updates/
modules.alias modules.ieee1394map modules.ofmap modules.symbols

-----------------------------11
Installing Header files.
root@priyar:~#apt-get install linux-headers-2.6.26-1-686
root@priyar:~#apt-get install linux-headers-2.6.26-1-common

-----------------------------12
Checking /usr/src/ directory content after header file installation.
root@priyar:~# ls /usr/src/ <----- you can see newly installed source linux-headers-2.6.26-1-686 linux-headers-2.6.26-1-common linux-kbuild-2.6.26 ----------------------------13
Checking /lib/modules/2.6.26-1-686/ directory content after header file installation.
root@priyar:~# ls /lib/modules/2.6.26-1-686/ <----------here you can see /build directory
build kernel modules.ccwmap modules.ieee1394map modules.isapnpmap modules.pcimap modules.symbols updates
extra modules.alias modules.dep modules.inputmap modules.ofmap modules.seriomap modules.usbmap


Note: you can see "autoconf.h" in /build directory "/lib/modules/2.6.26-1-686/build/include/linux/autoconf.h"

----------------------------14
Running the command for modem configuration again.
root@priyar:~# hsfconfig
Conexant HSF softmodem driver, version 7.80.02.04full

If you need license keys, assistance or more information, please go to:
http://www.linuxant.com/

When reporting a problem for the first time, please send
us the file generated by "hsfconfig --dumpdiag".

No pre-built modules for: Debian-5.0 linux-2.6.26-1-686 i686-SMP

Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)

Where is the linux source build directory that matches your running kernel?
[/lib/modules/2.6.26-1-686/build] <------------- Type linux source build directory path or press Enter key.

Building modules for kernel 2.6.26-1-686, using source directory
/lib/modules/2.6.26-1-686/build. Please wait...
done.

Please enter region name for modem unit 0 [USA]: india <--------------*

Setting region for modem unit 0: "INDIA"

To change, use "hsfconfig --region" or "AT+GCI="
The current region can be displayed by entering "ATI9" in a terminal program.

Note: we respect user privacy. Email addresses are not communicated
nor used for any purpose other than to manage licenses!

Please enter your email address [sajuptpm@gmail.com]: sajuptpm@gmail.com <----------*

License keys can be obtained from http://www.linuxant.com/
Without one, the modem operates in FREE mode (max 14.4Kbps data only, no fax)

The registration ID for modem unit 0 is: E3EC-62BB-6044

Please enter license key [FREE]: <-------------------- Type or Press Enter key

Setting license for modem unit 0: "sajuptpm@gmail.com/FREE"

Note: HDA support not compiled in the driver

Note: kernel module snd-via82xx-modem overridden by hsfmc97via
Note: kernel module snd-intel8x0m overridden by hsfmc97ich hsfmc97sis
Note: kernel module snd-atiixp-modem overridden by hsfmc97ati

Current parameters: ("hsfconfig --info")

Config for modem unit 0: /dev/ttySHSF0 <--------------*
Device instance: 0-PCI-14f1:2f00-14f1:2004
HW revision : Basic2 2.18 Standard DAA 3VoltsIA
HW profile name: hsfpcibasic2hsfi
Registration ID: E3EC-62BB-6044
License owner : sajuptpm@gmail.com
License key : FREE
License status : FREE (max 14.4kbps data only)
Current region : INDIA (T.35 code: 0053)

The /dev/modem alias (symlink) points to ttySHSF0 <-----------*

To enable full 56K modem and FAX functionality, enter your license information
with "hsfconfig --license".

License owner and key data must EXACTLY match the information respectively
provided to and by Linuxant. Otherwise, license status will remain "FREE"!

Note: Here Modem Configuration Successful.

-----------------------------15
To view installed modules.
root@priyar:~# modprobe -l | grep hsf
/lib/modules/2.6.26-1-686/extra/hsfpcibasic2.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97ati.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97sis.ko
/lib/modules/2.6.26-1-686/extra/hsfserial.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97ich.ko
/lib/modules/2.6.26-1-686/extra/hsfusbcd2.ko
/lib/modules/2.6.26-1-686/extra/hsfosspec.ko
/lib/modules/2.6.26-1-686/extra/hsfengine.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97via.ko
/lib/modules/2.6.26-1-686/extra/hsfhda.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97ali.ko
/lib/modules/2.6.26-1-686/extra/hsfpcibasic3.ko
/lib/modules/2.6.26-1-686/extra/hsfsoar.ko

-----------------------------16
root@priyar:~# ls /dev/ttyS < -------------------- You can see ttySHSF file.
ttyS0 ttyS1 ttyS2 ttyS3 ttySHSF0 ttySHSF1 ttySHSF2 ttySHSF3 ttySHSF4 ttySHSF5 ttySHSF6 ttySHSF7

-----------------------------17
root@priyar:~# ls -l /dev/modem
lrwxrwxrwx 1 root root 8 2009-10-07 17:51 /dev/modem -> ttySHSF0

-----------------------------18
root@priyar:~# ls -l /dev/ttySHSF0
crw-rw---- 1 root dialout 240, 64 2009-10-07 19:07 /dev/ttySHSF0

-----------------------------

*************** DRIVER INSTALATION FINISHED **********************

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

*************** SETTING DIAL UP CONNECTION START *****************

Setting dial up connection using installed modem.

-----------------------------1
#apt-get install ppp pppconfig

-----------------------------2
root@priyar:~# pppconfig

***Main Menu***
Select "Create" with the arrow keys, then press Enter key.

***Provider Name***
Type provider (Eg:bsnl) and press Enter key.

***Configure Nameservers (DNS)***
select the "Dynamic" option and press Enter key.

***Authentication Method for provider***
Select "Chat" with the arrow keys, then press Enter key.

***Login Prompt***
Change "ogin:" to "Username:",then press Enter key. <---- Important in the case of BSNL connection.

***Password Prompt***
Use default or Change "ssword:" to "Password:",then press Enter key.

***User Name***
Enter the username given to you by your ISP.

***Password***
Enter the password your ISP gave you.

***Speed***
Enter your modem port speed (e.g. 9600, 19200, 38400, 57600, 115200).I suggest that you leave it at 115200.

***Pulse or Tone***
Select method of dialing.

***Phone Number***
Enter the number to dial.(Eg:172222)

***Choose Modem Config Method***
Select "yes" and press Enter key.

***Select Modem Port ***
Select "Manual Enter the port by hand." and press Enter key.

***Manually Select Modem Port***
Type /dev/ttySHSF0 and press Enter key.

***Properties of provider***
Select "Finished Write files and return to main menu" and press Enter key.

Finished configuring connection and writing changed files.The chat strings for
connecting to the ISP are in /etc/chatscripts/bsnl, while the options for pppd
are in /etc/ppp/peers/bsnl.You may edit these files by hand if you wish.

***Main Menu***
Select "Quit Exit this utility" and press Enter key.

-----------------------------3
To establish a connection.
root@priyar:~# pon bsnl

-----------------------------4
To view the progress of the connection.

root@priyar:~# tail -f /var/log/messages

Oct 7 19:07:04 priyar pppd[4453]: pppd 2.4.4 started by root, uid 0
Oct 7 19:07:05 priyar chat[4455]: abort on (BUSY)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO CARRIER)
Oct 7 19:07:05 priyar chat[4455]: abort on (VOICE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO DIALTONE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO DIAL TONE)
Oct 7 19:07:05 priyar chat[4455]: abort on (NO ANSWER)
Oct 7 19:07:05 priyar chat[4455]: abort on (DELAYED)
Oct 7 19:07:05 priyar chat[4455]: send (ATZ^M)
Oct 7 19:07:05 priyar chat[4455]: expect (OK)
Oct 7 19:07:05 priyar chat[4455]: ATZ^M^M
Oct 7 19:07:05 priyar chat[4455]: OK
Oct 7 19:07:05 priyar chat[4455]: -- got it
Oct 7 19:07:05 priyar chat[4455]: send (ATDT172222^M)
Oct 7 19:07:05 priyar chat[4455]: expect (CONNECT)
Oct 7 19:07:05 priyar chat[4455]: ^M
Oct 7 19:07:31 priyar chat[4455]: ATDT172222^M^M
Oct 7 19:07:31 priyar chat[4455]: CONNECT
Oct 7 19:07:31 priyar chat[4455]: -- got it
Oct 7 19:07:31 priyar chat[4455]: send (^M)
Oct 7 19:07:31 priyar chat[4455]: expect (Username:)
Oct 7 19:07:31 priyar chat[4455]: 115200 ^M
Oct 7 19:07:32 priyar chat[4455]: C^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: *******************************************^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: * WELCOME TO NIB C1 NODE, DOT, KOLLAM *^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: * !!!!! WISH YOU HAPPY SURFING !!!!! *^M
Oct 7 19:07:32 priyar chat[4455]: * *^M
Oct 7 19:07:32 priyar chat[4455]: *******************************************^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: User Access Verification^M
Oct 7 19:07:32 priyar chat[4455]: ^M
Oct 7 19:07:32 priyar chat[4455]: Username:
Oct 7 19:07:32 priyar chat[4455]: -- got it
Oct 7 19:07:32 priyar chat[4455]: send (4752333333^M)
Oct 7 19:07:32 priyar chat[4455]: expect (ssword:)
Oct 7 19:07:32 priyar chat[4455]: 4752333333^M
Oct 7 19:07:32 priyar chat[4455]: Password:
Oct 7 19:07:32 priyar chat[4455]: -- got it
Oct 7 19:07:32 priyar chat[4455]: send (??????)
Oct 7 19:07:32 priyar chat[4455]: send (\d)
Oct 7 19:07:33 priyar pppd[4453]: Serial connection established.
Oct 7 19:07:33 priyar pppd[4453]: Using interface ppp0
Oct 7 19:07:33 priyar pppd[4453]: Connect: ppp0 <--> /dev/ttySHSF0
Oct 7 19:07:40 priyar pppd[4453]: PAP authentication succeeded
Oct 7 19:07:40 priyar pppd[4453]: local IP address 61.1.233.144
Oct 7 19:07:40 priyar pppd[4453]: remote IP address 61.1.232.5

-----------------------------5
To check connection.
root@priyar:~#ping www.google.com
or
root@priyar:~# nslookup www.google.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 66.102.7.99
Name: www.l.google.com
Address: 66.102.7.103
Name: www.l.google.com
Address: 66.102.7.104
Name: www.l.google.com
Address: 66.102.7.105
Name: www.l.google.com
Address: 66.102.7.106
Name: www.l.google.com
Address: 66.102.7.147

-----------------------------6
Connection termination.
root@priyar:~# poff bsnl

-----------------------------
*************** SETTING DIAL UP CONNECTION END *****************

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

*************** TIPS AND TRICKD START **************************

----------------------------T1
apt-get install linux-headers-2.6.26-1-686
apt-get install linux-headers-2.6.26-1-common

Header files for Linux 2.6.26-1-486
This package provides the architecture-specific kernel header files for
Linux kernel 2.6.26-1-486, generally used for building out-of-tree kernel
modules. These files are going to be installed into
/usr/src/linux-headers-2.6.26-1-486, and can be used for building modules
that load into the kernel provided by the linux-image-2.6.26-1-486
package

Common header files for Linux 2.6.26-1
This package provides the architecture-specific common kernel header files
for Linux kernel version 2.6.26-1, generally used for building out-of-tree
kernel modules. To obtain a complete set of headers you also need to
install the linux-headers-2.6.26-1-(flavour) package, matching the flavour
of the kernel you intend the build for.

----------------------------T2
To stop Modules
root@priyar:~# hsf
hsfconfig hsfdcpd hsfmodconflicts hsfstop
root@priyar:~# hsfstop < -----------To Stoping modules ----------------------------T3 To uninstall installed Driver. First change directory to extracted directory. root@priyar:~# cd /home/root/Desktop/hsflinmodem-4.06.06.02
root@priyar:~/Desktop/hsflinmodem-4.06.06.02# make uninstall <----Uninstalling driver

----------------------------T4
echo 1 > /dev/modem
echo 1 > /dev/ttySHSF0

----------------------------T5
apt-get remove
dpkg -r hsfmodem
dpkg -P hsfmodem
dpkg -Pa
----------------------------T6
vim /var/lib/dpkg/status

----------------------------T7
root@priyar:~# modprobe -l | grep hsf
/lib/modules/2.6.26-1-686/extra/hsfpcibasic2.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97ati.ko
/lib/modules/2.6.26-1-686/extra/hsfmc97sis.ko
/lib/modules/2.6.26-1-686/extra/hsfserial.ko

----------------------------T8
root@priyar:~# modinfo hsfpcibasic2
filename: /lib/modules/2.6.26-1-686/extra/hsfpcibasic2.ko
supported: yes
license: GPL
description: Conexant low-level hardware driver
author: Copyright (C) 2003-2004 Linuxant inc.
alias: pci:v000016ECd00002F00sv*sd*bc*sc*i*
----------------------------

*************** TIPS AND TRICKD END ***************************

Tuesday, October 6, 2009

howto install new softwares in debian ubuntu fedora linux

howto install softwares in debian ubuntu fedora linux
----------------------
howto install new softwares in debian ubuntu linux.
HOWTO Install *.deb?.(debian package)

#apt-get install firefox
#dpkg -i firefox.deb
#yum install firefox <--- to work it first install #apt-get install yum

*********************
howto install new softwares in fedora linux
HOWTO Install *.rpm?.(redhat package)

#rpm -ivh firefox.rpm
#yum install firefox

*********************
HOWTO Instal using Source Code in linux debian ubuntu fedora
HOWTO Instal from Source Code?.

Download source code and extract it,then change directory to extracted directory,then type following commands.
Read readme or install file in the extracted directory.

#./configure <----- for create makefile.
or
#./configure --prefix /home/user/ <---- for specify installation directory
#make
<------------- for compiling C files specified in the makefile or run makefile
#make install <------- for install compiled software
#make clean
<----to remove installed software

*********************

Howto find device associated with a /dev file.

Howto find /dev file associated with a device.
Howto find device associated with a /dev file.

Suppose we want to check that the file "/dev/rfcomm0" associated with which device.
For that use following command.

#echo 1 > /dev/rfcomm0

If you get an indication in your device,then you can ensure that.

Suppose your device is a mobile and connected via bluetooth.
Then above command show a connection request in your mobile.

------------------------------------
Examples:
#echo 1 > /dev/audio <---- You can hear a sound in speaker
#echo 1 > /dev/cd <---- You can see CD drive LED blink
#echo 1 > /dev/dvd <---- You can see DVD drive LED blink
#echo 1 > /dev/stdin <--- Print "1" in terminal
#echo 1 > /dev/stdout <--- Print "1" in terminal
#echo 1 > /dev/stderr <--- Print "1" in terminal

------------------------------------

KPPP Configuration on Linux debian fedora ubuntu

KPPP Configuration on Linux debian fedora ubuntu

KPPP is a dialer and front-end to pppd

Applications ---> Internet ---> KPPP.

A small window will popup, click "Configure" button.

a)Select "Modems" option from top of the window.
Then press "New" button.

Select "Device" Option and enter:
Modem Name: MyModem
Modem device: /dev/ttySHSF0 <---- Select your modem (This file exist only when you successfuly installed modem drive) Connection speed:115200
Select "Modem" Option and press "Modem Commands" button and enter: Initialization string 2: AT+CGDCONT=,"IP","" <---- Use correct string press "Query Modem" button to check connection Then Press "OK" b)Select "Accounts" option from top of the window.
Then press "New" button and select "Manual Setup".
Select "Dial" Option from top of the window and enter:
Connection name:myconnection
Phone number:172222 <-----Use correct Phone number Authentication:PAP/CHAP
Then Press "OK"

c)In main window select:
Connect to:myconnection
Use modem :MySerialModem
Login ID :xxxxx
Password :xxxxx

Then Press "Connect" button


END . THANKS


Note:
Initialization string 2: AT+CGDCONT=1,"IP",""
Changing it based on your connection.

Using KPPP Airtel,Aircel,Idea,Bsnl,MTS,Vodafone,reliance,tata GPRS internet on Linux via Bluetooth

Using KPPP Airtel,Aircel,Idea,Bsnl,MTS,Vodafone,reliance,tata GPRS internet on Linux via Bluetooth

KPPP is a dialer and front-end to pppd

Applications ---> Internet ---> KPPP.

A small window will popup, click "Configure" button.

a)Select "Modems" option from top of the window.
Then press "New" button.

Select "Device" Option and enter:
Modem Name: MyBluetoothModem
Modem device: /dev/ircomm0 <---- Select your modem (This file exist only when you successfuly installed modem drive)
Connection speed:115200
Select "Modem" Option and press "Modem Commands" button and enter: Initialization string 2: AT+CGDCONT=1,"IP","aircelgprs","",0,0
press "Query Modem" button to check connection Then Press "OK"

b)
Select "Accounts" option from top of the window.
Then press "New" button and select "Manual Setup".
Select "Dial" Option from top of the window and enter:
Connection name:myconnection
Phone number:*99***1# or *99#
Authentication:Script-based or Terminal-based
Then Press "OK"

c)In main window select:
Connect to:myconnection
Use modem :MyBluetoothModem
Login ID :
Password :

Then Press "Connect" button

END . THANKS

Note:
Initialization string 2: AT+CGDCONT=1,"IP","aircelgprs","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","airtelgprs.com","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","bsnlgprs","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","mtsgprs","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","ideagprs","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","Vodafonegprs","",0,0
Initialization string 2: AT+CGDCONT=1,"IP","reliancegprs","",0,0

Changing it based on your connection Airtel,Aircel,Idea,Bsnl,MTS,Vodafone,reliance,tata.

Sunday, October 4, 2009

howto Airtel Aircel Idea Bsnl MTS Vodafone reliance tata GPRS on Linux via Bluetooth modem

HOWTO Airtel Aircel Idea Bsnl MTS Vodafone reliance tata GPRS on Linux via Bluetooth USB modem

---------------------------------------------Step-1

hcitool ---> is used to configure Bluetooth connections and send some special command to Bluetooth devices.

# hcitool scan --> Scan for remote devices and return MAC address and name of remote device (your phone).

1)

root@priyar:~# hcitool scan

Scanning ...

00:0E:6D:68:0F:F7 Nokia 6600

---------------------------------------------Step-2

Determine the channel used for dial up networking using the MAC address "00:0E:6D:68:0F:F7".

sdptool ---> it provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd.

# sdptool browse 00:0E:6D:68:0F:F7 ---> Browse all available services on the device specified by a Bluetooth address as a parameter.

2)

root@priyar:~# sdptool browse 00:0E:6D:68:0F:F7

Browsing 00:0E:6D:68:0F:F7 ...

Service Name: Bluetooth Serial Port

Service Description: Bluetooth Serial Port

Service Provider: Symbian Ltd.

Service RecHandle: 0x10002

Service Class ID List:

"Serial Port" (0x1101)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 2

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100


Service Name: OBEX File Transfer

Service RecHandle: 0x10003

Service Class ID List:

"OBEX File Transfer" (0x1106)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 10

"OBEX" (0x0008)

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"OBEX File Transfer" (0x1106)

Version: 0x0100


Service Name: OBEX Object Push

Service RecHandle: 0x10004

Service Class ID List:

"OBEX Object Push" (0x1105)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 9

"OBEX" (0x0008)

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"OBEX Object Push" (0x1105)

Version: 0x0100


Service Name: Handsfree Audio Gateway

Service RecHandle: 0x10005

Service Class ID List:

"Handsfree Audio Gateway" (0x111f)

"Generic Audio" (0x1203)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 3

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Handsfree" (0x111e)

Version: 0x0101


Service Name: Fax

Service RecHandle: 0x10006

Service Class ID List:

"Fax" (0x1111)

"Generic Telephony" (0x1204)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 1

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Fax" (0x1111)

Version: 0x0100


Service Name: Dial-up Networking

Service RecHandle: 0x10007

Service Class ID List:

"Dialup Networking" (0x1103)

"Generic Networking" (0x1201)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 1 <---------------------This channel will be used to configure the bluetooth connection.

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Dialup Networking" (0x1103)

Version: 0x0100

---------------------------------------------Step-3

3)

root@priyar:~# vim /etc/bluetooth/rfcomm.conf

#

# RFCOMM configuration file.

#

rfcomm0 {

# Automatically bind the device at startup

bind yes;

# Bluetooth address of the device

device 00:0E:6D:68:0F:F7; <-------------- MAC address of your phone.

# RFCOMM channel for the connection

channel 1; <-------- Channel used for Dial-up Networking.

# Description of the connection

comment "SAJU Bluetooth Dialup Connection";

}

---------------------------------------------Step-4

Restart bluetooth services

4)

root@priyar:~# /etc/init.d/bluetooth restart

Restarting bluetooth: hcid.

---------------------------------------------Step-5

5)

root@priyar:~# vim /etc/wvdial.conf

[Dialer Defaults]

Modem = /dev/rfcomm0

Init = ATZ

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0 <----Type correct string ( Eg:"aircelgprs" ).

Baud=115200

Modem Type = Bluetooth Modem

Username =''

Password =''

Phone = *99***1#

Stupid Mode = 1

---------------------------------------------Step-6

6)

root@priyar:~# wvdial

--> WvDial: Internet dialer version 1.60

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

OK

--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

OK

--> Sending: AT+CGDCONT=1,"IP","aircelgprs","",0,0

AT+CGDCONT=1,"IP","aircelgprs","",0,0

OK

--> Modem initialized.

--> Sending: ATDT*99***1#

--> Waiting for carrier.

ATDT*99***1#

CONNECT

~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~

--> Carrier detected. Starting PPP immediately.

--> Starting pppd at Sat Oct 3 23:57:23 2009

--> Pid of pppd: 3571

--> Using interface ppp0

--> local IP address 10.189.207.99

--> remote IP address 10.6.6.6

--> primary DNS address 192.168.35.199

--> secondary DNS address 192.168.35.200

Note : local IP, remote IP, Primary DNS, Secondary DNS address

When you run this command your mobile should ask you for the Passcode for ComputerName enter the passcode into your phone and now your computer will prompt you to verify your passcode.

---------------------------------------------Step-7

root@priyar:~# ping www.google.com

PING www.l.google.com (209.85.231.104) 56(84) bytes of data.

64 bytes from 209.85.231.104: icmp_seq=6 ttl=52 time=1324 ms

64 bytes from 209.85.231.104: icmp_seq=7 ttl=52 time=1044 ms


OK THANKS

************************************************** FINISHED

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

************************************************** TIPS and TRICKS

---------------------------------------------Tip-1

If wvdial show something like:

--> The PPP daemon has died: A modem hung up the phone (exit code = 16)

--> man pppd explains pppd error codes in more detail.

--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.

--> Auto Reconnect will be attempted in 10 seconds

--> Cannot open /dev/rfcomm0: Input/output error

--> Cannot get information for serial port.


Then your APN, username, or password are wrong.

Run "tail /var/log/messages" and redial.


If it's the APN, you can see something like:

Oct 3 19:29:56 priyar pppd[3716]: pppd 2.4.4 started by root, uid 0

Oct 3 19:29:56 priyar pppd[3716]: Using interface ppp0

Oct 3 19:29:56 priyar pppd[3716]: Connect: ppp0 <--> /dev/rfcomm0

Oct 3 19:29:59 priyar pppd[3716]: PAP authentication succeeded

Oct 3 19:30:00 priyar pppd[3716]: LCP terminated by peer

Oct 3 19:30:03 priyar pppd[3716]: Connection terminated.

Oct 3 19:30:03 priyar pppd[3716]: Modem hangup

Oct 3 19:30:03 priyar pppd[3716]: Exit.

In "vim /var/log/messages"

This is because of error in the file /etc/wvdial.conf at line

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0

check you entered correct string "aircelgprs".

---------------------------------------------Tip-2

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0

Init3 = AT+CGDCONT=1,"IP","airtelgprs.com","",0,0

---------------------------------------------Tip-3

1)Install the Bluetooth utilities:

#apt-get install bluez-gnome bluez-utils

2)Install Wvdial

#apt-get install wvdial

---------------------------------------------

root@priyar:~# rfcomm connect 0 00:0E:6D:68:0F:F7 1&

or

root@priyar:~# wvdial

The last number "1" is the Channel found in the previous command.

When you run this command your mobile should ask you for the Passcode for ComputerName enter the passcode into your phone and now your computer will prompt you to verify your passcode

---------------------------------------------

root@priyar:~# rfcomm bind 0 00:0E:6D:68:0F:F7 1&

root@priyar:~# rfcomm

rfcomm0: 00:0E:6D:68:0F:F7 channel 1 connected [tty-attached]

---------------------------------------------

HOWTO Airtel,Aircel,Idea,Bsnl,MTS,Vodafone,reliance,tata internet on Linux via Bluetooth,USB modem

Debian,ubuntu,fedora,suse

---------------------------------------------