public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Ilya Rubtsov <lusyaru@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: DeviceFound and DeviceDisappeared signals
Date: Fri, 01 May 2009 22:14:48 +0400	[thread overview]
Message-ID: <49FB3C18.8030505@gmail.com> (raw)
In-Reply-To: <49FB0A07.2020200@gmail.com>

I just would add that with hardware scheduler DeviceDisappeared signal 
works fine if there two remote devices in the field, and doesn't work if 
there is only one remote device:

---
# Now there only 00:16:B8:53:5F:17 is turned on
Fri May  1 20:36:48 2009 Signal: DeviceFound 00:16:B8:53:5F:17
# Now I turn off 00:16:B8:53:5F:17 and wait, but no signal being emitted...
# So, I turn on 00:02:76:16:F6:8F
Fri May  1 20:38:52 2009 Signal: DeviceFound 00:02:76:16:F6:8F
Fri May  1 20:39:01 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
# So new device appearing causes emitting DeviceDisappeared signal for 
device that was turned off some time ago
---

P.S. I use BlueZ 4.36

Ilya Rubtsov пишет:
> Hi! I have some troubles with using DeviceFound and DeviceDisappeared 
> signals. I use simple test script: http://pastebin.com/m45de7894 . 
> There are two cases: if I use software inquire scheduler and if I use 
> hardware one.
>
> Hardware scheduler. Bluetooth module in phone is on and I run script:
> ---
> ilya@ilya-laptop:~/blue$ python fodis.py
> Fri May  1 16:36:44 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> ---
> And no more signals. Then I wait 2 mins, turn off Bluetooth in phone 
> and wait 2 more mins, but no one signal is emitted.
> I don't know if DeviceFound signal should be emitted on every inquire, 
> maybe not. But I'm sure DeviceDisappeared signal should be emitted at 
> least once :)
>
>
> Software scheduler ("DiscoverSchedulerInterval = 1" at main.conf). 
> Bluetooth module in phone is on and I run script:
> ---
> ilya@ilya-laptop:~/blue$ python fodis.py
> Fri May  1 16:43:52 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> Fri May  1 16:44:11 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
> Fri May  1 16:44:14 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> Fri May  1 16:44:34 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
> Fri May  1 16:44:37 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> Fri May  1 16:44:57 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
> Fri May  1 16:45:00 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> Fri May  1 16:45:20 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
> Fri May  1 16:45:23 2009 Signal: DeviceFound 00:16:B8:53:5F:17
> ### At this moment I turn off Bluetooth in phone
> Fri May  1 16:45:43 2009 Signal: DeviceDisappeared 00:16:B8:53:5F:17
> ---
>
> So, both signals was emitted on every inquiry. I think this is wrong 
> behavior. Am I right?
> And DeviceDisappeared was emitted once after remote device was 
> actually turned off. That's good :)


  reply	other threads:[~2009-05-01 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01 14:41 DeviceFound and DeviceDisappeared signals Ilya Rubtsov
2009-05-01 18:14 ` Ilya Rubtsov [this message]
2009-05-02 22:20   ` Luiz Augusto von Dentz
2009-05-02 23:31     ` 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=49FB3C18.8030505@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox