View Single Post
Old August 27th, 2012, 12:46 AM   #6 (permalink)
technosinga
New Member
 
Join Date: Aug 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

For those who have bought a netbook and failed to connect it to your
subscribed 3G service with a USB 3G dongle, fret not. I first have a Chinese
netbook and later buy a Chinese 3G dongle. I was not that lucky that when I plug
in the dongle, it just works. I have to sweat to make it work. Hope
what I have done may be of help to others.

My system:
WonderMedia WM8650 netbook
Android 2.2 Froyo, kernel 2.6.32.9-default,
Build number generic-eng2.2 Froyo Ver 1.5.5-20110920.043830

Prequisites:
In /system/bin, there must be files chat3g, ppp3g and usb_modeswitch.
In /etc, there must be file usb_modeswitch.d

Step 1
Set netbook to Settings->Applications->Unknown sources
to allow installation of non-Market apps.

Step 2
Download and install z4root to root the netbook.
Install Terminal Emulator (TE). This will allow you to have root or su privilege
in command line mode. To do this, run the TE and key in "su".

Step 3
Get the right version of usb_modeswitch
In the TE, type "usb_modeswitch". If it is already in the system, it will
display the info to run the command correctly. At the ending will be the info
about its version. Mine is 1.1.9.
If it is not in your system, download it.

Step 4
Get the Vendor and Product ID of the 3G dongle. My 3G dongle brand is "HSUPA",
from China.
My system does not recognise the command "lsusb". I have to use
"more /proc/bus/usb/devices".
It reveals that the "HSUPA" 3G dongle has Vendor=1c9e Product=f100

With the ID known, check through /etc/usb_modeswitch.d. This is a dir
containing the config files for many 3G devices. There will be a file named
1c9e_f000. Copy this file over to /system/bin and rename it usb_modeswitch.conf.
This file caters to a list of devices. Edit it for the one device of 1c9e:f000
only.


Step 5
Issue the two commands:
echo “1c9e 9605” >/sys/bus/usb-serial/drivers/option1/new_id
usb_modeswitch -I -W -c /system/bin/usb_modeswitch.conf

Issue command "dmesg" to read through what the system has done with the two
commands issued. The device will be switched to modem configuration. Besides
the storage device, there will be four ttyUSB devices, from ttyUSB0 to ttyUSB3.

Command "more /proc/bus/usb/devices" will reveal more about how the system is
recognizing the 3G dongle as a device now.

Command "ls /dev/ttyU*" will confirm the existence of devices ttyUSB0 to ttyUSB3.

NB: Use only ttyUSB3 as the device for 3G modem.

Step 6
cd to dir /etc/ppp/peers. Create a file gprs3g with content as follows.

debug
#receive-all
/dev/ttyUSB3
460800
nocrtscts
nocdtrcts
local
usepeerdns
defaultroute
noipdefault
ipcp-accept-local
ipcp-accept-remote
#user Not required
#password Not required
#unit 2
#nodetach
connect "/system/bin/chat3g -v -t 50 -s -f /etc/ppp/gprs-connect-chat"


cd to dir /etc/ppp. Edit file gprs-connect-chat as follows.

#/etc/ppp/gprs-connect-chat
# chat script for HSUPA (Omega Technology) 3G
dongle.
#ECHO ON
TIMEOUT 20
ABORT "DELAYED"
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
ABORT "NO CARRIER"
TIMEOUT 20
'' \nAT+CFUN=1
OK AT&F0
OK ATE0V1&C1&D2
OK ATE0
#OK AT+CGREG=1
OK AT+CGDCONT=1, <data obtained from command AT+CGDCONT?>
#OK AT+CGDCONT?
#OK AT+COPS=?
#OK AT+COPS?
#OK AT+CGCLASS=?
#OK AT+CGCLASS?
#OK ATZ
#OK ATDT*99***1#
#OK AT+CMEE=2
OK ATD*99#
CONNECT ''


Those commented out AT commands can be used for diagnostics as well as to obtain
the correct values for settings.

Use AT+CGDCONT? to get the setting for network.
Use that setting in the AT+CGDCONT=1 command.
Use AT+CGCLASS=? followed by AT+CGCLASS? to detect class of network available
and that for which the device is set for. For mine, it is Class A for both ends.
Use the AT+COPS=? command to detect the networks available.
AT+COPS? To reveal the current network.


Step 7
Go to netbook Settings->Wireless & Network->Wi-Fi, disable WiFi by removing the
tick.

Return to TE to issue command "ppp3g call gprs3g"

Wait about 5 seconds or a notification sound.
Issue command "ifconfig -a". There will be a net device ppp0 with inet address
and p-t-p address.

Now when you start your browser, you should be able to surf the web!

Lastly, put the three commands

echo “1c9e 9605” >/sys/bus/usb-serial/drivers/option1/new_id
usb_modeswitch -I -W -c /system/bin/usb_modeswitch.conf
ppp3g call gprs3g

in a shell script and chmod the file to 755.
technosinga is offline  
Last edited by technosinga; September 3rd, 2012 at 12:02 AM.
Reply With Quote