Samsung G800 as USB Modem in Ubuntu (Linux)
Was charging my wife’s soon-to-be defunct Samsung G800 (due to a suspected faulty LCD flex cable/ribbon), when I thought I’d try to use it as a USB modem. Set the phone’s PC Connection option to “PC Studio” and connected. dmesg showed:
[116046.169752] usb 1-2: new full speed USB device using ohci_hcd and address 74
[116046.264136] usb 1-2: configuration #1 chosen from 1 choice
[116046.130088] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[116046.332116] usbcore: registered new interface driver cdc_acm
[116046.332125] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Tweaked my wvdial.conf a little, and tried this at first (I’m using M1 Mobile Broadband in Singapore):
[Dialer Defaults]
Baud = 460800
ISDN = 0
Stupid Mode = yes
New PPPD = yes
Modem Type = Analog Modem
Username = blank
Password = blank
Phone = *99#
Modem = /dev/ttyACM0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”sunsurf”
Dial Command = ATDT
Username = 6594763418
Password = user123
did a wvdial, and got this:
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ERROR
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ERROR
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ERROR
--> Bad init string.
Fine. Commented out the line that the phone didn’t like…
[Dialer Defaults]
Baud = 460800
ISDN = 0
Stupid Mode = yes
New PPPD = yes
Modem Type = Analog Modem
Username = blank
Password = blank
Phone = *99#
Modem = /dev/ttyACM0
Init1 = ATZ
#Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”sunsurf”
Dial Command = ATDT
Username = 6594763418
Password = user123
Tada!
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","sunsurf"
AT+CGDCONT=1,"IP","sunsurf"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Jun 28 01:34:22 2009
--> Pid of pppd: 27727
--> Using interface ppp0
--> pppd: ���� �[06][08]��[06][08][03]
–> pppd: ���� �[06][08]��[06][08][03]
–> pppd: ���� �[06][08]��[06][08][03]
–> pppd: ���� �[06][08]��[06][08][03]
–> pppd: ���� �[06][08]��[06][08][03]
–> local IP address 112.199.153.7
–> pppd: ���� �[06][08]��[06][08][03]
–> remote IP address 10.64.64.64
–> pppd: ���� �[06][08]��[06][08][03]
–> primary DNS address 202.65.247.31
–> pppd: ���� �[06][08]��[06][08][03]
–> secondary DNS address 202.65.244.32
–> pppd: ���� �[06][08]��[06][08][03]
As my mobile broadband is on a 1Mbps plan, I couldn’t test how fast the phone could go.
But on Speedtest.net, it was hitting the max on my plan for sure. No complaints there.

On another note, for those whose distro couldn’t pick up the phone and/or automatically modprobe and/or doesn’t support cdc_acm, you could fall back on the trusty old usbserial.
lsusb gave me
Bus 001 Device 074: ID 04e8:6601 Samsung Electronics Co., Ltd Z100 Mobile Phone,
so I
sudo modprobe usbserial vendor=0x04e8 product=0x6601
and got a /dev/ttyUSB0 to play with.
Simple follow the same wvdial configurations as above, except replacing ACM0 with USB0.
My tests with usbserial displayed a max of 0.5Mbps on Speedtest, so I believe that’s the legacy limitation of usbserial and something related to its buffers.