Search:  
Gentoo Wiki

Mobile_Phone/UMTS

This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

If you're in a remote area which still has digital service, you may want to use a cell provider's GPRS/UMTS network for Internet access on your computer. This document will explain the steps to accomplish this on a Bluetooth compatible phone. This does NOT work unless you have a digital signal as GPRS/UMTS cannot function on an analog network.

If you don't know how to configure a kernel or setup ppp, don't worry. There are plenty of tutorials in this wiki for that. The only thing you really need from here is the config files for /etc/chatscripts/ and /etc/ppp/peers.

This tutorial was written using:
GNU/Linux System
Kernel 2.6.9
i686 Pentium III (Coppermine) GenuineIntel
Kernel supported bluetooth dongle
Nokia 6680

Note: With Kernel 2.6.19 the rfcomm interface is e.g. /dev/rfcomm1 not /dev/bluetooth/rfcomm/1

Requirements

Configuration files

File: /etc/ppp/peers/three
/dev/bluetooth/rfcomm/1 # My rfcomm thing to the phone.  
connect '/usr/sbin/chat -v -f /etc/chatscripts/three-connect'  
disconnect '/usr/sbin/chat -v -f /etc/chatscripts/three-disconnect'  

defaultroute # Setup gateway stuff when connected.  
noipdefault  # Don't think it matters, it will negotiate an IP anyways. It just defaults to ask the server for IP with this set. Some links won't work if you don't set it!

#115200       # Connection speed. Maybe this should be something else.  
230400


nopcomp      # No compression -> t-mobile is twice as fast if you do NOT use compression. I really have no clue why.
#noipv6       # No IPv6 -> usually not needed

What you might want to change:

Now, the important part is nopcomp and noipv6. Afaik this is different for different phones, so you could test to omit those. Errors without any explanation is what you get for messing with them.

File: /etc/chatscripts/three-connect
TIMEOUT         10  
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         15  
OK              ATE1  
OK              'AT+cgdcont=1,"IP","data.tre.se"'  
OK              ATD*99#
CONNECT

What you might want to change:

When debugging you need to issue AT and ATE1 before AT+CGDCONT will work. A small gotcha. AT+CGDCONT works for both GPRS and UMTS! (Note: it could be expensive as hell. I got a flat rate and no cap, so I'm good)

File: /etc/chatscripts/three-disconnect
ABORT           "BUSY"  
ABORT           "ERROR"          
ABORT           "NO DIALTONE"  
SAY             "\nSending break to the modem\n"  
""              "\K"  
""              "\K"            
""              "\K"            
""              "+++ATH"  
""              "+++ATH"        
""              "+++ATH"        
SAY             "\nPDP context detached\n"  

Nothing to change, nothing to do with this one.


Ok. Done.

# pon three  

And you should be connected! (if you've got your bluetooth stuff together, I will not explain that. Just a simple rfcomm thing, there is plenty of tutorials for that.

My startscripts

This isn't the Gentoo way of doing things. I couldn't care less though, this works good enough for me.

File: start_three.sh
#!/bin/sh
route del default
hcitool cc 00:12:62:A6:60:3B  
hcitool auth 00:12:62:A6:60:3B  
rfcomm bind 1 00:12:62:A6:60:3B 3  
pon three  

What you might want to change:

File: sdptool browse 00:12:62:A6:60:3B
Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100


File: restart_three.sh
poff three  
rfcomm release 1  
hcitool cc 00:12:62:A6:60:3B  
hcitool auth 00:12:62:A6:60:3B  
rfcomm bind 1 00:12:62:A6:60:3B 3  
pon three  

Remember that

# tail -f /var/log/messages  

is your friend for debugging. I always have such a windows visible though.

Other cool stuff

Check out the bluetooth plugin for Freevo (freevo.sf.net -> Downloads -> Bluetooth). It let's you use your cellphone as a remote for Freevo. You need a phone with Symbian OS (almost all phones use that) that support event reporting (AT+CMER(4,2,0,0) Reported to work with Sony Ericsson T65, T610, Motorola E398 and a bunch of Siemens phones. Does not work with the first gen N-Gage from Nokia. PlutoHome also has a cool feature if you have a Series 60 Nokia phone.


If you have trouble finding the APN, this site holds a comprehensive list of APN's.

PAP-secrets

Many Telecom companies seem to use PAP authentication. Some require a username and password (usually the same for every user). Others require that these are blank. The best way to find out is to check the settings in your cellphone. PPPD has support for PAP authentication. All you have to do is to fill out the file: /etc/ppp/pap-secrets. In PAP-secrets you enter one line. The line is space delimited and should have four entries. First you enter the username, then the pap-authentication server, the password and an IP-address. If you use a *, it will see that as blank.

So if you should send no username, password etc. just fill out four *s:


File: /etc/ppp/pap-secrets (No username and password)
 
# Secrets for authentication using PAP
# client        server  secret                  IP addresses
* * * *
  

If you have to send a username and password, but get the IP adress etc. fill out:


File: /etc/ppp/pap-secrets (Using a username and password)
 
# Secrets for authentication using PAP
# client        server  secret                  IP addresses
myusername * mypassword *
  

Links

Credits

My name is Erik Pettersson, known as ikea on irc.freenode.org. Mail: petterson.erik@gmail.com I hope this helped you.

Retrieved from "http://www.gentoo-wiki.info/Mobile_Phone/UMTS"

Last modified: Sun, 03 Aug 2008 14:01:00 +0000 Hits: 26,281