How to Use Internet Over Mobile Phone

From Howtopedia - english

Jump to: navigation, search

Contents

How to Use Internet Over Mobile Phone

General

This page describes how you can connect your Computer with your mobile phone using bluetooth to get an internet connection.

If you cannot get a GPRS Connection from your mobile phone yet, it most likely won't work with your computer as well, get it work with your phone alone before attempting to get it with computer. Hint: Call your ISP, they'll send you the configuration for your phone if you ask them.

Linux

Get a root shell

sudo bash

or

su -

Check if everything is in place

updatedb # generates index of files on disk
locate pppd # searches that index for pppd (there should be one in: /usr/sbin)
locate rfcomm # in /usr/bin

if any of theese commands are unfamiliar to you, read the DESCRIPTION part of the man page (try "apropos ppp" or "man pppd")

If theese are not in place use apt or emerge (depending on distribution) to find and get them. The packages on ubuntu are:

bluez-utils
libbluetooth2

"hciconfig" should show like this:

hci0:   Type: USB
        BD Address: 00:1E:37:E6:3F:62 ACL MTU: 1017:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN 
        RX bytes:9298 acl:42 sco:0 events:94 errors:0
        TX bytes:1333 acl:31 sco:0 commands:43 errors:0

IF NOT: your bluetooth device is not up and running, try switching off and on again. If that does not help: search "howto bluetooth linux" and your machine name (e.G. "HP 2510p").

"hcitool scan" should show like this:

Scanning ...
       00:17:B0:40:29:18       Ben Mobile

IF NOT: your computer does not detect your mobile. Try switching the bluetooth of your computer and mobile off and on again, then test again. If that does not help search: "howto bluetooth linux mobile" and your machine and mobile name.

setting up config files

/etc/ppp/peers/gprs

/dev/rfcomm0 115200
connect '/usr/sbin/chat -v -f /etc/chatscripts/gprs'
noauth
defaultroute
usepeerdns
debug
noipdefault
local
ipcp-accept-local
novj
novjccomp
lcp-echo-failure 10000
lcp-echo-interval 1000
Explantation

/dev/rfcomm0 is the channel that rfcomm listens to. 115200 the connection speed. (115200 bits/sec)

/usr/sbin/chat is the protocoll to use (chat) /etc/chatscripts/gprs references the config for that chat.

/etc/chatscripts/gprs

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         15
OK              ATE1
OK              'AT+CGDCONT=1,"IP","internet.eplus.de","",0,0'
OK              ATD*99***1#
CONNECT         ""
Explantations

"internet.eplus.de" has to be changed for your ISP. There is a list at the bottom of the page #List Of ISP Specific Data

Last steps

open 2 shells, get root in both of them: first:

rfcomm connect 0 00:17:B0:40:29:18

second:

pon gprs
route del default gw
route add default gw 10.6.6.6

Explantations

  • rfcomm opens the bluetooth connection. 00:17:B0:40:29:18 is the address of my phone, yours is different!
  • pon opens a ppp connection (the file /etc/ppp/peers/'gprs' is the config for it
  • route del default gw removes the old gateway adress (if any)
  • route add default gw 10.6.6.6 sets the new one

10.6.6.6 is the gateway of my isp, lookup yours below or do

ifconfig ppp0

and use the 'P-t-P:' value found there

Done

Knows Problems

  • The connection has to be established manually
  • The default route won't be set automagically

Tested with

Mobile Phones

  • Nokia 6103

Computers

  • HP 2510p

ISPs

  • EPlus (BASE) Germany

Distributions

  • Ubuntu 7.10


Windows

Tested with

Mobile Phones

Computers

ISPs

Weblinks

Google searches

  • howto ppp over bluetooth Nokia
  • Nokia 6103 PPP howto linux

List Of ISP Specific Data

Germany

Eplus

  • Zugangspunkt/APN/Accesspoint: internet.eplus.de
  • gateway adress: 10.6.6.6

References

<references/>

Categories

Personal tools