The problem is this code snippet in hcid/main.c:configure_device()

       /* Set scan mode */
        if (!read_device_mode(&di.bdaddr, mode, sizeof(mode))) {
                if (!strcmp(mode, MODE_OFF))
                        device_opts->scan = SCAN_DISABLED;
                else if (!strcmp(mode, MODE_CONNECTABLE))
                        device_opts->scan = SCAN_PAGE;
                else if (!strcmp(mode, MODE_DISCOVERABLE)) {
                        /* Set discoverable only if timeout is 0 */
                        if (!get_discoverable_timeout(hdev))
device_opts->scan = SCAN_PAGE | SCAN_INQUIRY;
                        else
                                device_opts->scan = SCAN_PAGE;
                }
        }


When the configuration is read from the files in /var (what useful purpose does this serve?) instead of /etc/bluetooth/hcid.conf, SCAN_INQUIRY is only set if the 'discovto' parameter is available and set to 0. (discovto can be set in hcid.conf's device section)

if you remove /var/lib/bluetooth/<local_bdaddr>/*, then the scan mode are set correctly the next time you start hcid, but after that, it breaks again unless discovto is available.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to