Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#642104: bluez: bluetoothd refusing input device connection

78 views
Skip to first unread message

scott leggett

unread,
Sep 19, 2011, 10:00:01 AM9/19/11
to
Package: bluez
Version: 4.96-1
Severity: normal
Tags: upstream

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.



-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bluez depends on:
ii dbus 1.4.14-1
ii libbluetooth3 4.96-1
ii libc6 2.13-21
ii libcap-ng0 0.6.6-1
ii libdbus-1-3 1.4.14-1
ii libglib2.0-0 2.28.6-1
ii libreadline6 6.2-4
ii libudev0 172-1
ii libusb-0.1-4 2:0.1.12-19
ii lsb-base 3.2-28
ii module-init-tools 3.16-1
ii python-dbus 0.84.0-2
ii python-gobject 2.28.6-5
ii udev 172-1

bluez recommends no packages.

bluez suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Nobuhiro Iwamatsu

unread,
Sep 28, 2011, 2:40:02 AM9/28/11
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 <s...@internode.on.net>:

> _______________________________________________
> Pkg-bluetooth-maintainers mailing list
> Pkg-bluetoot...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-bluetooth-maintainers
>

--
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6

scott leggett

unread,
Sep 28, 2011, 8:40:01 PM9/28/11
to
On Wed, 28 Sep 2011 14:32:49 you wrote:
> 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
>

Hi,

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.

scott leggett

unread,
Sep 28, 2011, 9:10:01 PM9/28/11
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.

Nobuhiro Iwamatsu

unread,
Sep 29, 2011, 8:10:01 PM9/29/11
to
Hi,

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

Best regards,
Nobuhiro


2011/9/29 scott leggett <s...@internode.on.net>:
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



scott leggett

unread,
Sep 29, 2011, 9:50:01 PM9/29/11
to
On Fri, 30 Sep 2011 08:04:15 Nobuhiro Iwamatsu wrote:
> Hi,
>
> I uploaded 4.96-2 to unstable.
> Could you check by this version?
>
> Best regards,
> Nobuhiro
>

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.

scott leggett

unread,
Sep 30, 2011, 3:30:02 AM9/30/11
to
On Fri, 30 Sep 2011 12:43:15 Nobuhiro Iwamatsu wrote:
> Hi!
>
> 2011/9/30 scott leggett <s...@internode.on.net>:
> > 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)
>
> Oh, this is mistake of pakcaging .
> I fixed this.
> I checked my environment with BT mouse, work fine.
>
> I uploaded to
> http://people.debian.org/~iwamatsu/bluez
>
> you can use by apt-line.
> deb http://people.debian.org/~iwamatsu/bluez ./
>
> Could you check with new package?
>
> > Sorry for the double email - I hit reply rather than reply-all.
>
> No problem. I am glad for you to test.
>
> Best regards,
> Nobuhiro

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)

Nobuhiro Iwamatsu

unread,
Oct 2, 2011, 8:20:01 PM10/2/11
to
Hi,

2011/9/30 scott leggett <s...@internode.on.net>:
>
Hmm, This seems to be another problem.
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:
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

--
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



scott leggett

unread,
Oct 5, 2011, 10:00:02 PM10/5/11
to
> Best regards,
> Nobuhiro

Hi,

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.

</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.

scott leggett

unread,
Oct 12, 2011, 10:20:01 PM10/12/11
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.

s...@internode.on.net

unread,
Dec 18, 2011, 11:00:02 AM12/18/11
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.

doricalawson

unread,
Apr 20, 2023, 9:50:04 AM4/20/23
to
Greetings, am Dorica Lawson. Please I sent you an email last time I have something important to discuss with you, please reply.
0 new messages