Discover Bluetooth Devices Around You
Join the DZone community and get the full member experience.Join For Free
Pys60 has good bluetooth support from the beginning. However, to discover another device, it require you to interact with the app, choosing a device from the list. PDIS has a library that help you list all devices silently.
# need to install these 2 modules from PDIS first import aosocketnativenew 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() lister.discover_all(callback, None)I summarize the code above from thejamo's example here. His code is more complete with error checking.
Opinions expressed by DZone contributors are their own.