# [solved] grps + T630 via bluetooth

## serg_sk

i have strange problem. I want to up gprs on my phone. but i have this problem:

```
Can't connect RFCOMM socket: Connection refused
```

I followed the gentoo bluetooth guide. 

My configs:

```
Elvenhome serg_sk # cat /etc/conf.d/bluetooth

HCID_ENABLE=true

HCID_CONFIG="/etc/bluetooth/hcid.conf"

SDPD_ENABLE=true

HIDD_ENABLE=true

HIDD_OPTIONS=""

HID2HCI_ENABLE=false

RFCOMM_ENABLE=true

RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"

DUND_ENABLE=false

DUND_OPTIONS="--listen --persist"

PAND_ENABLE=false

PAND_OPTIONS="--listen --role NAP"
```

```
Elvenhome serg_sk # cat /etc/bluetooth/hcid.conf 

options {

   autoinit yes;

   security auto;

   pairing multi;

   pin_helper /usr/bin/bluepin;

}

device {

        name "Elvenhome";

   class 0x100;

   iscan enable; pscan enable;

   lm accept;

   lp rswitch,hold,sniff,park;

}

```

```
Elvenhome serg_sk # cat /etc/bluetooth/rfcomm.conf 

rfcomm10 {

   bind yes;

   device 00:0F:DE:EB:31:BE;

   channel   10;

   comment "OBEX Object Push";

}

rfcomm1 {

   bind no;

   device 00:0F:DE:EB:31:BE;

   channel 1;

   comment "Dial-up Networking";

}
```

My connection scripts:

```
Elvenhome serg_sk # cat /etc/ppp/gprs 

ABORT "BUSY"

ABORT "NO CARRIER"

ABORT "NO DIALTONE"

"" AT

"OK" ATZ

"OK" "AT+CGDCONT=1,\"IP\",\"www.umc.ua\"

"OK" "ATD*99#"

TIMEOUT 30

CONNECT
```

```
Elvenhome serg_sk # cat /etc/ppp/peers/gprs 

/dev/rfcomm1 115200

connect "/usr/sbin/chat -v -f /etc/ppp/gprs"

debug

local

ipcp-accept-local

ipcp-accept-remote

-pap

noipdefault

defaultroute

usepeerdns
```

After runnig pppd call gprs i get following lines:

```
Oct 29 11:52:48 Elvenhome pppd[4870]: pppd 2.4.2 started by root, uid 0

Oct 29 11:52:49 Elvenhome hcid[4807]: link_key_request (sba=00:A0:96:1C:F6:E9, dba=00:0F:DE:EB:31:BE)

Oct 29 11:52:49 Elvenhome pppd[4870]: Failed to open /dev/rfcomm0: Connection refused

Oct 29 11:52:49 Elvenhome pppd[4870]: Exit.

Oct 29 11:52:49 Elvenhome hcid[14875]: link_key_request (sba=00:A0:96:1C:F6:E9, dba=00:0F:DE:EB:31:BE)

Oct 29 11:58:50 Elvenhome hcid[4807]: link_key_request (sba=00:A0:96:1C:F6:E9, dba=00:0F:DE:EB:31:BE)

Oct 29 11:58:50 Elvenhome hcid[14875]: link_key_request (sba=00:A0:96:1C:F6:E9, dba=00:0F:DE:EB:31:BE)
```

Here some my operations:

```

Elvenhome serg_sk # rfcomm show

rfcomm10: 00:0F:DE:EB:31:BE channel 10 clean 

Elvenhome serg_sk # rfcomm bind 1 00:0F:DE:EB:31:BE 1

Elvenhome serg_sk # rfcomm show

rfcomm0: 00:0F:DE:EB:31:BE channel 1 clean 

rfcomm10: 00:0F:DE:EB:31:BE channel 10 clean

Elvenhome serg_sk # rfcomm connect 0 00:0F:DE:EB:31:BE 1

Can't connect RFCOMM socket: Connection refused

Elvenhome serg_sk # rfcomm show

rfcomm1: 00:0F:DE:EB:31:BE channel 1 closed 

rfcomm10: 00:0F:DE:EB:31:BE channel 10 clean

```

Anybody can help me?  :Smile: 

P.S. in windows all works fine.

----------

## thesnowman

Looks to me like you haven't paired the phone and your PC.  There should be only one link_key_request.  Have the two been paired successfully?  You should be able to find a link key in /var/lib/bluetooth/bdaddr/linkkeys where bdaddr is the bluetooth hardware address of your bluetooth adapter. If it's not there then you need to pair the devices.  The easiest way I have found to do this is:

```
# hcitool cc 00:0F:DE:EB:31:BE

# hcitool auth 00:0F:DE:EB:31:BE
```

At which point your phone should ask for a PIN.

The other thing to check is the ownership of your rfcomm devices.  I have set mine up so that /dev/rfcomm0 is root:dialout and my user is in the dialout group.  The rest of the rfcomm devices are created root:tty.  I've also created a /dev/modem symlink to /dev/rfcomm0.  Most programs seem to want to use /dev/modem.  This is my udev rule (in /etc/udev/rules.d/10-udev.rules):

```
KERNEL="rfcomm0", SYMLINK="modem", GROUP="dialout"

KERNEL="rfcomm[1-9]", GROUP="tty"
```

I also bind all of my rfcomm devices at startup.  This means you don't have to manually bind them from the command line.  The rfcomm device number does not have to match the channel number of the device you are connecting to.  So your /etc/bluetooth/rfcomm.conf could look like this:

```
rfcomm0 {

   bind yes;

   device 00:0F:DE:EB:31:BE;

   channel   10;

   comment "OBEX Object Push";

}

rfcomm1 {

   bind yes;

   device 00:0F:DE:EB:31:BE;

   channel 1;

   comment "Dial-up Networking";

}
```

----------

## serg_sk

wow  :Smile:  10x it works for me

----------

## Watson

Hi,

got the same problem but it didn't work for me yet. When I enter:

 *Quote:*   

> # hcitool cc 00:0F:DE:EB:31:BE
> 
> # hcitool auth 00:0F:DE:EB:31:BE
> 
> 

 

My pc connects to my phone. But on the phone, I dont have to enter a PIN. When I try to use rfcomm[01] as dialout, the connection aborts. Anyone an idea what might cause this?

Thanks, Watson ^^

----------

## thesnowman

Could be that the phone thinks it's already paired but your link keys don't match.  Check the devices the phone is paired with and remove your PC from the list if it's there.

Also check /var/lib/bluetooth/bdaddr/linkkeys to see if your PC thinks it's already paired with your phone.  You can remove the pairing by stopping the bluetooth service, editing that file and removing the reference to your phone, then starting the bluetooth service again.

Also, show us what your log files look like when you are attempting the auth.

----------

## Watson

When I try to connect to /dev/modem, it tells be that this modem cant be opened. I tried to disconnect completely and removed the linkkeys, but it still does not work.

Can someone tell me where the bluetooth logs are? And is there an order in connecting I have to whatch out? Does it matter wheather I connect from the PC or let the phone search for bluetooth devices and enable paring there?

Hope someone can help me. Thanks, Watson

----------

## Watson

this time I tried another thing: I deleted the devices on pc and handy and restarted /etc/init.d/bluetooth. Now I entered:

 *Quote:*   

> localhost bluetooth # hcitool cc 00:15:D3:02:51:2A
> 
> localhost bluetooth # hcitool auth 00:15:D3:02:51:2A
> 
> HCI authentication request failed: Input/output error

 

I googled for the error but I didn't find very much. Does someone has any idea what this might mean?

----------

## thesnowman

I think you need to open a new thread instead of hijacking this one.  Particularly as the thread title says [SOLVED].

----------

