Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to dialup using a mobile phone via Bluetooth, Part 2 of Bluetooth on DSL< Next Oldest | Next Newest >
Juanito Offline

Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Jan. 19 2007,08:30 QUOTE

This is part 2 of the DSL Bluetooth how-to. In order to proceed from here, you will need to have Bluetooth up and running on your DSL machine and be able to "pair" with a Bluetooth mobile phone as described in part 1 - see post " How to start Bluetooth & Pair with a remote device"

In order to connect to the modem in your mobile phone over a Bluetooth connection, you need to first discover which channel your phone uses for dial-up networking (DUN). Apparently the channel number changes from manufacturer to manufacturer and even from model to model. The service discovery protocal daemon does not always appear to start automatically, so you may need to start this before checking for the DUN channel - note the output has been edited to only show what we are looking for:

# sdpd
# sdptool browse 00:0A:D9:E8:4A:65 [put your phone bt address here]
Browsing 00:0A:D9:E8:4A:65 ...
Service Name: Dial-up Networking
Service Description: Dial-up Networking
Service Provider: Sony Ericsson
Service RecHandle: 0x1000c
Service Class ID List:
 "Dialup Networking" (0x1103)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 7
Language Base Attr List:
 code_ISO639: 0x656e
 encoding:    0x6a
 base_offset: 0x100
Profile Descriptor List:
 "Dialup Networking" (0x1103)
   Version: 0x0100

Now we know DUN is on channel 7, we can configure a bt communications port in order to communicate with the phone modem. Note that the device may not exist in DSL so we will need to create it - this seems to work best when you create it after configuring it:

# rfcomm bind 0 00:0A:D9:E8:4A:65 7 [leading zero=rfcomm0, trailing 7=DUN]
# rfcomm show                      
rfcomm0: 00:0A:D9:E8:4A:65 channel 7 clean

# mknod -m 666 /dev/rfcomm0 c 216 0

Now the communications port is created, we need to register the service:

# sdptool add --channel=7 DUN [two dashes before channel]
Dial-Up Networking service registered

I did not manage to get microcomm to communicate with the phone modem, so you will need to use wvdial or similar. Since wvdial will not scan for rfcomm0, we need to fool it by deleting an unused port (/dev/ttyS3 on my machine) and symlinking it to rfcomm0. Once wvdial is configured, you can edit /dev/ttyS3 back to /dev/rfcomm0. Note that your phone may ask for your Bluetooth PIN when the wvdialconf command is issued:

# apt-get install wvdial
# rm /dev/ttyS3
# ln -s /dev/rfcomm0 /dev/ttyS3
# wvdialconf /etc/wvdial.conf
Scanning your serial ports for a modem.

Port Scan<*1>: S4   S5   S6   S7   S14  S15  ACM0 ACM1
ttyS3<*1>: ATQ0 V1 E1 -- OK
ttyS3<*1>: ATQ0 V1 E1 Z -- OK
ttyS3<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS3<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS3<*1>: Modem Identifier: ATI -- P900
ttyS3<*1>: Speed 4800: AT -- OK
ttyS3<*1>: Speed 9600: AT -- OK
ttyS3<*1>: Speed 19200: AT -- OK
ttyS3<*1>: Speed 38400: AT -- OK
ttyS3<*1>: Speed 57600: AT -- OK
ttyS3<*1>: Speed 115200: AT -- OK
ttyS3<*1>: Speed 230400: AT -- OK
ttyS3<*1>: Speed 460800: AT -- OK
ttyS3<*1>: Max speed is 460800; that should be safe.
ttyS3<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttyS3.
Modem configuration written to wvdial.conf.
ttyS3<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

You will need to make the following modifications to /etc/wvdial.conf:

[Dialer Defaults]
Modem = /dev/ttyS3 [change to /dev/rfcomm0 after reboot]
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
; Phone = <Target Phone Number> [remove ";" & enter your ISP #]
; Username = <Your Login Name> [remove ";" & enter your login]
; Password = <Your Password> [remove ";" & enter your password]

Now you're ready to dial-up to your ISP - again, your phone may ask for the PIN:

# wvdial
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
--> Modem initialized.
--> Sending: ATDT123456789
--> Waiting for carrier.
CONNECT 9600 [seems GSM over Bluetooth is not that quick...]
--> Carrier detected.  Waiting for prompt.
--> Looks like a login prompt.
--> Sending: abcdefg
--> Looks like a password prompt.
--> Sending: (password)
--> Don't know what to do!  Starting pppd and hoping for the best.
--> Starting pppd at Fri Jan 19 12:01:01 2007
--> pid of pppd: 1470
--> Using interface ppp0
--> local IP address
--> remote IP address
--> primary DNS address
--> secondary DNS address
Caught signal #2!  Attempting to exit gracefully...

That's it - have fun (and now to work on the GPRS connection).
Back to top
Profile PM 
0 replies since Jan. 19 2007,08:30 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Quick Reply: How to dialup using a mobile phone via Bluetooth

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code