First have to make sure your bluetooth card on pc/laptop is properly installed and detected by kernel.

On Dell 630 , stock on-board Bluetooth card just working out-of-the-box without any additional setting..

Requirement :

1. Dell 630 . with CentOS 5.2

2. Sony Ericsson k530i

3. Maxis 3G SIM card. (3G enabled)

Just to check.

[root@nb-namran bin]# rpm -qa | grep bluetooth
gnome-bluetooth-0.7.0-10.2.el5
gnome-bluetooth-libs-0.7.0-10.2.el5

set the /etc/bluetooth/hcid.conf something alike the one below..

[root@nb-namran bin]# cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
#security none;
security user;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# Default PIN code for incoming connections
passkey "0";
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
#name "%h-%d";
#name "%h-%d";
name "prelude";
# Local device class
class 0x120104;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
}

then run

/etc/init.d/bluetooth start

enable the bluetooth on the phone .. (remove previous detected/connected Bluetooth devices that related to this laptop/pc)

then .. run

hciconfig

shall see somtething like this..

[root@nb-namran bin]# hciconfig
hci0: Type: USB
BD Address: 00:1E:37:80:BA:46 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:24032 acl:597 sco:0 events:969 errors:0
TX bytes:13639 acl:593 sco:0 commands:186 errors:0

then scan for your handphone..

hcitool scan

will have something like this..

hcitool-scan.png

then..

run

sdptool search DUN

sdptool-search-dun.png

mind the channel number and the id.. as is example is Channel 2

then run

l2ping 00:21:9E:38:21:EE

l2ping.png

then..

[root@nb-namran]# rfcomm bind 2 00:21:9E:38:21:EE 2

this will bind the bluetooth DUN to /dev/rfcomm2

check..

[root@nb-namran ]# rfcomm
rfcomm2: 00:21:9E:38:21:EE channel 2 clean
make sure the device is created in /dev/rfcomm2

[root@nb-namran rules.d]# ll /dev/rfcomm2
crw------- 1 namran root 216, 2 Dec 18 01:13 /dev/rfcomm2

then.. test it with

minicom -s rfcomm2

set the serial port to /dev/rfcomm2

and speed as 57600 8-N-1

the rest disable. save .. restart minicom with

minicom rfcomm2

on the first time ..it will Initialize the modem

and the phone will prompt to allow pc/laptop to connect to it as modem..

press always allow / always ask .. (either will work)

then it will ask you to specify the pass phrase key.. put anykey..

and on linux machine also will popup to enter pass phrase key..

enter the same pass key..

if succesfully connected minicom to serial and enter ATI .. shall return phone model. as below.

at-sony.png

..

now to get hook to GPRS/ 3G / EDGE..

create a file in /usr/local/bin/go_gprs.sh

with these content..

#! /bin/sh
if [ $# -lt 5 ] ; then
echo "go_gprs.sh <tty??> <speed> <APN> <user> <pass> <parms>"
exit
fi
echo port $1
echo speed $2
echo apn $3
echo user $4
echo pass $5
echo parms $6
/usr/sbin/pppd /dev/$1 $2 nodetach debug crtscts linkname "$1.link" connect "chat -v ECHO OFF TIMEOUT 15 '' AT OK 'AT+CGDCONT=1,"IP","$3"' OK ATE0V1 OK ATDT*99# CONNECT" lcp-echo-interval 20 lcp-echo-failure 3 usepeerdns user "$4" password "$5" defaultroute

.. and another one.. depend on your ISP..

/usr/local/bin/go_k530i_maxis

with these..

#!/bin/sh
/usr/local/bin/go_gprs.sh rfcomm2 115200 unet maxis wap

make those as executable..

chmod a+x /usr/local/go_*

then.. to connect to maxis 3G..

just type..

go_k530i_maxis

to disconnect.. CTRL+C

it will have something like this..

rfcomm2.png

Reference : http://www.niemueller.de/wiki/?GPRSviaBluetooth

Source : go_gprs.sh is taken from .sha

Related posts:

  1. How to connect to maxis gprs/wap via bluetooth..on z530i
  2. Bluetooth file transfer in CentOS 5
  3. MF 622 with U mobile network in centos 5.
  4. make it invisible to those ip..
  5. How to capture screen from K530i