# broken bluez

## vitke

Hi all

My problem is that I did several things in the same time and now I don't know which one to blame for not being able to l2ping my Nokia 6670 phone any more. I get

```
Ping: 00:E0:03:68:E5:F9 from 00:10:60:AF:B2:DA (data size 44) ...

no response from 00:E0:03:68:E5:F9: id 0

no response from 00:E0:03:68:E5:F9: id 1

...

```

However, hcitool inq still works:

```
# hcitool inq

Inquiring ...

        00:E0:03:68:E5:F9       clock offset: 0x2997    class: 0x50020c

```

And here is what I did: first I removed paired devices from my phone, then I emerged new bluez-libs and bluez-utils (2.16-r1), and finally I deleted /dev/rfcomm* that I previously created because while emerging bluez-utils I saw a message that said that device files are now in /dev/bluetooth/rfcomm/. Now I cannot pair the devices, I cannot ping, and creating /dev/rfcomm* does not change anything. My guess is that the new bluez is broken.

By the way, if someone has some Gentoo-specific tips for tcp/ip over bluetooth (GnuBox and related) or any systematic howto that explains how these things work (I found lots of type-this-and-then-type-that-style texts that didn't lead to a solution), I would love to hear about them.

----------

## amiatrome

It's a little late but I had just written a HOWTO for GnuBox, Linux and Nokia (Gentoo and Nokia 3230 in my case) here. Screenshots included!  :Razz:  Didn't post it here since its not really Gentoo specific...

----------

## thesnowman

Let me just start by saying that bluez is not broken.

You have removed the pairing from your phone but not from bluez.  bluez still thinks your devices are paired that is why you cannot pair them.  Removing pairing in bluez depends on the version you have installed.  It used to be that you had to delete /etc/bluetooth/link_key and recreate it with the same ownership and permissions:

```
# /etc/init.d/bluetooth stop

# rm /etc/bluetooth/link_key

# touch /etc/bluetooth/link_key

# chown root:root /etc/bluetooth/link_key

# chmod -rwx /etc/bluetooth/link_key

# /etc/init.d/bluetooth start
```

The problem here is that this removes pairing for ALL devices.  Starting with version 2.16 of bluez-utils and bluez-libs the pairing information moved to /var/lib/bluetooth/DEVICEADDRESS/linkkeys.  This is now a text file that you can edit to remove individual pairings.

There is no need to delete, or create rfcomm devices in /dev.  They are automatically when you start the bluetooth init script - assuming you have the configuration file set up correctly (RFCOMM_ENABLE=true).  It will parse /etc/bluetooth/rfcomm.conf and create a /dev entry for each entry in the file.

There are no Gentoo specific tips required for bluez because it is using standard kernel drivers and user space libraries (well the bluetooth init script had been Gentooified).  You should be able to follow every bluez specific howto you can find and it will work.  There are lots of howtos written by Gentoo users right here in these forums and on the Gentoo Linux Wiki.

----------

## vitke

Thanks guys. I solved this problem few days after I posted the question, but I can't remember what was the problem... I think I just re-emerged some packages. Thanks anyway. Let me just add that at the end I had to add the --encrypt option to dund to make it work, which is specific to 6670, and that the best howto that I found about GnuBox is on the GnuBox site, although it is a bit chaotic and quite long. Sorry for posting these things here if they don't belong here, but Gentoo forums are so helpfull and I got used to them so much that very soon I may start posting culinary questions here as well... :Very Happy: 

----------

## avinash_rk

 *amiatrome wrote:*   

> It's a little late but I had just written a HOWTO for GnuBox, Linux and Nokia (Gentoo and Nokia 3230 in my case) here. Screenshots included!  Didn't post it here since its not really Gentoo specific...

 

I installed gnubox on my Nokia 6600 (firmware v5.53 30-12-04 NHL-10) and I am getting this error on connecting:

```

andromeda ~ # dund --listen call dun --nodetach

dund[10364]: Bluetooth DUN daemon version 2.18

dund[10370]: New connection from <bluetooth address>

using channel 1

Failed to set PPP kernel option flags: Inappropriate ioctl for device

Using interface ppp0

Connect: ppp0 <--> /dev/rfcomm1

Hangup (SIGHUP)

Modem hangup

Connection terminated.

```

Contents of /etc/ppp/peers/dun:

```

115200

10.13.26.14:10.13.26.20

noauth

local

lock

debug

kdebug 31

ms-dns 10.200.1.11

```

PPP has been built into the kernel and not as a module. I am able to use the bluetooth for transferring files etc. Is this a problem on the ppp side or on the bluetooth side?

----------

## CarloJekko

hi... with nokia 6600 and gnubox  I'have this problem:

i have internet on eth1 : inet addr:39.255.188.63  Bcast:39.255.191.255  Mask:255.255.248.0

this is my /etc/resolv.conf

```

domain fastwebnet.it

nameserver 62.101.81.80

nameserver 62.101.81.81

```

so this is my /etc/ppp/peers/dun

```

460800

debug

39.255.188.63:192.168.1.2

ms-dns 62.101.81.81 

lock

crtscts
```

so i type 

```
sdptool add --channel=3 SP

dund --listen --channel 3 --msdun call dun  --nodetach

rfcomm bind 3 00:0E:6D:E7:2B:78 3

echo x >/dev/rfcomm3
```

i try to connect with Bt connection to opera and this is the output 

```
Using interface ppp0

Connect: ppp0 <--> /dev/rfcomm0

dund[14680]: New connection from 00:0E:6D:E7:2B:78

local  IP address 39.255.188.63

remote IP address 192.168.1.3

```

 i can ping my cell, and i have the apache server with my site on it and so if i put in opera of the cell 39.255.188.63 (my ip ) i can navigate on my site...but i can't connect  with others servers on internet... 

i have made

```

iptables -X

iptables -t nat -F

iptables -F

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward 
```

  but nothing

any idea?

----------

## CarloJekko

up

i think is a problem of ppp because on mandrake it works with  the same configuration

```
 net-dialup/ppp-2.4.2-r15  +activefilter -atm +dhcp +ipv6 +mppe-mppc -pam +radius
```

it can be a nat problem?

¯

----------

