Note: there's not much point in reading this - just skip back to some documentation that works and carry on from there.
The documentation says that you need a machine running Linux and BlueZ 4 with at least one Bluetooth interface.
I'm slightly impressed that it claims to work as a Man-in-the-middle with only one interface, but that does keep things simpler.
To get things going, I ran:
# aptitude install bluez{,-utils} {libbluetooth,python}-dev # mkdir btproxy # cd btproxy # wget https://github.com/conorpp/btproxy/blob/master/setup.py # python setup.py install
This failed with:
File "setup.py", line 7 <!DOCTYPE html> ^ SyntaxError: invalid syntax
Okay, so that's clearly not the way to download a Python script from github (despite that being the URL you get if you hover on the "setup.py" link…)
Try again:
# wget https://github.com/conorpp/btproxy/raw/master/setup.py # python setup.py install Traceback (most recent call last): File "setup.py", line 3, in <module> from setuptools import Extension,setup ImportError: no module named setuptools
So, a further inauspicious lack of progress. It has at least downloaded a Python script this time, but it doesn't work.
# aptitude search setuptools p python-setuptools - Python Distutils Enhancements (setuptools compatibility) v python2.6-setuptools - v python2.7-setuptools - p python3-setuptools - Python3 Distutils Enhancements (setuptools compatibility) v python3.2-setuptools -
Aha - the documentation fails to mention installing this bit…
# aptitude install python-setuptools # python setup.py install Traceback (most recent call last): File "setup.py", line 36, in <module> long_description=read('README.md').replace('#',''), File "setup.py", line 6, in read return open(os.path.join(os.path.dirname(__file__), fname)).read() IOError: [Errno 2] No such file or directory: 'README.md'
Urgh. Let's download the whole lot then, if that's what's needed…
# wget https://github.com/conorpp/btproxy/archive/master.zip # unzip master.zip # cd btproxy-master # python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files ... followed by quite a bit more output, ending with: Installed /usr/local/lib/python2.7/dist-packages/btproxy-0.1-py2.7-linux-x86_64.egg Processing dependencies for btproxy==0.1 Searching for pybluez>=0.21 Reading http://pypi.python.org/simple/pybluez/ Couldn't find index page for 'pybluez' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for pybluez>=0.21 error: Could not find suitable distribution for Requirement.parse('pybluez>=0.21')
So, it looks like a I need another Python library not mentioned in the requirements…
# aptitude install python-bluez # python setup.py install ... precisely the same error message as last time.
https://packages.debian.org/jessie/python-bluez reveals that there's no point in trying this on anything lower than Debian Stretch (since the installer is looking for version >= 0.21; Jessie has version 0.20 and Wheezy doesn't even have the package at all).
So, let's find a machine running Stretch and start all over again.
Go up
Return to main index.