I post this since it saved me a cost of buying a wifi-adapter and provided useful insight of pi-configuration.
I wanted to access internet from PI. There were 2-3 options.
1. Use Ethernet port.
Since I use wifi all the time, I do not have mechanism to connect my wifi router to LAN port. Although I guess it would have worked simply since I have LAN connector on router as well as on PI. But I had to buy another dataplan since router was dsl. But
2. Buy wifi-adapter and connect same to pi as mentioned in various articles.
Costly affair..
3. Use USB-tethering option of my smartphone.
I have Xperia-U and I use USB tethering option to connect my laptop to internet sometimes. This option I wanted to explore for connecting to internet. Then I could use same data plan everywhere.
So let me explain 3rd option.
On PI-B+ (which I purchased recently) have 4 USB ports. 2 are taken by keyboard and mouse already. One of the remaining can be used to connect to phone.
The default config file used by networking is /etc/network/interfaces works with wifi (wlan0) or eth(eth0) type of interfaces. It does not have entry for tethered device which android provides.
So we need to edit this file on Pi and add entries to it for usb (usb0).
#cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
#
The edit the file to provide hotplugging feature for usb0 type of interface which gets created when u start usb-tethering from android phone.
Add below entries at the end of /etc/network/interfaces file.
allow-hotplug usb0
iface usb0 inet dhcp
and then save the file.
You need to restart the board or networking using #sudo /etc/init.d/networking restart
Once this is done connect the phone to Pi using usb cable.
Enable data on android and wait till it activates and then enable USB tethering.
To see if the device is tethered, open a LXterminal session on pi and type #ifconfig
You should see interface usb0 is up and running with a valid IP assigned to it.
The open web-browser and it should be working fine..

So you can use your android smartphones usb-tethring for connecting Pi to internet..
