#642104 bluez: bluetoothd refusing input device connection

Package:
bluez
Source:
bluez
Description:
Bluetooth tools and daemons
Submitter:
scott leggett
Date:
2023-04-20 13:45:02 UTC
Severity:
normal
Tags:
#642104#5
Date:
2011-09-19 13:49:58 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
I installed bluedevil for KDE to use my bluetooth mouse.

   * What exactly did you do (or not do) that was effective (or ineffective)?
I put the mouse into pairing mode, the device appears briefly in KDE's
bluetooth stack, but disappears within a few seconds and I am unable to pair
with it.

When trying to pair, the following line appears in /var/log/syslog, leading me
to believe the bug lies in bluez:

        Sep 19 21:42:43 hpdeb bluetoothd[1886]: Refusing input device connect:
No such file or directory (2)
        Sep 19 21:42:53 hpdeb bluetoothd[1886]: Agent replied with an error:
org.bluez.Error.Canceled, Authorization canceled
        Sep 19 21:42:53 hpdeb bluetoothd[1886]: Access denied: Authorization
canceled

Note the 10 second delay between the first and second messages. The second set
appears when the bluedevil popup disappears (times out?).

Regards,
Scott.

#642104#10
Date:
2011-09-28 06:32:49 UTC
From:
To:
Hi,

Thanks for your report!

This looks like the same problem as #643321.
Would you perform the following?
And what kind of result you brought, or do you let me know and get?
----- sudo mv /etc/dbus-1/system.d/bluetooth.conf.dpkg-remove /etc/dbus-1/system.d/bluetooth.conf sudo /etc/init.d/dbus restart # X server may be finished. sudo /etc/init.d/bluetooth restart restart bluedevil ----- Best regards, Nobuhiro 2011/9/19 scott leggett <sml@internode.on.net>:
#642104#15
Date:
2011-09-29 00:38:41 UTC
From:
To:
Thanks for looking into this issue.

This file does not exist on my system:
/etc/dbus-1/system.d/bluetooth.conf.dpkg-remove

and this file already exists:
$ cat /etc/dbus-1/system.d/bluetooth.conf

<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>

    <!-- allow root to send to agents -->
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <!-- allow users at the console, see consolekit or libpam-foreground -->
  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of bluetooth group to communicate with hcid -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to communicate with hcid
-->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>


  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>


Is there something I can edit manually in this conf file?

Regards,
Scott.

#642104#20
Date:
2011-09-29 01:03:32 UTC
From:
To:
Hi,

Additional information regarding #643321:

I do have the same message in /var/log/term.log:

$ grep -C 2 "Stopping bluetooth" /var/log/apt/term.log
Unpacking replacement python-dbus ...
Preparing to replace bluez 4.66-3 (using .../bluez_4.96-1_amd64.deb) ...
Stopping bluetooth: bluetoothd.
dpkg: error: version 'bluez' has bad syntax: version number does not start
with digit
Unpacking replacement bluez ...


And these lines appear in syslog when I restart bluetoothd:

29/09/11 08:54:04 AM	hpdeb	bluetoothd[3569]	Stopping hci0 event socket
29/09/11 08:54:04 AM	hpdeb	bluetoothd[3569]	Stopping SDP server
29/09/11 08:54:04 AM	hpdeb	bluetoothd[3569]	Exit
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	Bluetooth daemon 4.96
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	Starting SDP server
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	D-Bus failed to register
org.bluez.Proximity interface
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	Listening for HCI events on hci0
29/09/11 08:54:05 AM	hpdeb	NetworkManager[1999]	<warn> bluez error getting
default adapter: No such adapter
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	HCI dev 0 up
29/09/11 08:54:05 AM	hpdeb	bluetoothd[3664]	Adapter /org/bluez/3664/hci0 has
been enabled

Regards,
Scott.

#642104#25
Date:
2011-09-30 00:04:15 UTC
From:
To:
Hi,

I uploaded 4.96-2 to unstable.
Could you check by this version?

Best regards,
  Nobuhiro


2011/9/29 scott leggett <sml@internode.on.net>:

#642104#30
Date:
2011-09-30 01:43:40 UTC
From:
To:
Hi,

I have upgraded to 4.96-2. After installation triggers the bluetoothd restart
I get:

30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       Bluetooth daemon 4.96
30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       Starting SDP server
30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       D-Bus failed to
register
org.bluez.Proximity interface
30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       Listening for HCI
events on
hci0
30/09/11 08:53:33 AM    hpdeb   NetworkManager[1974]    <warn> bluez error
getting
default adapter: No such adapter
30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       HCI dev 0 up
30/09/11 08:53:33 AM    hpdeb   bluetoothd[15175]       Adapter
/org/bluez/15175/hci0
has been enabled

And then when I try to connect my mouse:

30/09/11 08:53:51 AM    hpdeb   udevd[15221]    failed to execute
'/lib/udev/bluez-
udev' '/lib/udev/bluez-udev --udev': No such file or directory
30/09/11 08:53:51 AM    hpdeb   bluetoothd[15175]       Refusing input device
connect:
No such file or directory (2)

Sorry for the double email - I hit reply rather than reply-all.

Regards,
Scott.

#642104#35
Date:
2011-09-30 07:23:24 UTC
From:
To:
Hi,

I have added your repository, and upgraded to 4.96-3. However bluetooth is
still not working for me. When bluetoothd restarts after installing the new
version I get:

30/09/11 03:11:46 PM	hpdeb	dbus[1817]	[system] Reloaded configuration
30/09/11 03:11:46 PM	hpdeb	dbus[1817]	[system] Reloaded configuration
30/09/11 03:11:46 PM	hpdeb	bluetoothd[15175]	Stopping hci0 event socket
30/09/11 03:11:46 PM	hpdeb	bluetoothd[15175]	Stopping SDP server
30/09/11 03:11:46 PM	hpdeb	bluetoothd[15175]	Exit
30/09/11 03:11:49 PM	hpdeb	dbus[1817]	[system] Reloaded configuration
30/09/11 03:11:49 PM	hpdeb	dbus[1817]	[system] Reloaded configuration
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	Bluetooth daemon 4.96
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	Starting SDP server
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	D-Bus failed to register
org.bluez.Proximity interface
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	Listening for HCI events on
hci0
30/09/11 03:11:49 PM	hpdeb	NetworkManager[1974]	<warn> bluez error getting
default adapter: No such adapter
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	HCI dev 0 up
30/09/11 03:11:49 PM	hpdeb	bluetoothd[21500]	Adapter /org/bluez/21500/hci0
has been enabled

And then when I try to connect my mouse I get:

30/09/11 03:12:28 PM	hpdeb	bluetoothd[21500]	Refusing input device connect:
No such file or directory (2)
30/09/11 03:12:32 PM	hpdeb	bluetoothd[21500]	Refusing input device connect:
No such file or directory (2)

Regards,
Scott.

#642104#40
Date:
2011-10-03 00:09:38 UTC
From:
To:
Hi,

2011/9/30 scott leggett <sml@internode.on.net>:
I confirm that BT mouse work by the following methods

$ bluez-test-device list
00:11:67:FF:11:C4 ELECOM Bluetooth Optical Mouse
$ bluez-test-device remove 00:11:67:FF:11:C4
bluez-test-device list

$ bluez-simple-agent hci0 00:11:67:ff:11:c4
$ bluez-test-device trusted 00:11:67:ff:11:c4 yes
$ bluez-test-input connect  00:11:67:ff:11:c4

and syslog of output:

Oct  3 01:02:26 chimagu kernel: [520505.923214] input: ELECOM
Bluetooth Optical Mouse as
/devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1.1/6-1.1:1.0/bluetooth/hci0/hci0:11/input27
Oct  3 01:02:26 chimagu kernel: [520505.923392] generic-bluetooth
0005:056E:005F.0011: input,hidraw4: BLUETOOTH HID v1.00 Mouse [ELECOM
Bluetooth Optical Mouse] on 00:1E:4C:E6:07:5D

my  /etc/dbus-1/system.d/bluetooth.conf:

$ cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>

    <!-- allow root to send to agents -->
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <!-- allow users at the console, see consolekit or libpam-foreground -->
  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of bluetooth group to communicate with hcid -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to communicate with hcid -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>


  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>

my user id and added gruop:

$ id
uid=1000(iwamatsu) gid=1000(iwamatsu)
groups=1000(iwamatsu),20(dialout),29(audio),46(plugdev),104(messagebus),111(bluetooth),118(netdev)

Best regards,
  Nobuhiro

#642104#45
Date:
2011-10-06 01:50:16 UTC
From:
To:
I'm running into an issue right at the start:

$ bluez-simple-agent hci0 00:02:76:28:93:EA
Creating device failed: org.bluez.Error.AuthenticationFailed: Authentication
Failed

Note that I got the address of my bluetooth mouse when it appears briefly in
the KDE bluetooth manager.

I tried googling that error message, but couldn't find any useful information.

My system configuration looks very similar to yours. This is a weird issue.

$ cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>

    <!-- allow root to send to agents -->
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <!-- allow users at the console, see consolekit or libpam-foreground -->
  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of bluetooth group to communicate with hcid -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to communicate with hcid
-->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>


  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>

$ id
uid=1000(scott) gid=1000(scott)
groups=1000(scott),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),110(netdev),111(bluetooth),114(fuse),116(powerdev),117(scanner)

Regards,
Scott.

#642104#50
Date:
2011-10-13 02:15:39 UTC
From:
To:
Hi,

I did a little digging into the bluez code..

The error message appears to be caused by the call to input_device_set_channel() on line 89 of input/server.c:

	ret = input_device_set_channel(&src, &dst, psm, chan);
	if (ret == 0)
		return;

	error("Refusing input device connect: %s (%d)", strerror(-ret), -ret);

The ENOENT is returned when either the device, or the connection isn't able to be found (line 1209 of input/device.c):

int input_device_set_channel(const bdaddr_t *src, const bdaddr_t *dst, int psm,
								GIOChannel *io)
{
	struct input_device *idev = find_device(src, dst);
	struct input_conn *iconn;

	if (!idev)
		return -ENOENT;

	iconn = find_connection(idev->connections, "hid");
	if (!iconn)
		return -ENOENT;
...


Not being familiar with the code I can't really say how find_device() or find_connection() is failing. My device does appear under /sys/:

$ find / -iname "*hci0*" 2> /dev/null
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/bluetooth/hci0
/sys/class/bluetooth/hci0

I hope this information gives some more ideas about what might be going wrong here.

Regards,
Scott.

#642104#55
Date:
2011-12-01 18:03:48 UTC
From:
To:
I was getting the exact same error messages (Refusing input device
connect:No such file or directory (2)) using a Logitech bluetooth
adapter.

I found this link: http://www.spinics.net/lists/linux-bluetooth/msg17162.html

It may not be specifically relevant to the situation you are
encountering but I thought it might still be helpful.

It solved the problem for me.

#642104#60
Date:
2011-12-18 15:48:58 UTC
From:
To:
Hi,

I have discovered the cause of my issue: user stupidity.

I was using the incorrect pairing procedure for the mouse. After using the
correct pairing procedure, it works fine.

At most, I could say that the error messages generated by bluetoothd could be
a little more suggestive as to the possible cause of the error.

Sorry about wasting time here.

Scott.

#642104#65
Date:
2023-04-20 13:41:23 UTC
From:
To:
Greetings, am Dorica Lawson. Please I sent you an email last time I have
something important to discuss with you, please reply.