Samsung Galaxy S, S II and Tab as 3G Router
As most of the stuff on this site, these are Linux specific instructions! What I have heard is that Windows is so easy to use, that you do not need support of any kind. As far as I know network connection through USB cable does not work in Windows without Kies application, which is pain to install and usually does not even work. However, WiFi Access Point should also work in Windows. Access Points are not operating system specific.
Although firmwares have been updated I have retained older instructions if someone happens to use a Galaxy with older firmware. First check from settings which version your phone has, and then follow version specific instructions.
Basically these instructions apply to Galaxy S, Galaxy S II and Galaxy Tab, since they are so similar. If you have updated them with latest firmware from Samsung, then USB tethering works in all of them according to these instructions. With Galaxy Tab you should follow Android 2.2 instructions, with Galaxy S II Android 2.3 instructions. With Galaxy S you have to check the version and then follow those instructions.
To use Galaxy S with Linux and especially Ubuntu, you do NOT need to install anything. In Windows you have to hassle with drivers and Windows Kies which has lots of problems. Forums are full of complaints, that it is impossible to connect Galaxy with Kies. Some people have managed it, though. But in Linux, using Galaxy as 3G router is a smooth ride, since no extra software is needed (at least in Ubuntu 10.04)
It is extremely easy to use Galaxy as a 3G router for sharing the internet connection (tethering). Options available out-of-the-box are USB cable and wifi. Bluetooth is not a default option, but you have to remember that transfer speed for bluetooth is quite low compared to USB and wifi. If you have full speed broadband on phone, it is better to use either USB or wifi anyway. With USB you also have the benefit of simultaneous battery charging.
NOTE! Galaxy S i9000 is NOT A MODEM. It is a router as it shares its internet connection with others either through USB or WiFi. You do not neet wvdial or any other 3G modem stuff, like you do with USB 3G modems.
This explains how to use Galaxy as 3G router with Linux computer using USB cable. If you are using Windows, you should use Kies and different settings.
You have to open Settings, then About Phone. Now you see USB settings. Press it and choose PC Internet. Last choice will stay in effect, so if you do not use USB connection to transfer files (Mass Storage), then you can skip this.
Now connect Galaxy and your Linux computer with USB cable. At least on Ubuntu this usb0 network connection is recognized automatically, and in couple of seconds you are ready to go. There is no need to use wvdial or any other ppp-tool activation, because ubuntu recognizes it as normal active ethernet connection. Galaxy is not a modem, think it as a computer sharing its internet connetion.
If it happens that the connection is not automatically activated, you can do manually from command line. Check first that how you usb network connection was assigned. It might be usb0, eth0 or eth1. Usually it should be usb0. Use ifconfig to see your network interfaces
Usually there are interfaces like eth0 (primary wired interface), lo (loopback) and possibly wlan0 (wifi interface). If you see usb0 on the list use that, if there is eth1 in the list (and you know that your PC has only one wired network connector), then use that and activate connection with
sudo dhclient usb0
You will see how your system look for dhcp server, and then gets ip address and other relevant stuff.
Android 2.2 UPDATE (Following works for both Galaxy S and Galaxy Tab)
If you updated Galaxy S to Android 2.2 (Froyo), then the procedure is quite similar, but menus are a bit different. USB tethering is now in a separate submenu than other USB connection options. Also, you cannot have USB tethering automatically on, you can activate it only after you have connected USB cable. In Settings go to Menu Wireless and Network. There are submenus USB Settings and USB Tethering. Lets say that you have USB Mass storage option activated. This means that when you connect USB cable, a notification screen appears. If you want to tether, then DO NOT press the button. Instead you should go to Settings, there Wireless and Network and then to USB Tethering. There you should activate (press) the tethering on. You can either tether or use mass storage but not both.
Android 2.3 UPDATE (Following works both Galaxy S and Galaxy S II)
Features are basically the same, but menus have changed again. In Settings menu you should open Wireless and Network menu. There is a sub-menu Tethering and portable Hotspot. There are you can activate WiFi hotspot and USB-tethering. You can activate USB-tethering only after you have connected USB-cable, not before. In Wireless and Network menu there is also a sub-menu USB Utilities. That is used for Mass Storage mode and USB on-the-go.
Galaxy S with Android 2.3.3
N.B. This concerns only original Galaxy S (not S II) with 2.3.3 firmware. It seems that there is some bug in Galaxy S 2.3.3 firmware which screws USB tethering. Basically, if you activate USB Tethering from the menus (as described above) it does not work. It worked with previous firmares, but you will get nothing.
However, after some thinking and testing, I found out the solution which will get a working Internet connection. Select Kies mode in USB settings. When you connect USB cable, Ubuntu recognizes Galaxy S as modem (dev/ttyACM0) and everything is okay. If you now activate USB tethering on Galaxy S, then USB connection is screwed. So, if you do not activate USB tethering from the menus, then you can use wvdial to connect to Net.
> sudo apt-get install wvdial
and then connect Galaxy S with USB cable. Use wvdialconf to autodetect Galaxy S modem.
This generates configuration file /etc/wvdial.conf. You have to edit it a little, and certain things depend on your ISP, so I cannot give a file which works for everyone. This is just an example for Saunalahti.
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CSQ
Init5 = AT+CGDCONT=1,"IP","internet.saunalahti"
Phone = *99#
Modem Type = USB Modem
Stupid Mode = 1
New PPPD = yes
Dial Command = ATDT
Modem = /dev/ttyACM0
ISDN = 0
This explains how to turn Galaxy into a wireless (WiFi) Access Point and 3G router. This method may be used with any computer, regardless of operating system, as long as it has WiFi functionality, of course. Remeber, that WiFi consumes power. If you are using Galaxy as WiFi access point for long period, then I suggest you recharge it at the same time.
WiFi in Galaxy can be used in normal way, to access WiFi network. But you can also turn it into WiFi Access Point. You have to open Settings, and then Wireless and Network. Then you choose Mobile AP setting, and there enable Mobile AP. Check that Tethering is activated, too. After activation, you’ll be presented with AP name and WPA key.
Now you have to find that AP with your computer’s network manager, and then punch in the WPA key when asked. After a while your PC should have active internet connection. If not, you can use the same command line command as above but substitute usb0 with wlan0.