Sunday, April 29, 2012

HowTo: Sharing Android smartphone 3G connection with CentOS 6.2

I have a LG P500 Android smartphone running Gingerbread 2.3.3 and I've been meaning to try out if I could share the phone's 3G connection with my CentOS 6.2 laptop. Turns out that it is super easy to do so :)

In this post I'll explain the 2 methods that can be used to share your Android smartphone connection with CentOS 6.2 machine:
  1. USB tethering, wired connection
  2. Portable Wi-Fi hotspot, wireless connection
Though this procedure was executed on Gingerbread 2.3.3 and CentOS 6.2 it should apply to other Android versions as well as other Linux distributions equipped with Network Manager.

USB tethering

Activate the 3G data connection on the Android smartphone, connect the USB cable to the Android device and then to your computer. On the Android smartphone go to Settings -> Wireless & networks -> Tethering & portable hotspot and activate USB tethering.

CentOS' Network Manager with automatically create a wired connection assigning the cdc_ether driver to the USB device thus creating an ethernet interface such as usb0.

When your done just disable the 3G data connection or disable USB tethering on the Android smartphone.

Portable Wi-Fi hotspot

Activate the 3G data connection on the Android smartphone and go to Settings -> Wireless & networks -> Tethering & portable hotspot and activate Portable Wi-Fi hotspot.

Tap the Portable Wi-Fi hotspot settings and then Configure Wi-Fi hotspot. Type in a Network SSID such as MyAndroidAP, select Security and choose WPA2 PSK and type in a password in the Password field.

CentOS' Network Manager will identify Android's wireless Network SSID, connect to it and a Wireless Network Authentication Required pop-up will appear. Select WPA & WPA2 Personal and type in the password that you've chosen while configuring the Android smartphone.

To end the connection disable 3G or the Portable Wi-Fi hotspot.

No comments: