LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bluetooth "pairing" problem on Debian Sarge (https://www.linuxquestions.org/questions/linux-networking-3/bluetooth-pairing-problem-on-debian-sarge-458195/)

lgs 06-25-2006 01:34 PM

Bluetooth "pairing" problem on Debian Sarge
 
I am setting up a dialup networking over a bluetooth link between a Motorola V600 cell phone and Debian Sarge (kernel 2.6.8-2-386). I have done this before with Mandriva 2006LE, but I can't get it working on Debian.

I believe the bluez bluetooth stack is compiled into this kernel. Other necessary daemons (l2cap and usbcore) are loaded as modules and are shown with lsmod.

I have it ALMOST working. I can detect the phone by running "hcitool inq" on the command line. I can get the list of dialup networking services provided by the phone with "sdptool search DUN".

However, when I try to connect to the Internet using pppd (as root) and my chat script (the same one I use successfully in Mandriva), "pairing" between the phone and the computer fails.

On the telephone, I get the request to connect and am asked to enter the PIN. After I enter the PIN, the /usr/bin/bluepin "pin helper" program is supposed to put up a dialog box to ask me for the pairing PIN. It does not appear, so I cannot "pair" with the telephone.

I opened /etc/bluetooth/hcid.conf and specified /usr/bin/bluez-pin as the "PIN helper", with no results.

/usr/bin/bluepin is a python script. I can run it directly from the command line (as root). bluez-pin will also run from the command line either as root or regular user. At any rate, I run pppd for this connection as root.

binary_y2k2 06-25-2006 01:53 PM

did you set the security level right?
Code:

security user;

lgs 06-26-2006 08:49 AM

Yes, the secirity level is set to "user" in my hcid.conf file.

The hcid.conf file looks like this:

Quote:

#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.7 2004/12/13 14:16:03 holtmann Exp $
#

# 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 user;

# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;

# PIN helper
pin_helper /usr/bin/bluepin;

# D-Bus PIN helper
dbus_pin_helper;
}

# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h-%d";

# Local device class
class 0x3e0100;
# class 0x100000;
# 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;

# Authentication and Encryption (Security Mode 3)
#auth enable;
#encrypt enable;
}
rfcomm.conf looks like this:

Quote:

#
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
#

#
# Example:
#
rfcomm0 {
# # Automatically bind the device at startup
bind yes;
#
# # Bluetooth address of the device
device AC:BB:F5:9C:30:00;
#
# # RFCOMM channel for the connection
channel 1;
#
# # Description of the connection
comment "Motorola Phone";
}

binary_y2k2 06-26-2006 09:18 AM

Try uncommenting "#auth enable;"
My hcid.conf look like:
Code:

#
# 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 user;

        # Pairing mode
        #  none  - Pairing disabled
        #  multi - Allow pairing with already paired devices
        #  once  - Pair once and deny successive attempts
        pairing multi;

        # PIN helper
        pin_helper /usr/bin/pinwrapper;

        # D-Bus PIN helper
        #dbus_pin_helper;
}

# Default settings for HCI devices
device {
        # Local device name
        #  %d - device id
        #  %h - host name
        name "%h-%d";

        # Local device class
        class 0x3e0100;

        # 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;

        # Authentication and Encryption (Security Mode 3)
        auth enable;
        #encrypt enable;
}


lgs 06-26-2006 10:11 PM

Thanks for the help, binary_y2k2.

Quote:

Try uncommenting "#auth enable;"
No good. When I do that the phone won't ask for the pairing pin, either. "auth enable" is commented out in my Mandriva 2006 setup, and it works.

This problem is extremely frustrating. Why should this break on Debian?

binary_y2k2 06-26-2006 10:37 PM

I'm running Kubuntu (based on Debian) and that config works for me so I don't know why it's not working for you.
Have you tryed coppying the config from Mandriva? (You probably have)
You could try seeing if there are any packages that you need to install "apt-cache search bluetooth"

lgs 06-27-2006 10:17 AM

Yes, I copied the bluetooth config files directly over from Mandriva.

gprs is my main way to connect to the Internet. I am going to try Ubuntu, but I will also continue to look for the problem in Debian.


All times are GMT -5. The time now is 05:29 PM.