Access the internet in Ubuntu via Bluetooth-enabled mobile phones
Many mobile phones now come equipped with a Bluetooth modem which can be configured easily in Ubuntu to access the internet without installing proprietary drivers or software.
1. Check local Bluetooth availability on PC
Login as root and enter hciconfig in the terminal to check that the Bluetooth devices in PC is on. Typical output should appear as shown below:
hci0 : Type: USB
BD Address: 00:19:7E:DF:51:02 ACL MTU: 1017:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:957 acl:0 sco:0 events:26 errors:0
TX bytes:603 acl:0 sco:0 commands:26 errors:0
2. Discover the phone
Set the phone’s Bluetooth to discoverable and enter hcitool scan in the terminal. This will display the phone’s name and MAC address (not it down )
3. Verify dial-up networking (DUN) profile
Enter sdptool browse to view the phone’s Bluetooth profiles. If DUN exists, it will be listed as follows:
service Name: Dial-up Networking
Sevice RecHandle: 0×10002
Service Class ID List:
“Dialup Networking” (0×1103)
“Generic Networking” (0×1103)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 2
Profile Descriptor List:
“Dialup Networking” (0×1103)
Version: 0×0100
Note down the channel value.
4. Set a passkey(optional)
Edit the /etc/bluetooth/hcid.conf file and set the passkey to four zeros (0000) in the Options section
# Default PIN code for incoming connections
passkey “0000”;
Ensur[e the following values for these settings:
autoinit yes;
security auto;
pairing multi;
5. Edit the RFCOMM file
Edit /etc/bluetooth/rfcomm.conf to bind the DUN channel over the phone with RFCOMM for connectivity as follows:
rfcomm0 {
bind yes;
device 00:1C:A4:96:03:CC;
channel 2;
comment “Example Bluetooth device”;
}
6. Restart Bluetooth
Enter /etc/init.d/bluetooth/restart
7. Pair the devices
Use the phone to scan for the PC and enter the passkey to pair the two. Successful pairing means the PC and phone have authenticated each other.
8. Configure wvdial
Edit /etc/wvdial.conf and add a new Dialer entry with service provider specific settings
[Dialer Phone]
Modem = /dev/rfcomm0
Phone = ATD*99***2#
Username = According to your service provider
Password = According to your service provider
Use the dialer name (Phone, in this case) to go online –wvdial Phone – and enjoy surfing.
NOTE:
- The mobile phone should have an activated GPRS service.
- Internet usage will be charged by the service provider
- The above guide was tested with Ubuntu 7.10 (Gutsy) on an Acer Aspire 4730z