# KBlueTooth (kbluepin): Can't pair phone with laptop

## abalint21

My Problem: I can't seem to pair my phone with my laptop.

I use KBlueTooth-1.0_beta2-r1. I also tried the stable version, but with the same results as bellow.

KBlueToothD: output when connecting

```
kbluetoothd: slotConnectionStateChanged

kbluetoothd: HciSocket::open()

kbluetoothd: HciSocket::open()

kbluetoothd: Checking state00:19:63:51:F4:48 2

kbluetoothd: connections: 1

kbluetoothd: slotConnectionStateChanged

kbluetoothd: HciSocket::open()

kbluetoothd: HciSocket::open()

kbluetoothd: Checking state00:19:63:51:F4:48 2

kbluetoothd: connections: 1

kbluetoothd: HCI-event: f

kbluetoothd: HCI-event: e

kbluetoothd: HCI-event: 3

kbluetoothd: HCI event 'connection complete' status:3 ltype:1

kbluetoothd: TrayIcon::slotConnectionComplete()

kbluetoothd: slotConnectionStateChanged

kbluetoothd: HciSocket::open()

kbluetoothd: connections: 0

kbluetoothd: slotConnectionStateChanged

kbluetoothd: HciSocket::open()

kbluetoothd: connections: 0
```

Altough kbluepin is set in hcid.conf as the default helper, security is set to user, and kbluepin doesn't get called:

If I compile it with the debug flag set, then the windows will show, kbluepin will run, but with the following output:

```
Dir: out

Addr: <unknown>

Name: <unknown>

setgid failed for gid: 0

setgid: Operation not permitted

```

I the debug flag is not set, then the window won't even show up, and the application will exit with the following error:

```
setgid: Operation not permitted

ERR

```

Does someone have any suggestions how to resolve this issue?

Any help is appreciated.

--------------------------

Additional info:

hcid.conf:

--------------------------

```
# 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/lib/kdebluetooth/kbluepin;

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

}

```

--------------------------

conf.d/bluetooth config file

--------------------------

```
# Bluetooth configuraton file

# Start of hcid (allowed values are "true" and "false")

HCID_ENABLE=true

# Config file for hcid

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

# Start sdpd (allowed values are "true" and "false")

SDPD_ENABLE=true

# Start hidd (allowed values are "true" and "false")

HIDD_ENABLE=true

# Arguments to hidd

HIDD_OPTIONS=""

# Run hid2hci (allowed values are "true" and "false")

HID2HCI_ENABLE=false

# Bind rfcomm devices (allowed values are "true" and "false")

RFCOMM_ENABLE=true

# Config file for rfcomm

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

# Start dund (allowed values are "true" and "false")

# If you want to use dund, you must install: net-dialup/ppp .

DUND_ENABLE=false

# Arguments to dund

DUND_OPTIONS="--listen --persist"

# Start pand (allowed values are "true" and "false")

PAND_ENABLE=false

# Arguments to pand

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

--------------------------

kernel modules loaded:

rfcomm

hidp

--------------------------

----------

## dentharg

I have exactly the same problem.

The only way I found is to set up security to auto..

----------

## abalint21

 *dentharg wrote:*   

> I have exactly the same problem.
> 
> The only way I found is to set up security to auto..

 

That's what I did to  :Smile: 

----------

## tomk

Moved from Documentation, Tips & Tricks to Kernel & Hardware, please don't post support questions to DT&T.

----------

