Search:  
Gentoo Wiki

HOWTO_Connect_using_PPP_Blutooth_and_EVDO


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

Contents

Connecting to Verizon Wireless EVDO Using BlueZ

This is a short walk-through, and assumes you have a working BlueZ installation, use KDE, and own a "LG enV" (VX9900) Verizon Phone, and you live in an EVDO area. It may work for other phones, and non-EVDO connections, but I have no way of confirming this at the moment. You need root access to follow these instructions.

Prerequisites

You need to edit the following files, so they contain the proper information:

File: /etc/portage/package.use
net-dialup/ppp activefilter atm eap-tls radius mppe-mppc ipv6
net-wireless/bluez-utils dbus
net-wireless/kdebluetooth irmc
File: /etc/modprobe.d/ppp
alias char-major-108    ppp_generic
alias /dev/ppp          ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-13      n_hdlc
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-18   ppp_mppe_mppc
alias ppp-compress-21   bsd_comp
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate
alias net-pf-24         pppoe

Afterwards run update-modules.

Now to emerge the tools that you'll need

Code: Installing PPP and Bluetooth Helpers
# emerge -av net-wireless/bluez-utils net-wireless/kdebluetooth net-dialup/ppp
# rc-update add bluetooth default

Adding a persistent ppp device (otherwise pppd will complain, loudly)

Code: Installing PPP and Bluetooth Helpers
# mkdir bare_root
# mount --bind / bare_root
# mknod bare_root/dev/ppp c 108 0
# umount bare_root
# rmdir bare_root

Now, you should reboot your computer, so that the updated /etc/modprobe.d/ppp and the new ppp device get loaded properly.

Pairing Your Phone

Once you've rebooted, and started KDE, you need to start the bluetooth helper. Just go to the "K" button > "Internet" > "kbluetoothd Bluetooth Server". Follow your phones instructions to pair to a device, then pair to your computer. "kbluetoothd" will prompt you for a pin, it can be anything numeric as long as you type the same number in on both your phone, and on your computer. Now your phone is paired, and we can get on to the fun bits.

Finding the communications channel

To find the communications channel, first we must obtain our phones bluetooth address, so make sure your phone is still in "discoverable mode" and execute the following

Code: Using hcitool to locate a device
# hcitool scanning
Scanning ...
        00:1A:6B:31:D2:2C       SLABELLE
        00:1A:6B:C4:D0:DD       FLT-SHELL
        00:1C:62:1C:43:85       mroduner

Since my phones name is "mroduner" my phone's address is "00:1C:62:1C:43:85", now that I know this, I can find my channel by doing the following

Code: Using sdptool to list services
# sdptool records 00:1C:62:1C:43:85 | grep -iA10 modem
Service Name: Bluetooth Modem
Service RecHandle: 0x10007
Service Class ID List:
  "Dialup Networking" (0x1103)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a

Configuring rfcomm

Now I know the channel (Channel: 8) my phone uses as a modem, so now I need to edit the rfcomm configuration, so that we can use pppd to connect to the phone

File: /etc/bluetooth/rfcomm.conf
rfcomm0 {
  # Automatically bind the device at startup
  bind yes;
  # Bluetooth address of the device
  device 00:1C:62:1C:43:85;
  # RFCOMM channel for the connection
  channel 8;
  # Description of the connection
  comment "VX9900 Modem";
}

We also need to tell the bluetooth script that we want to enable rfcomm, so we have to make sure the RFCOMM lines in /etc/conf.d/bluetooth are correct

File: /etc/conf.d/bluetooth
RFCOMM_ENABLE=true
RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"

Now that that's all done, we need to restart the bluetooth service

Code: Restarting Bluetooth
# /etc/init.d/bluetooth restart

Creating the ppp scripts

We're almost done, now it's time to set up your ppp scripts so that you can connect successfully. First we need to add a folder to /etc

Code: Creating the chatscripts folder
# mkdir /etc/chatscripts

Now we need to create our "evdo" chat script for pppd

File: /etc/chatscripts/evdo
TIMEOUT                 5
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
OK                      ATD#777
TIMEOUT                 22
CONNECT                 ""

Lastly we need to create a peer file for verizon, but change "1110001111" to be your verizon phone number.

File: /etc/ppp/peers/verizon
ktune
connect "/usr/sbin/chat -v -f /etc/chatscripts/evdo"
refuse-chap
noauth
defaultroute
usepeerdns
/dev/rfcomm0
local
novj
noipdefault
name 1110001111@vzw3g.com
password vzw
persist
silent
default-asyncmap
noccp
linkname verizon

This also works with Alltel, but you need a different peer file. Again, replace 1110001111 with your 10-digit cellphone number.

File: /etc/ppp/peers/alltel
/dev/rfcomm0
connect "/usr/sbin/chat -v -f /etc/ppp/chatscripts/evdo"
name 1110001111@alltel.net
password alltel
linkname alltel
defaultroute
usepeerdns

Now all the configuration is done, sorry if that's a bit long.

Using your new connection

Now that you've made it this far, the next bits are _easy_

Connecting

To connect, we just call pppd and tell it to connect to verizon

Code: Using pppd to connect
# pppd call verizon

Disconnecting

To kill the connection, use the following

Code: Killing the verizon ppp connection
# kill `cat /var/run/ppp-verizon.pid | head -n1`

Epilogue

I Hope you found this useful, It took me quite some time to get this working when verizon upgraded my area to EVDO, and suddenly my bluetooth DUN quit working.

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

Last modified: Fri, 05 Sep 2008 10:10:00 +0000 Hits: 3,784