How to connect to your phone via Bluetooth to access Internet
by:MWood
this is not 100% foolproof, but works for me.
My provider is DNA Finland, your chatscript line
may be different acording to your service description
Config your files:
/etc/bluetooth
-
edit
rfcomm.conf and
main.conf
/etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#
rfcomm0 {
# # Automatically bind the device at startup
bind yes;
#
# # Bluetooth address of the device
device 00:26:CC:8A:24:59;
#
# # RFCOMM channel for the connection
channel 1;
#
# # Description of the connection
comment "Dial-Up Networking";
}
/etc/bluetooth/main.conf
[General]
# List of plugins that should not be loaded on bluetoothd startup
#DisablePlugins = network,input
# Default adaper name
# %h - substituted for hostname
# %d - substituted for adapter id
#Name = %h-%d
Name = YOUR_BOX
# Default device class. Only the major and minor device class bits are
# considered
#Class = 0x000100
Class = 0x0a010c
# run "hciconfig hci0 class"
# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
DiscoverableTimeout = 0
# Use some other page timeout than the controller default one
# (16384 = 10 seconds)
PageTimeout = 8192
# Behaviour for Adapter.SetProperty("mode", "off")
# Possible values: "DevDown", "NoScan" (default)
OffMode = NoScan
# Discover scheduler interval used in Adapter.DiscoverDevices
# The value is in seconds. Defaults is 0 to use controller scheduler
DiscoverSchedulerInterval = 0
/etc/ppp/peers
-
create a file "BluetoothDialup"
/etc/ppp/peers/BluetoothDialup
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0
/etc/chatscripts
-
create a file "BluetoothDialup" ( yes the same name as above )
/etc/chatscripts/BluetoothDialup
TIMEOUT 35
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
OK 'AT+CGDCONT=1, "IP", "INTERNET"'
OK ATD*99#
CONNECT ""
note: the line
OK ATD*99# is your dialup number, mine is simply *99#
note: the line
OK 'AT+CGDCONT=1, "IP", "INTERNET"'
is very importaint, especially the "INTERNET" entry, this should
match your phones service. Mine is "dna INTERNET" on my phone, but
the correct info for the script is "INTERNET".
If you get an error about needed to subscribe to blahblah, you got it wrong!
/var/lib/YOUR_BT4_BLUETOOTHDEVICE_MAC/
-
create a file called "pincodes"
enter on one line...
YOUR_PHONES_MAC PIN
/var/lib/YOUR_BT4_BLUETOOTHDEVICE_MAC/pincodes
example:
00:11:22:33:44:55 1234
-
restart the bt daemon...
user@bt~#
/etc/init.d/bluetooth restart
to connect issue the command...
user@bt~#
pon BluetoothDialup
to disconnect issue the command....
user@bt~#
poff BluetoothDialup
problems:
If you have previously paired your phone in windows,
you may need to delete the old pairing,
then repair in BT4. Pairing will be from BT4->Phone
( accecpt request and PIN:1234 )