Showing posts with label python bluetooth testing. Show all posts
Showing posts with label python bluetooth testing. Show all posts

Tuesday, November 29, 2011

Scan for bluetooth devices using python

scan for bluetooth devices using a python script. the below script can be used for performing the same. remember , you will have to install pybluez module (it is available for both windows and linux). now for the script , here you go!

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)


this will print the number of devices , address and name . this can be used as test script for a variety for reasons .

Wednesday, July 13, 2011

pybluez - bluetooth

For all who have been using python or who wanted to use python,
we can access RFCOMM profile via pybluez.
pybluez is the software supplied at code.google.com is a python wraper for bluetooth testing.
for now all the profiles are not supported ( read bluetooth related books/ postings for you to understand what profiles mean) . it supports only RFCOMM and L2CAP.
you can download it from the below.

http://code.google.com/p/pybluez