Debian Bug report logs - #384379
bluez-utils: The inquiry scan (ISCAN) gets turned off

version graph

Package: bluez-utils; Maintainer for bluez-utils is Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>; Source for bluez-utils is src:bluez.

Reported by: "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>

Date: Wed, 23 Aug 2006 21:18:02 UTC

Severity: important

Tags: moreinfo

Found in versions bluez-utils/3.1-3.1, bluez/4.42-2, bluez-utils/3.7-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: bluez-utils: The inquiry scan (ISCAN) gets turned off
Date: Wed, 23 Aug 2006 15:53:19 -0500
Package: bluez-utils
Version: 3.1-3.1
Severity: important

Whenever I try to discover the local system (Debian computer) from a remote
system (mobile device, or other computer) it can't be found. After
some research I found out that the ISCAN mode is disabled:

--------------------------------------------------------------------
# hciconfig hci0
hci0:   Type: USB
       BD Address: 00:0E:6D:3B:31:AE ACL MTU: 192:8 SCO MTU: 64:8
       UP RUNNING PSCAN
       RX bytes:3190 acl:16 sco:0 events:208 errors:0
       TX bytes:1840 acl:17 sco:0 commands:105 errors:0
--------------------------------------------------------------------

But according to my hcid.conf file it should be enabled by default for
all devices, I'm using the prepackaged hcid.conf :

--------------------------------------------------------------------
# cat /etc/bluetooth/hcid.conf
#
# 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 auto;

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

       # Default PIN code for incoming connections
       passkey "1234";
}

# 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
       pscan enable; iscan 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;
}
--------------------------------------------------------------------

In an effort to make the Debian computer visible to other devices
I'm running the following command:

--------------------------------------------------------------------
# hciconfig hci0 piscan
# hciconfig hci0
hci0:   Type: USB
       BD Address: 00:0E:6D:3B:31:AE ACL MTU: 192:8 SCO MTU: 64:8
       UP RUNNING PSCAN ISCAN
       RX bytes:3294 acl:16 sco:0 events:221 errors:0
       TX bytes:1878 acl:17 sco:0 commands:112 errors:0
--------------------------------------------------------------------

But after a while the ISCAN mode gets disabled and I must keep running
hciconfig to make the computer visible again.

I have tried with two USB-BLUETOOTH dongles of different brands
and the problem persists.

I have also tried it in sid and etch with the same results.

-- System Information:
Debian Release: testing/unstable
 APT prefers unstable
 APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-k7
Locale: LANG=es_CO, LC_CTYPE=es_CO (charmap=ISO-8859-1)

Versions of packages bluez-utils depends on:
ii  libbluetooth2                3.1-1       Library to use the BlueZ Linux Blu
ii  libc6                        2.3.6-18    GNU C Library: Shared libraries
ii  libdbus-1-2                  0.62-4      simple interprocess messaging syst
ii  libdbus-glib-1-2             0.62-4      simple interprocess messaging syst
ii  libglib2.0-0                 2.10.3-3    The GLib library of C routines
ii  libusb-0.1-4                 2:0.1.12-2  userspace USB programming library
ii  lsb-base                     3.1-12      Linux Standard Base 3.1 init scrip
ii  makedev                      2.3.1-82    creates device files in /dev
ii  module-init-tools            3.2.2-3     tools for managing Linux kernel mo
ii  modutils                     2.4.27.0-6  Linux module utilities
ii  sysvinit                     2.86.ds1-15 System-V-like init utilities
ii  udev                         0.093-1     /dev/ and hotplug management daemo

bluez-utils recommends no packages.

-- no debconf information


-- 
Jaime Alberto Silva       L I N U X       .~.
                                  The Choice     /V\
                                   of a GNU      / ( ) \
                                  Generation    ^^-^^



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 384379@bugs.debian.org (full text, mbox):

From: "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>
To: 384379@bugs.debian.org
Subject: Fwd: [Bluez-users] Fwd: bluez-utils: The inquiry scan (ISCAN) gets turned off
Date: Thu, 24 Aug 2006 08:39:20 -0500
Here is the answer I got to this problem from
bluez-users@lists.sourceforge.net :

---------- Forwarded message ----------
From: Marcel Holtmann <marcel@holtmann.org>
Date: Aug 24, 2006 4:01 AM
Subject: Re: [Bluez-users] Fwd: bluez-utils: The inquiry scan (ISCAN)
gets	turned off
To: BlueZ users <bluez-users@lists.sourceforge.net>


Hi Jaime,

> Whenever I try to discover the local system (Debian computer) from a remote
> system (mobile device, or other computer) it can't be found. After
> some research I found out that the ISCAN mode is disabled:

this should have been fixed in bluez-utils-3.3. You have to set the
discoverable timeout to 0 and the mode to "discoverable" over the new
D-Bus API and then it will stay visible forever. Otherwise it goes back
to being non-discoverable after the discoverable timeout.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


-- 
Jaime Alberto Silva       L I N U X       .~.
                                  The Choice     /V\
                                   of a GNU      / ( ) \
                                  Generation    ^^-^^



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #15 received at 384379@bugs.debian.org (full text, mbox):

From: "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>
To: 384379@bugs.debian.org
Subject: Fwd: [Bluez-users] Fwd: bluez-utils: The inquiry scan (ISCAN) gets turned off
Date: Thu, 24 Aug 2006 09:53:53 -0500
---------- Forwarded message ----------
From: Johan Hedberg <johan.hedberg@nokia.com>
Date: Aug 24, 2006 9:11 AM
Subject: Re: [Bluez-users] Fwd: bluez-utils: The inquiry scan (ISCAN)
gets turned off
To: BlueZ users <bluez-users@lists.sourceforge.net>


On Thu, Aug 24, 2006, Jaime Alberto Silva wrote:
> Is there any tool in bluez-utils to achieve that? or some new entries
> in the hcid.conf? so it can be done in an init script.

Adding "discovto 0;" to hcid.conf should do the trick.

You can change the settings from the command line using dbus-send, but I
don't think it's a good idea to put it into a init script. E.g. the
following would put the device in discoverable mode:
dbus-send --system --dest=org.bluez /org/bluez/hci0 \
       org.bluez.Adapter.SetMode string:discoverable

Johan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


-- 
Jaime Alberto Silva       L I N U X       .~.
                                  The Choice     /V\
                                   of a GNU      / ( ) \
                                  Generation    ^^-^^



Tags added: pending Request was from Filippo Giunchedi <filippo@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: pending Request was from Filippo Giunchedi <filippo@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Filippo Giunchedi <filippo@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #24 received at 384379-close@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: 384379-close@bugs.debian.org
Subject: Bug#384379: fixed in bluez-utils 3.5-1
Date: Thu, 21 Sep 2006 00:32:07 -0700
Source: bluez-utils
Source-Version: 3.5-1

We believe that the bug you reported is fixed in the latest version of
bluez-utils, which is due to be installed in the Debian FTP archive:

bluetooth_3.5-1_all.deb
  to pool/main/b/bluez-utils/bluetooth_3.5-1_all.deb
bluez-cups_3.5-1_powerpc.deb
  to pool/main/b/bluez-utils/bluez-cups_3.5-1_powerpc.deb
bluez-pcmcia-support_3.5-1_powerpc.deb
  to pool/main/b/bluez-utils/bluez-pcmcia-support_3.5-1_powerpc.deb
bluez-utils_3.5-1.diff.gz
  to pool/main/b/bluez-utils/bluez-utils_3.5-1.diff.gz
bluez-utils_3.5-1.dsc
  to pool/main/b/bluez-utils/bluez-utils_3.5-1.dsc
bluez-utils_3.5-1_powerpc.deb
  to pool/main/b/bluez-utils/bluez-utils_3.5-1_powerpc.deb
bluez-utils_3.5.orig.tar.gz
  to pool/main/b/bluez-utils/bluez-utils_3.5.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 384379@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Filippo Giunchedi <filippo@debian.org> (supplier of updated bluez-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 17 Sep 2006 13:35:40 +0200
Source: bluez-utils
Binary: bluez-pcmcia-support bluetooth bluez-cups bluez-utils
Architecture: source all powerpc
Version: 3.5-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>
Changed-By: Filippo Giunchedi <filippo@debian.org>
Description: 
 bluetooth  - Bluetooth stack utilities
 bluez-cups - Bluetooth printer driver for CUPS
 bluez-pcmcia-support - PCMCIA support files for BlueZ 2.0 Bluetooth tools
 bluez-utils - Bluetooth tools and daemons
Closes: 384379 387182 387193 387197 387410 388514
Changes: 
 bluez-utils (3.5-1) unstable; urgency=medium
 .
   * New upstream release (closes: #384379)
   * urgency medium since we are closing RC bugs
   * removed bluez-bcm203x, obsoleted by upstream
   * fix MAKEDEV usage (Closes: #387182, #387193, #387197, #387410)
   * removed merged/obsolete patches:
     - debian/patches/000_rfcomm_conf_example.patch
     - debian/patches/006_xsims.patch
     - debian/patches/007_hcid_typo.patch
     - debian/patches/004_rfcomm_usage.patch
   * correctly set and restore IFS in /etc/init.d/bluetooth while parsing
     SDPTOOL_OPTIONS (Closes: #388514)
Files: 
 29b9196075f0e148e4fac374b88e25e0 863 admin optional bluez-utils_3.5-1.dsc
 1816753771a9949e0589a3e8631d46b5 622427 admin optional bluez-utils_3.5.orig.tar.gz
 9f508dd21f4651e40be39a857b1ea040 26540 admin optional bluez-utils_3.5-1.diff.gz
 b2cd0187b15a695bc2f8c6631f65a2cb 16604 admin optional bluetooth_3.5-1_all.deb
 846b780aca7a31418f751dd12cb276a1 269784 admin optional bluez-utils_3.5-1_powerpc.deb
 fce006be6a071b55ffff2f784e52157c 18412 admin extra bluez-pcmcia-support_3.5-1_powerpc.deb
 ffe7afd6e488e4e242135783df196f59 23802 admin optional bluez-cups_3.5-1_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFEjuwABzeamt51AERApYcAKCOu76EPKdzrQHVvrmShToUf3p2ewCfSK4o
GFL9K89f6HGMY2cLZ87fsJc=
=y3Gz
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Kenneth Johansson <ken@kenjo.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #29 received at 384379@bugs.debian.org (full text, mbox):

From: Kenneth Johansson <ken@kenjo.org>
To: 384379@bugs.debian.org
Subject: Why is this closed ???
Date: Sat, 23 Sep 2006 01:17:09 +0200
I still have the iscan disappear problem  and I have added "discovto 0;"
to my hcid.conf

but as soon as I start the hcid iscan gets turned off. 






Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Andreas Gohr <andi@splitbrain.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #34 received at 384379@bugs.debian.org (full text, mbox):

From: Andreas Gohr <andi@splitbrain.org>
To: 384379@bugs.debian.org
Subject: This bug seems not to be fixed.
Date: Tue, 10 Oct 2006 01:19:26 +0200
[Message part 1 (text/plain, inline)]
I still seem to get bug 384379 with bluez-utils 3.5-1

My hcid.conf looks like this:

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

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

        # Default PIN code for incoming connections
        passkey "1234";
}

# 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,master; #master added

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

}

But after starting /etc/init.d/bluetooth hciconfig -a shows the
following output:

hci0:   Type: USB
        BD Address: 00:0A:3A:65:A4:2E ACL MTU: 1017:8 SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:12481 acl:0 sco:0 events:286 errors:0
        TX bytes:4487 acl:0 sco:0 commands:256 errors:0
        Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: ACCEPT MASTER
        Name: 'xerxes-0'
        Class: 0x3e0100
        Service Classes: Networking, Rendering, Capturing, Object
Transfer, Audio Device Class: Computer, Uncategorized
        HCI Ver: 2.0 (0x3) HCI Rev: 0x2000 LMP Ver: 2.0 (0x3) LMP
Subver: 0x4127 Manufacturer: Broadcom Corporation (15)


Regards,
Andreas Gohr

-- 
http://www.splitbrain.org
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Vincent Lönngren <bice77@malmo2.net>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #39 received at 384379@bugs.debian.org (full text, mbox):

From: Vincent Lönngren <bice77@malmo2.net>
To: Debian Bug Tracking System <384379@bugs.debian.org>
Subject: bluez-utils: discovto 0; doesn't do it
Date: Tue, 24 Oct 2006 07:03:17 +0200
Package: bluez-utils
Version: 3.7-1
Followup-For: Bug #384379

Like Kenneth, I have added discovto 0; to /etc/bluetooth/hcid.conf, and as in his case ISCAN still gets switched off.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)

Versions of packages bluez-utils depends on:
ii  dbus                         0.93-1      simple interprocess messaging syst
ii  libbluetooth2                3.7-1       Library to use the BlueZ Linux Blu
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libdbus-1-3                  0.93-1      simple interprocess messaging syst
ii  libusb-0.1-4                 2:0.1.12-2  userspace USB programming library
ii  lsb-base                     3.1-15      Linux Standard Base 3.1 init scrip
ii  makedev                      2.3.1-83    creates device files in /dev
ii  module-init-tools            3.2.2-3     tools for managing Linux kernel mo
ii  udev                         0.100-2     /dev/ and hotplug management daemo

Versions of packages bluez-utils recommends:
ii  bluez-passkey-gnome           0.5-2      Bluetooth passkey (PIN) agent for 

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, dimitris@gmail.com, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Dimitris Kogias <dimitris@gmail.com>:
Extra info received and forwarded to list. Copy sent to dimitris@gmail.com, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #44 received at 384379@bugs.debian.org (full text, mbox):

From: Dimitris Kogias <dimitris@gmail.com>
To: Debian Bug Tracking System <384379@bugs.debian.org>
Subject: bluez-utils: Almost fixed
Date: Tue, 05 Dec 2006 21:52:41 -0800
Package: bluez-utils
Version: 3.7-1
Followup-For: Bug #384379


In order to get ISCAN to stick, in addition to the hcid.conf change (discovto 0)
I have to:

- unplug the USB dongle
- /etc/init.d/bluetooth stop
- unload all bluetooth modules
- /etc/init.d/bluetooth start
- plug in the dongle

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19-greebo
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages bluez-utils depends on:
ii  dbus                         1.0.1-2     simple interprocess messaging syst
ii  libbluetooth2                3.7-1       Library to use the BlueZ Linux Blu
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libdbus-1-3                  1.0.1-2     simple interprocess messaging syst
ii  libusb-0.1-4                 2:0.1.12-2  userspace USB programming library
ii  lsb-base                     3.1-22      Linux Standard Base 3.1 init scrip
ii  makedev                      2.3.1-83    creates device files in /dev
ii  module-init-tools            3.3-pre3-1  tools for managing Linux kernel mo
ii  modutils                     2.4.27.0-6  Linux module utilities
ii  udev                         0.103-1     /dev/ and hotplug management daemo

Versions of packages bluez-utils recommends:
ii  bluez-gnome [bluez-passkey-gn 0.6-1      Bluetooth utilities for GNOME

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, trigger+debian@space-based.de, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Armin Berres <trigger+debian@space-based.de>:
Extra info received and forwarded to list. Copy sent to trigger+debian@space-based.de, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #49 received at 384379@bugs.debian.org (full text, mbox):

From: Armin Berres <trigger+debian@space-based.de>
To: Debian Bug Tracking System <384379@bugs.debian.org>
Subject: bluez-utils: problem still not fixed
Date: Wed, 06 Dec 2006 14:54:39 +0100
Package: bluez-utils
Version: 3.7-1
Followup-For: Bug #384379

This bug is still not fixed in 3.7-1.
I tried adding "discovto 0;" to hcid.conf, sending a message with dbus, module
unloading/loading, but nothing changed the situation.
I still get something like this:
---------------------------------------
# hciconfig -a
hci0:   Type: USB
        BD Address: 00:00:3A:69:0E:9C ACL MTU: 1017:8 SCO MTU: 64:8
        UP RUNNING PSCAN
---------------------------------------
IMO this bug should really be fixed in time for Etch if possible.

/Armin

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages bluez-utils depends on:
ii  dbus                         1.0.1-2     simple interprocess messaging syst
ii  libbluetooth2                3.7-1       Library to use the BlueZ Linux Blu
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libdbus-1-3                  1.0.1-2     simple interprocess messaging syst
ii  libusb-0.1-4                 2:0.1.12-2  userspace USB programming library
ii  lsb-base                     3.1-22      Linux Standard Base 3.1 init scrip
ii  makedev                      2.3.1-83    creates device files in /dev
ii  module-init-tools            3.3-pre3-1  tools for managing Linux kernel mo
ii  modutils                     2.4.27.0-6  Linux module utilities
ii  udev                         0.103-1     /dev/ and hotplug management daemo

Versions of packages bluez-utils recommends:
ii  bluez-gnome [bluez-passkey-gn 0.6-1      Bluetooth utilities for GNOME
ii  bluez-passkey-gnome           0.5-2      Bluetooth passkey (PIN) agent for 

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Armin Berres <trigger@space-based.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #54 received at 384379@bugs.debian.org (full text, mbox):

From: Armin Berres <trigger@space-based.de>
To: 384379@bugs.debian.org
Subject: Appendix
Date: Wed, 06 Dec 2006 15:27:51 +0100
Just noticed: Running "hciconfig hci0 piscan up" solves the problem for
about two minutes.

/Armin



Bug reopened, originator not changed. Request was from Armin Berres <trigger+debian@space-based.de> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #61 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: 384379@bugs.debian.org
Subject: WORK-AROUND for "iscan not set"
Date: Wed, 27 Dec 2006 12:27:22 +0100
Hi,

there is a solution to this. After thoroughly stuying the bluez-utils code, I 
saw the reference to a config file, namely <dir>/<bdaddr>/config.
This file needs an entry
mode discoverable
However, if the file is present in /var/lib/blueooth, that one is used.
So you must delete the latter <bdaddr> dir or simply edit the config file 
there:
# rm /var/lib/bluetooth/*/config

After that, just plug the usb-dongle out and back in and there you go :)

You still need the following settings in /etc/bluetooth/hcid.conf:
mode off:
  iscan disable;
  pscan disable;
mode connectable:
  iscan disable;
  pscan enable;
mode discoverable:
  iscan enable;
  pscan enable;

The last one also needs
  discovto 0;
to actually enable ISCAN on plug-in (doesn't affect mode setting).

So cleaning up /var/lib/bluetooth should make those happy that used their bt 
dongles with earlier versions or change their setting in hcid.conf.

REAL SOLUTION:
/var/lib/bluetooth should be partly cleaned up if the dongle disappears to 
make it possible to follow configuration changes (currently NOT done). Care 
must be taken to only delete the "config" file, not pairing information.
The configuration for the mode (off, connectable or discoverable) is already
derived from the pscan and iscan settings in hcid.conf (see hcid/dbus.c:2166)
BUT ONLY if the "config" file in /var/lib/bluetooth does not exist.
This does not mean that the "config" file in it's current use is absolute 
non-sense as it preserves setting across hcid restarts.
Thus, on bt dongle _removal_, the "config" file in /var/lib/bluetooth should 
be deleted. As this can happen during hcid down time, a udev rule may be a 
solution.
I am not sure why SCAN_INQUIRY is not set in discovto is not 0 (see 
hcid/main.c:295). This is probably to not make it discoverable after plugging 
the bt dongle in and thus correct behaviour. However, I do not know of any 
user program that can actually handle that (kdebluetooth cannot).
Thus, in Etch, "discovto 0" should be the default setting!

A specific configuration for each dongle is already possible in hcid.conf, so 
there is no problem to do configuration for specific devices.

It actually IS possible to correctly fix this before Etch!

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Filippo Giunchedi <filippo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #66 received at 384379@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>, 384379@bugs.debian.org
Subject: Re: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sat, 30 Dec 2006 14:58:37 +0100
[Message part 1 (text/plain, inline)]
Hello Hendrik,

On Wed, Dec 27, 2006 at 12:27:22PM +0100, Hendrik Sattler wrote:
> I am not sure why SCAN_INQUIRY is not set in discovto is not 0 (see 
> hcid/main.c:295). This is probably to not make it discoverable after plugging 
> the bt dongle in and thus correct behaviour. However, I do not know of any 
> user program that can actually handle that (kdebluetooth cannot).
> Thus, in Etch, "discovto 0" should be the default setting!
> 
> A specific configuration for each dongle is already possible in hcid.conf, so 
> there is no problem to do configuration for specific devices.
> 
> It actually IS possible to correctly fix this before Etch!

great, thanks for investigating this. I'm going to add discovto 0; as default
plus adding some documentation about the [IP]SCAN problem. Can I quote this
mail?


thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

Beauty isn't worth thinking about; what's important is your mind.
You don't want a fifty-dollar haircut on a fifty-cent head.
-- Garrison Keillor
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #71 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Filippo Giunchedi <filippo@debian.org>
Cc: 384379@bugs.debian.org
Subject: Re: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sat, 30 Dec 2006 15:56:33 +0100
Am Samstag 30 Dezember 2006 14:58 schrieb Filippo Giunchedi:
> On Wed, Dec 27, 2006 at 12:27:22PM +0100, Hendrik Sattler wrote:
> > I am not sure why SCAN_INQUIRY is not set in discovto is not 0 (see
> > hcid/main.c:295). This is probably to not make it discoverable after
> > plugging the bt dongle in and thus correct behaviour. However, I do not
> > know of any user program that can actually handle that (kdebluetooth
> > cannot). Thus, in Etch, "discovto 0" should be the default setting!
> >
> > A specific configuration for each dongle is already possible in
> > hcid.conf, so there is no problem to do configuration for specific
> > devices.
> >
> > It actually IS possible to correctly fix this before Etch!
>
> great, thanks for investigating this. I'm going to add discovto 0; as
> default plus adding some documentation about the [IP]SCAN problem. Can I
> quote this mail?

Yes, maybe correct grammatical mistakes if present.
Note that deleting the "config" file in /var/lib/bluetooth is an essential 
part of the solution.

I did some testing with udev and the problem actually also is a kernel 
problem. There is some strange dependency between the uevent call to udev and 
hcid detecting the device:
A udev script can only act when the bt dongle is plugged _in_ (ACTION=="add") 
because on removal, the address sysfs attribute is not available anymore 
(removed too early).
The rule to call a script for removal can thus look like:
SUBSYSTEM=="bluetooth", ACTION=="add", "RUN+=some/script"

The actual script may look like:
-----------------some/script------------------
#!/bin/sh
BLUEZ_CONF_DIR=/var/lib/bluetooth

sleep 5

BDADDR=$(cat "/sys${DEVPATH}/address")
CONF_FILE=${BLUEZ_CONF_DIR}/${BDADDR}/config

rm -f ${CONF_FILE}
----------------------------------------------
The sleep is a hack (else the BDADDR is 00:00:00:00:00:00) and I did not test 
how bad this interacts with what hcid does.
You cannot do this with hcid itself because it cannot differ between "already 
present when starting" (coldplug) and hotplug.
Solution can be the above script with added dbus init call (hcid and dbus must 
be started before udev, then) and disabled autoinit in hcid.

HS




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #76 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>, 384379@bugs.debian.org
Cc: Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 13:36:21 +0100
Hi Hendrik,

> > > I am not sure why SCAN_INQUIRY is not set in discovto is not 0 (see
> > > hcid/main.c:295). This is probably to not make it discoverable after
> > > plugging the bt dongle in and thus correct behaviour. However, I do not
> > > know of any user program that can actually handle that (kdebluetooth
> > > cannot). Thus, in Etch, "discovto 0" should be the default setting!
> > >
> > > A specific configuration for each dongle is already possible in
> > > hcid.conf, so there is no problem to do configuration for specific
> > > devices.
> > >
> > > It actually IS possible to correctly fix this before Etch!
> >
> > great, thanks for investigating this. I'm going to add discovto 0; as
> > default plus adding some documentation about the [IP]SCAN problem. Can I
> > quote this mail?
> 
> Yes, maybe correct grammatical mistakes if present.
> Note that deleting the "config" file in /var/lib/bluetooth is an essential 
> part of the solution.

this is a big _NO_. Don't mess with the configuration storage directly.
The configuration storage has priority over the hcid.conf file and this
is meant to be this way.

The "iscan" and "pscan" config option are some legacy option that are
still available for some strange corner cases for some embedded distros
and they are not meant for general and permanent configuration.

If people don't learn that hcid.conf are proposed default values for the
cold run only, then I might simply remove the whole file in the next
upstream release. So stop writing ugly distribution specific hacks and
better ask upstream for it. There might might a real bug hiding
somewhere.

> I did some testing with udev and the problem actually also is a kernel 
> problem. There is some strange dependency between the uevent call to udev and 
> hcid detecting the device:
> A udev script can only act when the bt dongle is plugged _in_ (ACTION=="add") 
> because on removal, the address sysfs attribute is not available anymore 
> (removed too early).
> The rule to call a script for removal can thus look like:
> SUBSYSTEM=="bluetooth", ACTION=="add", "RUN+=some/script"
> 
> The actual script may look like:
> -----------------some/script------------------
> #!/bin/sh
> BLUEZ_CONF_DIR=/var/lib/bluetooth
> 
> sleep 5
> 
> BDADDR=$(cat "/sys${DEVPATH}/address")
> CONF_FILE=${BLUEZ_CONF_DIR}/${BDADDR}/config
> 
> rm -f ${CONF_FILE}
> ----------------------------------------------
> The sleep is a hack (else the BDADDR is 00:00:00:00:00:00) and I did not test 
> how bad this interacts with what hcid does.
> You cannot do this with hcid itself because it cannot differ between "already 
> present when starting" (coldplug) and hotplug.
> Solution can be the above script with added dbus init call (hcid and dbus must 
> be started before udev, then) and disabled autoinit in hcid.

First of all this is an ugly hack and has no right to exist. Second the
configuration storage is meant to be permanent.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Filippo Giunchedi <filippo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #81 received at 384379@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Hendrik Sattler <debian@hendrik-sattler.de>, 384379@bugs.debian.org, jaimealbertosilva@gmail.com
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 14:21:33 +0100
[Message part 1 (text/plain, inline)]
Hello,

On Sun, Dec 31, 2006 at 01:36:21PM +0100, Marcel Holtmann wrote:
> > Yes, maybe correct grammatical mistakes if present.
> > Note that deleting the "config" file in /var/lib/bluetooth is an essential 
> > part of the solution.
> 
> this is a big _NO_. Don't mess with the configuration storage directly.
> The configuration storage has priority over the hcid.conf file and this
> is meant to be this way.
> 
> The "iscan" and "pscan" config option are some legacy option that are
> still available for some strange corner cases for some embedded distros
> and they are not meant for general and permanent configuration.

Marcel, can you confirm the actual solution is the one you indicated in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=384379#msg10 ?

Jaime, could you please retry as well? bluez 3.7 is both in testing and
unstable.

> 
> If people don't learn that hcid.conf are proposed default values for the
> cold run only, then I might simply remove the whole file in the next
> upstream release. So stop writing ugly distribution specific hacks and
> better ask upstream for it. There might might a real bug hiding
> somewhere.

If hcid.conf values are there only for a cold run I think it needs to be
documented, I didn't found anything in hcid.conf(5) though, is it documented
somewhere?

thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

The only way to get rid of a temptation is to yield to it.
-- Oscar Wilde
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #86 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 15:06:38 +0100
Am Sonntag 31 Dezember 2006 13:36 schrieb Marcel Holtmann:
> > Note that deleting the "config" file in /var/lib/bluetooth is an
> > essential part of the solution.
>
> this is a big _NO_. Don't mess with the configuration storage directly.
> The configuration storage has priority over the hcid.conf file and this
> is meant to be this way.

And that's not written down anywhere in the user documentation.

> The "iscan" and "pscan" config option are some legacy option that are
> still available for some strange corner cases for some embedded distros
> and they are not meant for general and permanent configuration.

So what's the proposal? Configuration files have to be in /etc and not 
in /var/lib!
The administrator should be able to change the default (visibility or not) or 
there should be an always working default.
That is currently not the case because the bluetooth guys change stuff but the 
user frontends do catch up a bit late. Just remember the passkey situation 
and this is pretty much the same. It probably gets solved in the long run but 
that's a strange idea of development :-/

> If people don't learn that hcid.conf are proposed default values for the
> cold run only, then I might simply remove the whole file in the next
> upstream release. So stop writing ugly distribution specific hacks and
> better ask upstream for it. There might might a real bug hiding
> somewhere.

If package maintainers and upstream authors don't learn to document such 
thing, the user will not learn. /etc/bluetooth/hcid.conf is a configuration 
file and I expect that changes are respected. It is written _NOWHERE_ that 
this only defines an initial state.
Reading hcid.conf manpage tells me nothing about that.

> First of all this is an ugly hack and has no right to exist. Second the
> configuration storage is meant to be permanent.

An ugly hack for an ugly situation.

I give you my point of view:
_I_ wanted to fix discoverability of my system without some strange DBUS 
commands that are documented nowhere but in the code.
Yes, by now I know that hcid/dbus-api.txt exists but only in the source 
package because it is not in the binary package.
Beside that, running the dbus command suggested in this bug report works, too.
It should be noted, though, that you have to be root.
It probably is the better alternative with exceptions:
* you cannot change the mode of devices that are currently not plugged in
* you can only refer to devices by using the device name, not the address

So is there an easy command line tool for all those dbus options (except using 
raw dbus command)?: no == very bad usibility (and an awful lot to type for 
one option)

So how can you solve this problem with your input:
* ship the dbus API documenation in the binary packages
* give the user and root a shell tool to make use of the things in the bluez 
dbus API without getting bloody hands by using dbus-send
* document in the manpages what you wrote here

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #91 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Filippo Giunchedi <filippo@debian.org>
Cc: Hendrik Sattler <debian@hendrik-sattler.de>, 384379@bugs.debian.org, jaimealbertosilva@gmail.com
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 15:27:21 +0100
Hi Filippo,

> > > Yes, maybe correct grammatical mistakes if present.
> > > Note that deleting the "config" file in /var/lib/bluetooth is an essential 
> > > part of the solution.
> > 
> > this is a big _NO_. Don't mess with the configuration storage directly.
> > The configuration storage has priority over the hcid.conf file and this
> > is meant to be this way.
> > 
> > The "iscan" and "pscan" config option are some legacy option that are
> > still available for some strange corner cases for some embedded distros
> > and they are not meant for general and permanent configuration.
> 
> Marcel, can you confirm the actual solution is the one you indicated in
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=384379#msg10 ?
> 
> Jaime, could you please retry as well? bluez 3.7 is both in testing and
> unstable.

actually adding "discovto 0" as default in hcid.conf is fine. That is a
decision the distros can make. And it seems that most of them are doing
this at the moment.

> > If people don't learn that hcid.conf are proposed default values for the
> > cold run only, then I might simply remove the whole file in the next
> > upstream release. So stop writing ugly distribution specific hacks and
> > better ask upstream for it. There might might a real bug hiding
> > somewhere.
> 
> If hcid.conf values are there only for a cold run I think it needs to be
> documented, I didn't found anything in hcid.conf(5) though, is it documented
> somewhere?

It should be documented. If not, then that is the real bug here. Feel
free to send in patches for the manual pages.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #96 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 15:40:19 +0100
Hi Hendrik,

> > > Note that deleting the "config" file in /var/lib/bluetooth is an
> > > essential part of the solution.
> >
> > this is a big _NO_. Don't mess with the configuration storage directly.
> > The configuration storage has priority over the hcid.conf file and this
> > is meant to be this way.
> 
> And that's not written down anywhere in the user documentation.

that is the real bug here. Patches for documentation updates are always
welcome.

> > The "iscan" and "pscan" config option are some legacy option that are
> > still available for some strange corner cases for some embedded distros
> > and they are not meant for general and permanent configuration.
> 
> So what's the proposal? Configuration files have to be in /etc and not 
> in /var/lib!

Actually that is not fully correct. The values in /etc are supposed to
be changed be an administrator the values in /var/lib can be changed by
the daemon. And that is exactly what happens.

> The administrator should be able to change the default (visibility or not) or 
> there should be an always working default.

The default is not visible (due security reasons) and if you decide it
to switch it to visible (even with a low-level HCI command) it will only
stay visible for 180 seconds. That is the default starting with 3.x.

> That is currently not the case because the bluetooth guys change stuff but the 
> user frontends do catch up a bit late. Just remember the passkey situation 
> and this is pretty much the same. It probably gets solved in the long run but 
> that's a strange idea of development :-/

It is actually solved for all GNOME and command line users. I don't know
about the KDE guys, but I am sure they have something similar.

> > If people don't learn that hcid.conf are proposed default values for the
> > cold run only, then I might simply remove the whole file in the next
> > upstream release. So stop writing ugly distribution specific hacks and
> > better ask upstream for it. There might might a real bug hiding
> > somewhere.
> 
> If package maintainers and upstream authors don't learn to document such 
> thing, the user will not learn. /etc/bluetooth/hcid.conf is a configuration 
> file and I expect that changes are respected. It is written _NOWHERE_ that 
> this only defines an initial state.
> Reading hcid.conf manpage tells me nothing about that.

Fully agreed. That needs fixing.

> > First of all this is an ugly hack and has no right to exist. Second the
> > configuration storage is meant to be permanent.
> 
> An ugly hack for an ugly situation.
> 
> I give you my point of view:
> _I_ wanted to fix discoverability of my system without some strange DBUS 
> commands that are documented nowhere but in the code.
> Yes, by now I know that hcid/dbus-api.txt exists but only in the source 
> package because it is not in the binary package.

Actually I think the dbus-api.txt document should be included as docs
into the binary package.

> Beside that, running the dbus command suggested in this bug report works, too.
> It should be noted, though, that you have to be root.

No. You have to be console user (or root).

> It probably is the better alternative with exceptions:
> * you cannot change the mode of devices that are currently not plugged in

That is true. The case to change settings for not active devices is
kinda strange. I know that there might be corner cases, but I never
fully got convinced that this is needed.

> * you can only refer to devices by using the device name, not the address

Actually you can use "manager.FindAdapter(address)" to get the path for
an adapter. Remember that the path for an adapter is only a string. It
has no real meaning. You shouldn't trust that they stay the same.

> So is there an easy command line tool for all those dbus options (except using 
> raw dbus command)?: no == very bad usibility (and an awful lot to type for 
> one option)
> 
> So how can you solve this problem with your input:
> * ship the dbus API documenation in the binary packages

Definitely.

> * give the user and root a shell tool to make use of the things in the bluez 
> dbus API without getting bloody hands by using dbus-send

Since we wanna avoid a Python dependency, I seems that there is finally
need for a btconfig tool written in plain C.

> * document in the manpages what you wrote here

Agreed.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #101 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 16:09:35 +0100
Am Sonntag 31 Dezember 2006 15:40 schrieb Marcel Holtmann:
> > The administrator should be able to change the default (visibility or
> > not) or there should be an always working default.
>
> The default is not visible (due security reasons) and if you decide it
> to switch it to visible (even with a low-level HCI command) it will only
> stay visible for 180 seconds. That is the default starting with 3.x.

Taking that...

> > That is currently not the case because the bluetooth guys change stuff
> > but the user frontends do catch up a bit late. Just remember the passkey
> > situation and this is pretty much the same. It probably gets solved in
> > the long run but that's a strange idea of development :-/
>
> It is actually solved for all GNOME and command line users. I don't know
> about the KDE guys, but I am sure they have something similar.

They don't, yet, users possibly have to wait for KDE4.
What is the solution for command line users? Or do you mean dbus-send?

> > Beside that, running the dbus command suggested in this bug report works,
> > too. It should be noted, though, that you have to be root.
>
> No. You have to be console user (or root).

Sorry but that is not sufficient. I tested this (X with konsole) and nothing 
happened. Running the same command with su worked.

> > It probably is the better alternative with exceptions:
> > * you cannot change the mode of devices that are currently not plugged in
>
> That is true. The case to change settings for not active devices is
> kinda strange. I know that there might be corner cases, but I never
> fully got convinced that this is needed.

* your last mode was "discoverable"
* you do not want to be visible
* plugging the dongle in and then chaning to "connectable" may be too late
Practically the same thing as the default from above.

> > * you can only refer to devices by using the device name, not the address
>
> Actually you can use "manager.FindAdapter(address)" to get the path for
> an adapter. Remember that the path for an adapter is only a string. It
> has no real meaning. You shouldn't trust that they stay the same.

So it is practically useless?

> > So is there an easy command line tool for all those dbus options (except
> > using raw dbus command)?: no == very bad usibility (and an awful lot to
> > type for one option)
> >
> > So how can you solve this problem with your input:
> > * ship the dbus API documenation in the binary packages
>
> Definitely.
>
> > * give the user and root a shell tool to make use of the things in the
> > bluez dbus API without getting bloody hands by using dbus-send
>
> Since we wanna avoid a Python dependency,

Does that mean that there is such a tool?

> I seems that there is finally 
> need for a btconfig tool written in plain C.

Or even better: write a libbluezconf with a shell frontend, so that other 
programs can easily change bluetooth settings.
Wouldn't a simply shell script suffice in the mean time?

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #106 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Sun, 31 Dec 2006 16:22:30 +0100
Hi Hendrik,

> > > That is currently not the case because the bluetooth guys change stuff
> > > but the user frontends do catch up a bit late. Just remember the passkey
> > > situation and this is pretty much the same. It probably gets solved in
> > > the long run but that's a strange idea of development :-/
> >
> > It is actually solved for all GNOME and command line users. I don't know
> > about the KDE guys, but I am sure they have something similar.
> 
> They don't, yet, users possibly have to wait for KDE4.
> What is the solution for command line users? Or do you mean dbus-send?

basically you have dbus-send. Additionally we have our apitest script
that we used for testing the interface. However it might not be suitable
for a general installation.

> > > Beside that, running the dbus command suggested in this bug report works,
> > > too. It should be noted, though, that you have to be root.
> >
> > No. You have to be console user (or root).
> 
> Sorry but that is not sufficient. I tested this (X with konsole) and nothing 
> happened. Running the same command with su worked.

That must be a bug of the at_console setting of D-Bus. We really on the
security system of D-Bus here. And the general (actually default rule)
is that root and the current console user can change all settings.

> > > It probably is the better alternative with exceptions:
> > > * you cannot change the mode of devices that are currently not plugged in
> >
> > That is true. The case to change settings for not active devices is
> > kinda strange. I know that there might be corner cases, but I never
> > fully got convinced that this is needed.
> 
> * your last mode was "discoverable"
> * you do not want to be visible
> * plugging the dongle in and then chaning to "connectable" may be too late
> Practically the same thing as the default from above.

This is why we go back to non-discoverable after 180 seconds by default.

Supporting these kind of strange setting would also mean that you know
the address of the adapter you are gonna plug in up-front. In general
you don't. Except you really know what you are doing and then no
interface will fully suit you at all.

> > > * you can only refer to devices by using the device name, not the address
> >
> > Actually you can use "manager.FindAdapter(address)" to get the path for
> > an adapter. Remember that the path for an adapter is only a string. It
> > has no real meaning. You shouldn't trust that they stay the same.
> 
> So it is practically useless?

It is not useless. It is meaningless, because it is a runtime value. As
long as the adapter is plugged in it is valid, but after that it has no
additional lexical meaning.

This is why "manager.ListAdapters()" and "manager.DefaultAdapter()"
exists to discover the adapters.

> > > So is there an easy command line tool for all those dbus options (except
> > > using raw dbus command)?: no == very bad usibility (and an awful lot to
> > > type for one option)
> > >
> > > So how can you solve this problem with your input:
> > > * ship the dbus API documenation in the binary packages
> >
> > Definitely.
> >
> > > * give the user and root a shell tool to make use of the things in the
> > > bluez dbus API without getting bloody hands by using dbus-send
> >
> > Since we wanna avoid a Python dependency,
> 
> Does that mean that there is such a tool?

The apitest script could easily do this job or the dbusdef.py pre-load
code are really helpful for testing. In general it is really simple to
handle our D-Bus API from within Python. Most things are only a few
lines of Python, but for a base package like bluez-utils you don't wanna
have that dependency.

> > I seems that there is finally 
> > need for a btconfig tool written in plain C.
> 
> Or even better: write a libbluezconf with a shell frontend, so that other 
> programs can easily change bluetooth settings.

This always comes up from time to time, but wrapping another C API
around the D-Bus API is really not a good idea. You wanna use D-Bus
directly and fully integrate it.

> Wouldn't a simply shell script suffice in the mean time?

Using dbus-send only? Yes, that would do.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #111 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Mon, 1 Jan 2007 03:09:05 +0100
Happy New Year 2007.

Am Sonntag 31 Dezember 2006 16:22 schrieb Marcel Holtmann:
> > * plugging the dongle in and then chaning to "connectable" may be too
> > late Practically the same thing as the default from above.
>
> This is why we go back to non-discoverable after 180 seconds by default.
>
> Supporting these kind of strange setting would also mean that you know
> the address of the adapter you are gonna plug in up-front. In general
> you don't. Except you really know what you are doing and then no
> interface will fully suit you at all.

Well, it is a special case, I agree. But since you already plugged it in once, 
you can already know the address (ls /var/lib/bluetooth).

> > > > So is there an easy command line tool for all those dbus options
> > > > (except using raw dbus command)?: no == very bad usibility (and an
> > > > awful lot to type for one option)
> > > >
> > > > So how can you solve this problem with your input:
> > > > * ship the dbus API documenation in the binary packages
> > >
> > > Definitely.
> > >
> > > > * give the user and root a shell tool to make use of the things in
> > > > the bluez dbus API without getting bloody hands by using dbus-send
> > >
> > > Since we wanna avoid a Python dependency,
> >
> > Does that mean that there is such a tool?
>
> The apitest script could easily do this job or the dbusdef.py pre-load
> code are really helpful for testing. In general it is really simple to
> handle our D-Bus API from within Python. Most things are only a few
> lines of Python, but for a base package like bluez-utils you don't wanna
> have that dependency.

Pythong is priority standard. Ok not essential but looking at what already 
depends on python, it is most likely already installed.
I wouldn't mind it but I am not the bluez-utils maintainer ;)

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Filippo Giunchedi <filippo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #116 received at 384379@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: Marcel Holtmann <marcel@holtmann.org>, 384379@bugs.debian.org
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Mon, 1 Jan 2007 12:29:37 +0100
[Message part 1 (text/plain, inline)]
Happy new year 2007 everyone!

On Mon, Jan 01, 2007 at 03:09:05AM +0100, Hendrik Sattler wrote:
> > The apitest script could easily do this job or the dbusdef.py pre-load
> > code are really helpful for testing. In general it is really simple to
> > handle our D-Bus API from within Python. Most things are only a few
> > lines of Python, but for a base package like bluez-utils you don't wanna
> > have that dependency.
> 
> Pythong is priority standard. Ok not essential but looking at what already 
> depends on python, it is most likely already installed.
> I wouldn't mind it but I am not the bluez-utils maintainer ;)

well, I wouldn't mind adding python as Suggests: or even Recommends: of course
with good rationale, and proper documentation as well :)

thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

I worked myself up from nothing to a state of extreme poverty.
-- Groucho Marx
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #121 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Mon, 1 Jan 2007 15:53:06 +0100
Am Sonntag 31 Dezember 2006 15:40 schrieb Marcel Holtmann:
> > Beside that, running the dbus command suggested in this bug report works,
> > too. It should be noted, though, that you have to be root.
>
> No. You have to be console user (or root).

I cite from dbus policy that I somehow just don't get (too many english words 
are different between dbus-send manpage, policy snippet and dbus-api.txt :-O

The policy for bluez-utils:
  <policy user="root">
    <allow own="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez.Adapter"/>
    <allow receive_sender="org.bluez.Adapter"/>

    <allow send_path="/org/bluez/Adapter"/>

    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>

    <allow send_path="/org/bluez/Manager"/>

    <allow send_destination="org.bluez.Security"/>
    <allow receive_sender="org.bluez.Security"/>
  </policy>

As you can see, they differ between root and console users. And somehow, the 
part for the console users does not match this command:
dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode 
string:discoverable

To show what I mean (dbus-send matches the above line):
$  cd /var/lib/bluetooth/<BDADDR-of-hci0>
$  cat config
mode discoverable
$  dbus-send .......:off
$  cat config
mode off
$  dbus-send .......:connectable
$  cat config
mode off
$  dbus-send .......:discoverable
$  cat config
mode off


Maybe one of you know why only setting to "off" works but not the other two 
mode settings? All three commands work as user root.

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #126 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 02 Jan 2007 18:51:29 +0100
Hi Hendrik,

> > > * plugging the dongle in and then chaning to "connectable" may be too
> > > late Practically the same thing as the default from above.
> >
> > This is why we go back to non-discoverable after 180 seconds by default.
> >
> > Supporting these kind of strange setting would also mean that you know
> > the address of the adapter you are gonna plug in up-front. In general
> > you don't. Except you really know what you are doing and then no
> > interface will fully suit you at all.
> 
> Well, it is a special case, I agree. But since you already plugged it in once, 
> you can already know the address (ls /var/lib/bluetooth).

in general yes, but the effort to cleanly support these kind of things
is a little bit too much in what it gets us. So I prefer to not offer
support for this at the moment unless it becomes a major use case.

> > > > > So is there an easy command line tool for all those dbus options
> > > > > (except using raw dbus command)?: no == very bad usibility (and an
> > > > > awful lot to type for one option)
> > > > >
> > > > > So how can you solve this problem with your input:
> > > > > * ship the dbus API documenation in the binary packages
> > > >
> > > > Definitely.
> > > >
> > > > > * give the user and root a shell tool to make use of the things in
> > > > > the bluez dbus API without getting bloody hands by using dbus-send
> > > >
> > > > Since we wanna avoid a Python dependency,
> > >
> > > Does that mean that there is such a tool?
> >
> > The apitest script could easily do this job or the dbusdef.py pre-load
> > code are really helpful for testing. In general it is really simple to
> > handle our D-Bus API from within Python. Most things are only a few
> > lines of Python, but for a base package like bluez-utils you don't wanna
> > have that dependency.
> 
> Pythong is priority standard. Ok not essential but looking at what already 
> depends on python, it is most likely already installed.
> I wouldn't mind it but I am not the bluez-utils maintainer ;)

It will be bad for people that actually try to strip down their
distribution. For example the embedded people. They are still mad about
the D-Bus dependency.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #131 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 02 Jan 2007 18:52:26 +0100
Hi Hendrik,

> > > Beside that, running the dbus command suggested in this bug report works,
> > > too. It should be noted, though, that you have to be root.
> >
> > No. You have to be console user (or root).
> 
> I cite from dbus policy that I somehow just don't get (too many english words 
> are different between dbus-send manpage, policy snippet and dbus-api.txt :-O
> 
> The policy for bluez-utils:
>   <policy user="root">
>     <allow own="org.bluez"/>
>   </policy>
> 
>   <policy at_console="true">
>     <allow send_destination="org.bluez.Adapter"/>
>     <allow receive_sender="org.bluez.Adapter"/>
> 
>     <allow send_path="/org/bluez/Adapter"/>
> 
>     <allow send_destination="org.bluez.Manager"/>
>     <allow receive_sender="org.bluez.Manager"/>
> 
>     <allow send_path="/org/bluez/Manager"/>
> 
>     <allow send_destination="org.bluez.Security"/>
>     <allow receive_sender="org.bluez.Security"/>
>   </policy>

this is a bluez-utils-2.x config file and simply outdated. Check the
source code for the latest one.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #136 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 2 Jan 2007 19:42:40 +0100
Am Dienstag 02 Januar 2007 18:52 schrieb Marcel Holtmann:
> > > > Beside that, running the dbus command suggested in this bug report
> > > > works, too. It should be noted, though, that you have to be root.
> > >
> > > No. You have to be console user (or root).
> >
> > I cite from dbus policy that I somehow just don't get (too many english
> > words are different between dbus-send manpage, policy snippet and
> > dbus-api.txt :-O
> >
> > The policy for bluez-utils:
> >   <policy user="root">
> >     <allow own="org.bluez"/>
> >   </policy>
> >
> >   <policy at_console="true">
> >     <allow send_destination="org.bluez.Adapter"/>
> >     <allow receive_sender="org.bluez.Adapter"/>
> >
> >     <allow send_path="/org/bluez/Adapter"/>
> >
> >     <allow send_destination="org.bluez.Manager"/>
> >     <allow receive_sender="org.bluez.Manager"/>
> >
> >     <allow send_path="/org/bluez/Manager"/>
> >
> >     <allow send_destination="org.bluez.Security"/>
> >     <allow receive_sender="org.bluez.Security"/>
> >   </policy>
>
> this is a bluez-utils-2.x config file and simply outdated. Check the
> source code for the latest one.

No, this (well above is only what inside the <busconfig> thing) is what's in 
Debian's bluez-utils-3.7 source package under hcid/bluez-hcid.conf (and also 
in the orig.tar.gz).
Even -3.8 from bluez.sf.net contains the same one as hcid/bluetooth.conf.
AFAIK, this _is_ the latest one.

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #141 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 2 Jan 2007 19:48:14 +0100
Am Dienstag 02 Januar 2007 18:52 schrieb Marcel Holtmann:
> this is a bluez-utils-2.x config file and simply outdated. Check the
> source code for the latest one.

The problem is not that the message does not arrive at hcid. If that is the 
problem, setting mode to off would also not work but it does. 
Only "connectable" and "discoverable" mode cannot be set by the user, only by 
root. A quick look at the code doesn't show any problem, there. I do not 
really know what causes this...

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #146 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 02 Jan 2007 20:08:54 +0100
Hi Hendrik,

> > > > > Beside that, running the dbus command suggested in this bug report
> > > > > works, too. It should be noted, though, that you have to be root.
> > > >
> > > > No. You have to be console user (or root).
> > >
> > > I cite from dbus policy that I somehow just don't get (too many english
> > > words are different between dbus-send manpage, policy snippet and
> > > dbus-api.txt :-O
> > >
> > > The policy for bluez-utils:
> > >   <policy user="root">
> > >     <allow own="org.bluez"/>
> > >   </policy>
> > >
> > >   <policy at_console="true">
> > >     <allow send_destination="org.bluez.Adapter"/>
> > >     <allow receive_sender="org.bluez.Adapter"/>
> > >
> > >     <allow send_path="/org/bluez/Adapter"/>
> > >
> > >     <allow send_destination="org.bluez.Manager"/>
> > >     <allow receive_sender="org.bluez.Manager"/>
> > >
> > >     <allow send_path="/org/bluez/Manager"/>
> > >
> > >     <allow send_destination="org.bluez.Security"/>
> > >     <allow receive_sender="org.bluez.Security"/>
> > >   </policy>
> >
> > this is a bluez-utils-2.x config file and simply outdated. Check the
> > source code for the latest one.
> 
> No, this (well above is only what inside the <busconfig> thing) is what's in 
> Debian's bluez-utils-3.7 source package under hcid/bluez-hcid.conf (and also 
> in the orig.tar.gz).
> Even -3.8 from bluez.sf.net contains the same one as hcid/bluetooth.conf.
> AFAIK, this _is_ the latest one.

actually that is wrong. The send_path must be "/org/bluez" and exactly
that is in the source package.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Marcel Holtmann <marcel@holtmann.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #151 received at 384379@bugs.debian.org (full text, mbox):

From: Marcel Holtmann <marcel@holtmann.org>
To: Hendrik Sattler <debian@hendrik-sattler.de>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 02 Jan 2007 20:13:56 +0100
Hi Hendrik,

> > this is a bluez-utils-2.x config file and simply outdated. Check the
> > source code for the latest one.
> 
> The problem is not that the message does not arrive at hcid. If that is the 
> problem, setting mode to off would also not work but it does. 
> Only "connectable" and "discoverable" mode cannot be set by the user, only by 
> root. A quick look at the code doesn't show any problem, there. I do not 
> really know what causes this...

that is strange. No idea why "off" works and the others don't. Our code
doesn't deal with any security settings. This is all done by D-Bus
itself.

Regards

Marcel





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Filippo Giunchedi <filippo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #156 received at 384379@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Hendrik Sattler <debian@hendrik-sattler.de>, 384379@bugs.debian.org
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 2 Jan 2007 20:27:27 +0100
[Message part 1 (text/plain, inline)]
On Tue, Jan 02, 2007 at 08:08:54PM +0100, Marcel Holtmann wrote:
> Hi Hendrik,
> > No, this (well above is only what inside the <busconfig> thing) is what's in 
> > Debian's bluez-utils-3.7 source package under hcid/bluez-hcid.conf (and also 
> > in the orig.tar.gz).
> > Even -3.8 from bluez.sf.net contains the same one as hcid/bluetooth.conf.
> > AFAIK, this _is_ the latest one.
> 
> actually that is wrong. The send_path must be "/org/bluez" and exactly
> that is in the source package.

There's a mistake somewhere, I got this:

$ wget http://bluez.sf.net/download/bluez-utils-3.7.tar.gz
$ wget http://bluez.sf.net/download/bluez-utils-3.8.tar.gz
$ wget http://ftp.debian.org/debian/pool/main/b/bluez-utils/bluez-utils_3.7.orig.tar.gz
$ md5sum bluez-utils-3.*
89f7290907d098163a2fa59a55dfafe7  bluez-utils-3.7.tar.gz
89f7290907d098163a2fa59a55dfafe7  bluez-utils_3.7.orig.tar.gz
2e73f6398d834035f35941b31716b276  bluez-utils-3.8.tar.gz

$ diff -u bluez-utils-3.7/hcid/bluez-hcid.conf bluez-utils-3.8/hcid/bluetooth.conf
--- bluez-utils-3.7/hcid/bluez-hcid.conf        2006-04-23 02:07:27.000000000 +0200
+++ bluez-utils-3.8/hcid/bluetooth.conf 2006-11-13 17:23:36.000000000 +0100
@@ -1,5 +1,5 @@
 <!-- This configuration file specifies the required security policies
-     for BlueZ hcid to work. -->
+     for Bluetooth core service to work. -->

 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
@@ -12,15 +12,16 @@
   </policy>

   <policy at_console="true">
-    <allow send_destination="org.bluez.Adapter"/>
-    <allow receive_sender="org.bluez.Adapter"/>
-
-    <allow send_path="/org/bluez/Adapter"/>
-
     <allow send_destination="org.bluez.Manager"/>
     <allow receive_sender="org.bluez.Manager"/>

-    <allow send_path="/org/bluez/Manager"/>
+    <allow send_path="/org/bluez"/>
+
+    <allow send_destination="org.bluez.Adapter"/>
+    <allow receive_sender="org.bluez.Adapter"/>
+
+    <allow send_destination="org.bluez.Service"/>
+    <allow receive_sender="org.bluez.Service"/>

     <allow send_destination="org.bluez.Security"/>
     <allow receive_sender="org.bluez.Security"/>


$ md5sum bluez-utils-3.7/hcid/bluez-hcid.conf bluez-utils-3.8/hcid/bluetooth.conf
dfdfd84994e42be7296a9c570b018e2d  bluez-utils-3.7/hcid/bluez-hcid.conf
4e4a49d04e2c931243348de064e4b05b  bluez-utils-3.8/hcid/bluetooth.conf

filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

I never forget a face, but in your case I'll be glad to make an exception.
-- Groucho Marx
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to Hendrik Sattler <debian@hendrik-sattler.de>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #161 received at 384379@bugs.debian.org (full text, mbox):

From: Hendrik Sattler <debian@hendrik-sattler.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: 384379@bugs.debian.org, Filippo Giunchedi <filippo@debian.org>
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 2 Jan 2007 23:35:11 +0100
Am Dienstag 02 Januar 2007 20:13 schrieb Marcel Holtmann:
> Hi Hendrik,
>
> > > this is a bluez-utils-2.x config file and simply outdated. Check the
> > > source code for the latest one.
> >
> > The problem is not that the message does not arrive at hcid. If that is
> > the problem, setting mode to off would also not work but it does.
> > Only "connectable" and "discoverable" mode cannot be set by the user,
> > only by root. A quick look at the code doesn't show any problem, there. I
> > do not really know what causes this...
>
> that is strange. No idea why "off" works and the others don't. Our code
> doesn't deal with any security settings. This is all done by D-Bus
> itself.

I must revert that. Today, it works as user even though I used the same 
commands (via bash history).
Then a moment later, I suddenly need 5 tries to set it and the next moment it 
works on the first command forth and back. dbus-send doesn't report dbus 
error messages, though...

It seems that sometimes setting the mode fails but I don't know why. Maybe the 
adapter is busy somehow?

HS



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. Full text and rfc822 format available.

Acknowledgement sent to "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #166 received at 384379@bugs.debian.org (full text, mbox):

From: "Jaime Alberto Silva" <jaimealbertosilva@gmail.com>
To: "Filippo Giunchedi" <filippo@debian.org>
Cc: "Marcel Holtmann" <marcel@holtmann.org>, "Hendrik Sattler" <debian@hendrik-sattler.de>, 384379@bugs.debian.org
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Tue, 2 Jan 2007 22:52:54 -0500
Hi everyone,

On 12/31/06, Filippo Giunchedi <filippo@debian.org> wrote:
> Hello,
>
> On Sun, Dec 31, 2006 at 01:36:21PM +0100, Marcel Holtmann wrote:
> > > Yes, maybe correct grammatical mistakes if present.
> > > Note that deleting the "config" file in /var/lib/bluetooth is an essential
> > > part of the solution.
> >
> > this is a big _NO_. Don't mess with the configuration storage directly.
> > The configuration storage has priority over the hcid.conf file and this
> > is meant to be this way.
> >
> > The "iscan" and "pscan" config option are some legacy option that are
> > still available for some strange corner cases for some embedded distros
> > and they are not meant for general and permanent configuration.
>
> Marcel, can you confirm the actual solution is the one you indicated in
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=384379#msg10 ?
>
> Jaime, could you please retry as well? bluez 3.7 is both in testing and
> unstable.

I've been using "discovto 0;" in hcid.conf without any problems for a while.
Currently I'm using bluez 3.7-1, there was an update a while ago when
I had to add the line again to hcid.conf to make it work, and since
then I tell debconf not to modify my hcid.conf in the updates so I
can't tell if this version doesn't have the bug.

>
> >
> > If people don't learn that hcid.conf are proposed default values for the
> > cold run only, then I might simply remove the whole file in the next
> > upstream release. So stop writing ugly distribution specific hacks and
> > better ask upstream for it. There might might a real bug hiding
> > somewhere.
>
> If hcid.conf values are there only for a cold run I think it needs to be
> documented, I didn't found anything in hcid.conf(5) though, is it documented
> somewhere?
>
> thanks,
> filippo

AFAIK the only thing needed to get the behaviour I want is to add
"discovto 0;" to hcid.conf  the problem was that I didn't found that
in the manuals so I think that updating the hcid.conf manual is a
solution to the bug, and it will be nice to add a default value with a
comment to the package's hcid.conf, something like:

...
# Set the time in seconds the discovery mode will be enabled, change
to 0 to keep it forever
discovto 180;
...

> --
> Filippo Giunchedi - http://esaurito.net


-- 
Jaime Alberto Silva



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. (Mon, 01 Jun 2009 17:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Filippo Giunchedi <filippo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. (Mon, 01 Jun 2009 17:48:02 GMT) Full text and rfc822 format available.

Message #171 received at 384379@bugs.debian.org (full text, mbox):

From: Filippo Giunchedi <filippo@debian.org>
To: Jaime Alberto Silva <jaimealbertosilva@gmail.com>, 384379@bugs.debian.org
Subject: Re: Bug#384379: [Pkg-bluetooth-maintainers] Bug#384379: WORK-AROUND for "iscan not set"
Date: Mon, 1 Jun 2009 19:46:53 +0200
On Tue, Jan 02, 2007 at 10:52:54PM -0500, Jaime Alberto Silva wrote:
> I've been using "discovto 0;" in hcid.conf without any problems for a while.
> Currently I'm using bluez 3.7-1, there was an update a while ago when
> I had to add the line again to hcid.conf to make it work, and since
> then I tell debconf not to modify my hcid.conf in the updates so I
> can't tell if this version doesn't have the bug.

this is the default with bluez 4.x, can you retry ?

thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net - 0x6B79D401

Man was made at the end of the week's work when God was tired.
-- Mark Twain




Tags added: moreinfo Request was from Filippo Giunchedi <filippo@debian.org> to control@bugs.debian.org. (Fri, 19 Jun 2009 15:49:45 GMT) Full text and rfc822 format available.

Bug Marked as found in versions bluez/4.42-2. Request was from Marcus Better <marcus@better.se> to control@bugs.debian.org. (Sun, 26 Jul 2009 20:15:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>:
Bug#384379; Package bluez-utils. (Sun, 26 Jul 2009 20:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marcus Better <marcus@better.se>:
Extra info received and forwarded to list. Copy sent to Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>. (Sun, 26 Jul 2009 20:21:02 GMT) Full text and rfc822 format available.

Message #180 received at 384379@bugs.debian.org (full text, mbox):

From: Marcus Better <marcus@better.se>
To: 384379@bugs.debian.org
Subject: bluez-utils: The inquiry scan (ISCAN) gets turned off
Date: Sun, 26 Jul 2009 22:15:58 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe this still happens in 4.42, unless I misunderstand this long
thread...

On my Thinkpad T61, ISCAN is off by default and the laptop is not
discoverable. The workaround "hciconfig hci0 piscan" fixes this.

My hcid.conf does not have any "discovto" statement (and I don't think I
have changed anything in there). Is this correct?

/etc/bluetooth/main.conf does have the line
  DiscoverableTimeout = 0
.

Cheers,

Marcus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpsuX4ACgkQXjXn6TzcAQnVnwCfc9d68nIuYpiKM/7g/Qw/Q8Vz
ZQ0Anj698Q7H+9VSkck2Wp4og8KKE9UT
=20h1
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 13:23:34 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.