DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Discover Bluetooth Devices Around You

  • submit to reddit
        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.
<a href=>PDIS</a> 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 <a href=>here</a>.
His code is more complete with error checking.    


Snippets Manager replied on Mon, 2009/05/04 - 9:01am

I am doing the same application ,that shows bluetooth devices around, Using flash lite.I am using kunerilite for bluetooth support.Could you please help me o this one? like if there is any tutorial. Thanks

Snippets Manager replied on Tue, 2009/03/03 - 11:05am

I have got a very important question: Could bluetooth devices get used with medical devices in hospital or any other medical institute? any extant solution in the market?