From: Ilya Rubtsov <lusyaru@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Exit from software scheduled periodic inquiry on program termination
Date: Fri, 20 Mar 2009 03:31:35 +0300 [thread overview]
Message-ID: <49C2E3E7.30503@gmail.com> (raw)
Hi!
I need fast and frequent inquiry, so I set DiscoverSchedulerInterval=1
in /etc/bluetooth/main.conf. Software scheduler works fine. But I have
problems when I interrupt my program by Ctrl-C. Scheduler doesn't see
that program was terminated and continues to send Inquiry command every
11 seconds (in my case), but when I used normal periodic inquiry
(hardware scheduled) chip automatically exited inquiry mode on program
termination. So now if I rerun my program and try use adapter I catch
execution 'Adapter is not ready'.
There is one more problem. If program was terminated and scheduled
inquiry continues then the Manager.ListAdapters method returns
duplicated list of adapters:
dbus.Array([dbus.ObjectPath('/org/bluez/7868/hci0'),
dbus.ObjectPath('/org/bluez/7868/hci1'),
dbus.ObjectPath('/org/bluez/7868/hci0'),
dbus.ObjectPath('/org/bluez/7868/hci1')], signature=dbus.Signature('o'))
Then I unplug one dongle and get:
dbus.Array([dbus.ObjectPath('/org/bluez/7868/hci0'),
dbus.ObjectPath('/org/bluez/7868/hci0')], signature=dbus.Signature('o'))
Then plug that dongle again and get:
dbus.Array([dbus.ObjectPath('/org/bluez/7868/hci0'),
dbus.ObjectPath('/org/bluez/7868/hci0'),
dbus.ObjectPath('/org/bluez/7868/hci1')], signature=dbus.Signature('o'))
I asked Vudentz at #bluez about it and he gave me patch -
http://fpaste.org/paste/6518 . I used it. Now list is not duplicated -
one bug fixed. But DefaultAdapter() now causes exception 'No such
adapter' - +1 bug :)
Any ideas?
next reply other threads:[~2009-03-20 0:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 0:31 Ilya Rubtsov [this message]
2009-03-20 17:19 ` Exit from software scheduled periodic inquiry on program termination Ilya Rubtsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C2E3E7.30503@gmail.com \
--to=lusyaru@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.