×
Namespaces

Variants
Actions

Archived:How to discover a Bluetooth device in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Article
Created: cyke64 (20 Mar 2007)
Last edited: hamishwillee (31 May 2013)

This article shows a number of 3rd party Python libraries that you can use to discover and list available Bluetooth devices.

Needs-update.pngThis article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons: hamishwillee (07 Oct 2011)
PDIS download no longer available for bt_device_discoverer. The version linked in section below needs to be tested.

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
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)

S60 2nd and 3rd Editions

There's additional solution for 2nd and 3rd Edition : LightBlue library.

from lightblue import *
 
device=finddevices()
This page was last modified on 31 May 2013, at 01:03.
21 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×