Adding Bluetooth Python extension module -PyBluez in linux code running on Imx6q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding Bluetooth Python extension module -PyBluez in linux code running on Imx6q

843 Views
divyardharan
Contributor III

Hi All,

I wants to run a test app for bluetooth in python in imx 6q Sabre S board.

The os is linux.

I tried to run simple python program for printing Hello was successfull.

But when I tried to run the Test app,for bluetooth i got error.

So i downloaded PyBluez-0.20 and tried to execute the command  python setup.py install

But I got error like compiler not found.

Could anyone help me to resolve this?

My program shown below


#!usr/bin python

import bluetooth

target_name = "My Phone"

target_address = None

nearby_devices = bluetooth.discover_devices()

for bdaddr in nearby_devices:

  if target_name == bluetooth.lookup_name( bdaddr ):

  target_address = bdaddr

  break

if target_address is not None:

  print "found target bluetooth device with address ", target_address

else:

  print "could not find target bluetooth device nearby"

Regards

Divya

Labels (1)
Tags (2)
0 Kudos
0 Replies