LethalEthan / Bluetooth-Unlock

Simple script to unlock your Linux based Computer using a Bluetooth device when nearby
MIT License
57 stars 19 forks source link

Not working on Manjaro Rolling (5.10.56-1-MANJARO)(GNOME 40.3.0) #29

Open Netherquark opened 3 years ago

Netherquark commented 3 years ago

Describe the bug I'm fairly noobish with Manjaro, its not even been a week since I installed it, and I'm a novice coder too. So I don't really know what went wrong exactly. I do however, have logs.

To Reproduce Just run install.sh on Manjaro I guess?

Expected behaviour It installs and works OOB

Logs

Cloning into 'Bluetooth-Unlock'...
remote: Enumerating objects: 798, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 798 (delta 31), reused 10 (delta 8), pack-reused 733
Receiving objects: 100% (798/798), 311.90 KiB | 877.00 KiB/s, done.
Resolving deltas: 100% (412/412), done.
    ~  cd Bluetooth-Unlock                                              ✔ 
    ~/Bluetooth-Unlock    BU-V1-Stable  sudo pacman -S python3 python3-pip bluetooth libbluetooth-dev tar
warning: python-3.9.6-1 is up to date -- reinstalling
error: target not found: python3-pip
error: target not found: bluetooth
error: target not found: libbluetooth-dev
warning: tar-1.34-1 is up to date -- reinstalling
    ~/Bluetooth-Unlock    BU-V1-Stable  yay -S python3 python3-pip bluetooth libbluetooth-dev tar   
warning: python-3.9.6-1 is up to date -- reinstalling
warning: tar-1.34-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) python-3.9.6-1  tar-1.34-1

Total Download Size:    0.80 MiB
Total Installed Size:  55.47 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 python-3.9.6-1-x86_64 is up to date
 tar-1.34-1-x86_64     817.2 KiB  1625 KiB/s 00:01 [######################] 100%
 Total (2/2)           817.2 KiB   879 KiB/s 00:01 [######################] 100%
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) reinstalling python                          [######################] 100%
(2/2) reinstalling tar                             [######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the info directory file...
 -> Could not find all required packages:
    python3-pip (Target)
    bluetooth (Target)
    libbluetooth-dev (Target)
    ~/Bluetooth-Unlock    BU-V1-Stable  pip install pybluez      ✔   
Defaulting to user installation because normal site-packages is not writeable
Collecting pybluez
  Downloading PyBluez-0.23.tar.gz (97 kB)
     |████████████████████████████████| 97 kB 5.4 MB/s 
Using legacy 'setup.py install' for pybluez, since package 'wheel' is not installed.
Installing collected packages: pybluez
    Running setup.py install for pybluez ... done
Successfully installed pybluez-0.23
    ~/Bluetooth-Unlock    BU-V1-Stable  sudo ./install.sh
=============================================
Bluetooth Unlock Tool For Linux Distributions
            Setup Version V.8.1              
=============================================

 Setup will start in: 4
Distribution: ManjaroLinux
Unsupported system please install dependencies yourself, sorry for the inconvenience
Dependencies: python3 python3-pip bluetooth libbluetooth-dev tar
PIP Dependencies: pybluez
If you feel this OS should be supported please create a feature request in the issue section
Install has worked!
Failed to set capabilities on file `/usr/bin/l2ping' (No such file or directory)
usage: setcap [-h] [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
 -r          remove capability from file
 -           read capability text from stdin
 <capsN>     cap_from_text(3) formatted file capability

 -h          this message and exit status 0
 -q          quietly
 -v          validate supplied capability matches file
 -n <rootid> write a user namespace limited capability
 --license   display the license info
    ~/Bluetooth-Unlock    BU-V1-Stable  python3 Bluetooth-Unlock.py
Python 3 has been detected you may continue

Would you like to check for an update? [Y/N] Y
Downloading Update.ini from GitHub...
Done!

(03/11/2020 18:50):- Bluetooth-Unlock V1 Now has a full release 

Would you like to see the available desktop environments? [Y/N] Y
GNOME has not been found
MATE has not been found
XSCREENSAVER has not been found

Please Enter your Desktop Environment can be:
"LOGINCTL" (Recommended) (Don't use sudo)
"KDE" (Doesn"t work on older versions)
"GNOME"
"XSCREENSAVER"
"MATE"
"CINNAMON"
GNOME
GNOME has been selected

Bluetooth-Unlock is a free open-source project and always will be
I would like you to consider donating to allow me to do other projects
The donation links are on the website: https://lethalethan.github.io/Bluetooth-Unlock/
Thanks :)

Would you like to activate debug mode? [Y/N] N
DEBUG is not active

Thank you for using Bluetooth-Unlock 9.1 netherquark 

Searching for nearby devices...

[] 

Enter Bluetooth Address of the device (e.g AA:BB:CC:DD:EE:FF): DB:52:98:45:0C:93

Thank you to these contributors: jose1711, maaudrana, blackPanther OS, jellykells, chfanghr
Thanks to all of them :)

Bluetooth-Unlock is now active!
Traceback (most recent call last):
  File "/home/netherquark/Bluetooth-Unlock/Bluetooth-Unlock.py", line 364, in <module>
    main_bu_code()
  File "/home/netherquark/Bluetooth-Unlock/Bluetooth-Unlock.py", line 301, in main_bu_code
    check = subprocess.Popen(["l2ping", DEVADDR, "-t", "1", "-c", "1"], shell=False, stdout=subprocess.PIPE)
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'l2ping'

Desktop (please complete the following information):

Additional context Probably somewhat irrelevant, but my bluetooth dongle is a TP-Link UB400(BT4), and the device I wanted to connect was my Mi Band 4 (DB:52:98:45:0C:93). The dongle works perfectly with everything else OOB on both Ubuntu and Manjaro. It even supported Xiaomi Blaze Unlock on Windows 10.

LethalEthan commented 3 years ago

The libraries were not installed correctly, I presume they are named differently for your distribution. I am currently not really able to give much help or support atm due to current circumstances I am going through. But I can assure you I will be making a V2 which will be much better in design and far more secure and stable than V1.

Netherquark commented 3 years ago

alright sure

Hope you can make the best of your circumstances and I hope things get better for you

serafeimg commented 1 year ago

I managed to install BU.V1 in Manjaro by activating the Third Party AUR support in Pamac. Kernel version: Linux 6.1.31-2-MANJARO Gnome version: 44.1

When I execute it via the terminal and set the address of my Bluetooth smartwatch, I get this error:

Can't create socket: Operation not permitted ping response code: 1

Netherquark commented 1 year ago

I think back when I tested this, the AUR package wasn't present. Not sure.