diff options
| author | Tim Redfern <tim@eclectronics.org> | 2011-12-19 18:20:33 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2011-12-19 18:20:33 +0000 |
| commit | e9a73bbb3c14af340999f70146747787785f4fee (patch) | |
| tree | a125452f7d641673286542497da051b810427880 /pybluez/simple/inquiry.py | |
initial commit
Diffstat (limited to 'pybluez/simple/inquiry.py')
| -rw-r--r-- | pybluez/simple/inquiry.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pybluez/simple/inquiry.py b/pybluez/simple/inquiry.py new file mode 100644 index 0000000..8f77887 --- /dev/null +++ b/pybluez/simple/inquiry.py @@ -0,0 +1,17 @@ +# file: inquiry.py +# auth: Albert Huang <albert@csail.mit.edu> +# desc: performs a simple device inquiry followed by a remote name request of +# each discovered device +# $Id: inquiry.py 401 2006-05-05 19:07:48Z albert $ +# + +import bluetooth + +print "performing inquiry..." + +nearby_devices = bluetooth.discover_devices(lookup_names = True) + +print "found %d devices" % len(nearby_devices) + +for addr, name in nearby_devices: + print " %s - %s" % (addr, name) |
