nadeesha5814 / pybluez

Automatically exported from code.google.com/p/pybluez
GNU General Public License v2.0
0 stars 0 forks source link

DeviceDiscoverer on Linux #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. subclass DeviceDiscoverer
2. call find_devices
3.

What is the expected output? What do you see instead?
I subclassed DeviceDiscoverer with device_discovered implemented  with a 
simple print of the address but nothing appens. The same with 
inquiry_complete, it is never called

What version of the product are you using? On what operating system?
I'm using 0.15 on Linux Debian etch

Please provide any additional information below.

#!/usr/bin/env python

from bluetooth import DeviceDiscoverer
import time

class BlueZone(DeviceDiscoverer):

    def __init__(self):
        DeviceDiscoverer.__init__(self)

    def device_discovered(self, address, device_class, name):
        print "%s - %s" % (address,name)

    def inquiry_complete(self):
        print "COMPLETED"

print "START"

bz = BlueZone()

bz.find_devices(True,8,True)

print "PAUSE"

time.sleep(120)

print "STOP"

Original issue reported on code.google.com by webfr...@gmail.com on 29 Sep 2008 at 11:06

GoogleCodeExporter commented 8 years ago
Please see the examples and documentation on how to use DeviceDiscoverer. 
examples/simple/asynchronous-inquiry.py is a good place to start.

Original comment by ashu...@gmail.com on 30 Sep 2008 at 6:11

GoogleCodeExporter commented 8 years ago

Original comment by ashu...@gmail.com on 8 Oct 2008 at 3:55