Hi All.
I have install all Bluetooth software in Rasbian
sudo apt-get bluetooth bluez-utils python-bluetooth
if I use it in a Python on terminal all work fine:
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import bluetooth
>>> devices = bluetooth.discover_devices()
>>> print (devices)
['2C:D0:5A:88:92:E1']
>>>
but if I use the same code in a new program in HG with a path definition like:
import sys
sys.path.append("/usr/lib/python2.7/")
sys.path.append("/usr/lib/python2.7/dist-packages")
sys.path.append("/usr/lib/python2.7/dist-packages/bluetooth")
import bluetooth
devices = bluetooth.discover_devices()
I have this error: global name 'discover_devices' is not defined
I also test to define all path that I have on Python out of HG where the code run but I have the same problem.
Any idea?
MArco