Archived:How to discover a Bluetooth device in PySymbian
This article shows a number of 3rd party Python libraries that you can use to discover and list available Bluetooth devices.
S60 2nd Edition
The bt_device_discoverer from PDIS silently lists all Bluetooth Devices (S60 2nd Edition only).
Note: The original PDIS download site is no longer available. The link below should access the same file, but is not tested. http://code.google.com/p/aircable/source/browse/esc-sj/robot/ao-socket/python-lib/aosocket/symbian/bt_device_discoverer.py?spec=svn663&r=663
# need to install these 2 modules from PDIS first
from aosocket.symbian.bt_device_discoverer import *
def callback(error, devices, cb_param=None):
for address, name in devices:
print "Found: ", name, address
# You can get more data by importing socket and try
# bt_discover(address) or bt_obex_discover(address)
# see details in official pys60 doc on socket module
lister = BtDeviceLister()
S60 2nd and 3rd Editions
There's additional solution for 2nd and 3rd Edition : LightBlue library.
from lightblue import *