Spreadfirefox Affiliate Button
Custom Search

Saturday, November 29, 2008

Sony Ericsson P1i Mobile Phone GPRS/UMTS Linux How-To

This how-to helps you use your Sony Ericsson P1i mobile phone with Linux. I have tested it with P1i, an USB cable, and the Finnish operator Indosat Mentari.

Do the following to use the phone for your network access in Linux:

1. Make sure your phone works first on its with Internet. Launch a browser, it should work with any web site and not just with WAP. This will require configuration of an Internet access profile on your phone. Typically, you get it pre-installed or you can ask for an SMS that sets it up from your operator.

2. Take the cable that came with the phone, and plug it into the phone and the USB port in your computer. This will your computer to detect the phone using USB. It comes up as a modem.

3. Configure PPP to know about a peer on the other side of that modem. Put this into your /etc/ppp/peers/gprs file:

debug debug debug
#nodetach
updetach
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs-connect"
disconnect "/usr/sbin/chat -v -f /etc/chatscripts/gprs-disconnect"
#/dev/rfcomm0
/dev/ttyACM1
460800
usepeerdns
defaultroute
persist
noipdefault
noauth

4. Create the necessary chatscripts so that PPP can start. These go into two files shown below. The hard part in the first one is selecting the right number instead of "1" in the line "OK ATD*99***1#". I put 1 there because my working Internet access profile in the phone is the first one. You may experiment with different numbers if you have a problem.

::::::::::::::
/etc/chatscripts/gprs-connect
::::::::::::::
TIMEOUT 5
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
TIMEOUT 12
SAY "Press CTRL-C to close the connection at any stage!"
SAY "\ndefining PDP context...\n"
OK ATH
OK ATE1
OK ATD*99***1#
TIMEOUT 22
SAY "\nwaiting for connect...\n"
CONNECT ""
SAY "\nConnected."
SAY "\nIf the following ppp negotiations fail,\n"
SAY "try restarting the phone.\n"
::::::::::::::
/etc/chatscripts/gprs-disconnect
::::::::::::::
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
"" "\K"
"" "+++ATH"
SAY "\nPDP context detached\n"

5. Turn on PPP by typing "pppd call gprs" in your root shell window. You should see debugs showing what happened.

6. Test that it works. Note that at least for my operator, ping does not work in testing, because the operator filters ICMP. Start with a simple web page. Please make sure that you turned off other interface with ifconfig eth0 down etc before you started in Step 5 -- otherwise you'll have a problem.

I would like to thank Jari Arrkho for helping me get my GPRS connection up and running.

No comments: