public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* app doesn't recieve signal DeviceDisappeared
@ 2009-01-11  3:52 Ilya Rubtsov
  2009-01-18 15:29 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Ilya Rubtsov @ 2009-01-11  3:52 UTC (permalink / raw)
  To: linux-bluetooth

Hi!

Excuse me for my English.

I need help with using Bluez and dbus. Here is my small program in Python:

------------

import dbus
import dbus.glib
import gobject

def device_found(addr, values):
	print 'Found:', addr

def device_disapp(addr):    
	print 'Disappeared:', addr

bus = dbus.SystemBus()
obj = bus.get_object('org.bluez', '/org/bluez/hci0')
adapter = dbus.Interface(obj, 'org.bluez.Adapter')
adapter.connect_to_signal('DeviceFound', device_found)
adapter.connect_to_signal('DeviceDisappeared', device_disapp)

adapter.StartDiscovery()

gobject.threads_init()
dbus.glib.init_threads()
main_loop = gobject.MainLoop()
main_loop.run()


-----------

And I have problem with DeviceDisappeared signal. I run program, then it 
finds my bluetooth enabled phone and prints it's address every ~10 
seconds (periodical discovery). Than I turn off bluetooth in phone, but 
Bluez doesn't send signal 'DeviceDisappeared', so program doesn't print 
"Disappeared: ...". What's wrong in my program? Do I have 
misunderstanding of Bluez Adapter API?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-26 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11  3:52 app doesn't recieve signal DeviceDisappeared Ilya Rubtsov
2009-01-18 15:29 ` Marcel Holtmann
2009-01-18 21:17   ` Ilya Rubtsov
2009-01-19 19:52     ` Tom Patzig
2009-01-23 22:11       ` Luiz Augusto von Dentz
2009-01-26 13:57         ` Tom Patzig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox