Closed jan10000000001 closed 5 years ago
You have to install the bluez-dev package and it's python bindings (the name of those packages depends on your distro). In case your distribution doesn't package the python bindings, you can install them from PyPi.
Note this package currently only works with python 3, therefore you need the python 3 version of the bindings.
Once all requirements are installed, you can clone this repo, connect your bluetooth device to your computer (the process of doing that depends on the tools installed) and run the script by specifying the mac of your device:
$ git clone https://github.com/Thor77/Blueproximity
$ cd Blueproximity
$ python3 -m blueproximity -m <mac of your connected bluetooth device>
now i can start it but what is the next step if kill my connection the programm close it after some times no lock ps mir fehlten ein haufen programme wo ich nicht wusste das ich sie brauchte
python-bluez bluez bluez-hcidump libbluetooth-dev libboost-python-dev libboost-thread-dev libglib2.0-dev
If your device disconnects, it should try to reconnect it. Is there any error message once the program closes? But yeah, it doesn't run the lock command once your device disconnects, just when it is still connected but out of the specified range... that's probably something it should do
Yeah, those are the ones I meant by python bindings, I guess they were all installed as a dependency of python-bluez/bluez, weren't they?
i have tried it with pylluez to install but i get a lot of errors so i ask a friend what you mean with bindings and then i aks him with the errors and he mean i need the packages
root@debian:/home/jan/Blueproximity# python3 -m blueproximity -m XX:XX:XX:XX:XX:XX,
[2018-09-06 23:39:22,409] DEBUG - Could connect on port 1
[2018-09-06 23:39:23,698] INFO - Starting daemon for "BluetoothDevice(mac=XX:XX:XX:XX:XX:XX, port=1, name=Boss, connected=True)"
[2018-09-06 23:39:23,710] DEBUG - Current distance: 0
[2018-09-06 23:40:23,777] DEBUG - Current distance: 1
[2018-09-06 23:40:23,778] INFO - Running command for new state lock
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jan/Blueproximity/blueproximity/main.py", line 45, in
Ah, that's a problem with the command it tries to run. You have to specify a custom config with a custom command then:
[Lock]
distance=7
duration=7
command=<a command of your choice it runs once your device is out of range>
[Unlock]
distance=4
duration=1
command=<a command of your choice it runs once your device is in range>
Save those lines as test.cfg (replace the command) and start Blueproximity with python -m blueproximity -m ... -c test.cfg
Please reopen if your question is not answered.
i dont check from the read read me or other files how i install the complete programm oder how i start it