Open Aggelos11 opened 6 months ago
same
Same - with internal RPI4 BT Device and an Cambridge Stick.
Confirmed. Same issue. RPI4 Asus BT adapter.
I don’t think it’s the adaptor problem . The developer modified the script some days before and probably he broke something . He needs to fix it asap
I don’t think it’s the adaptor problem . The developer modified the script some days before and probably he broke something . He needs to fix it asap
Its a problem with your adapter. If you check BlueDucky.py, on Line: 640 We have a new Function Called "troubleshoot_bluetooth". The purpose of this function is to troubleshoot the adapters capability with bluetoothctl, if the adapter is not capatible with Bluetoothctl, or Bluetoothctl has been installed incorrectly you will be notified of whats preventing you from accessing the application. It is designed to keep people who are not capable of accessing the application later from accessing it initially..
Please Reference the code found in this function
# Check if bluetoothctl is available
try:
subprocess.run(['bluetoothctl', '--version'], check=True, stdout=subprocess.PIPE)
except subprocess.CalledProcessError:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: {blue}bluetoothctl {reset}is not installed or not working properly.")
return False
# Check for Bluetooth adapters
result = subprocess.run(['bluetoothctl', 'list'], capture_output=True, text=True)
if "Controller" not in result.stdout:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No {blue}Bluetooth adapters{reset} have been detected.")
return False
# List devices to see if any are connected
result = subprocess.run(['bluetoothctl', 'devices'], capture_output=True, text=True)
if "Device" not in result.stdout:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No Compatible {blue}Bluetooth devices{reset} are connected.")
return False
# if no issues are found then continue
return True
If you think this may be a mistake, please contact me via discord with anything that may help your problem if it does NOT concern your Bluetooth Adapter, If your Bluetooth adapter is not supported, Then it is NOT supported. You will need to use another device or purchase a new Adapter, and I will work with you to fix the problem | I apologize for any inconvenience. @youjsgotpwned
Well my Bluetooth adaptor is Asus USB-BT500 USB Bluetooth 5.0 . Do you know if I should install any drivers or something ? Because it recognised by Kali and I can scan for Bluetooth devices using the hcitool. Do you have any adaptor to suggest ?
I do apologise, I did not see the screenshot.
Well my Bluetooth adaptor is Asus USB-BT500 USB Bluetooth 5.0 . Do you know if I should install any drivers or something ? Because it recognised by Kali and I can scan for Bluetooth devices using the hcitool. Do you have any adaptor to suggest ?
within BlueDucky.py the original developer Hardcoded Hci0 causing issues. I added this to make debugging easier, I will make a modification to check for another Bluetooth adapter as it defaults to hci0. For now Please open BlueDucky.py and 'Control + F' and find hci0 and replace it with hci1.
Well my Bluetooth adaptor is Asus USB-BT500 USB Bluetooth 5.0 . Do you know if I should install any drivers or something ? Because it recognised by Kali and I can scan for Bluetooth devices using the hcitool. Do you have any adaptor to suggest ?
within BlueDucky.py the original developer Hardcoded Hci0 causing issues. I added this to make debugging easier, I will make a modification to check for another Bluetooth adapter as it defaults to hci0. For now Please open BlueDucky.py and 'Control + F' and find hci0 and replace it with hci1.
Doing what I described above, should resolve your issues. As right now its defaulting to an adapter that is DOWN
or currently Not Available. Feel free to contact me via discord: @youjsgotpwned
Yes but as you can see in the screenshot I sent I already replaced hci0 with hci1 in the line 674 I think where it says default=… . Should I replace it to other points as well ?
Also can you check if my adaptor is supported pls or not ? Because as I told you it can scan for Bluetooth devices using the the hcitool which I think it’s a sign that it should work
On raspberry Pi 5 with ubuntu server i solved with this:
Restart the bluetooth
sudo systemctl restart bluetooth
Start the process:
bluetoothctl
execute command:
power on
agent on
default-agent
scan on
Exit from bluetoothctl
exit
after that:
sudo python3 BlueDucky.py
will start.
Do I need to do this every time I wanna use it or only once ?
After BlueDucky.py crash, every time i need to make this command 2 times, after that BlueDucky.py start, but when it will crash i need to do it again. i mada a small script to speed up:
sudo nano reset.sh
#!/bin/bash
# Script per ripristinare il Bluetooth dopo un crash di BlueDucky.py
echo "Ripristino del Bluetooth in corso..."
sudo systemctl restart bluetooth
bluetoothctl power on
bluetoothctl agent on
bluetoothctl default-agent
bluetoothctl scan on
Add permission:
sudo chmod +x reset.sh
execute the script:
./reset.sh
Stop the script CTRL + C
Execute agin,stop again and start:
sudo python3 BlueDucky.py
Which chipset does your wireless adaptor have ?
the commands are working. with "bluetoothctl scan on" it found many bluetooth devices, like mobile phones and bluetooth speatker. the blueducky script found only my lge tv. i've tried it many times and with different adapters...
without the commands above, the adapters are not working -> no compatible adapters found
# List devices to see if any are connected result = subprocess.run(['bluetoothctl', 'devices'], capture_output=True, text=True) if "Device" not in result.stdout: print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No Compatible {blue}Bluetooth devices{reset} are connected.") return False
i've try it out... the command "bluetoothctl devices" is here empty at startup... the command "scan on" initiates the scan and add devices to the list, like this:
Device 48:E1:5C:76:34:B2 48-E1-5C-76-34-B2 Device 3E:55:13:F2:A9:72 3E-55-13-F2-A9-72 Device 74:FF:8F:4C:5E:76 74-FF-8F-4C-5E-76 Device 61:76:CB:39:FD:7F 61-76-CB-39-FD-7F Device 18:58:80:51:30:89 [LG] webOS TV UQ70006LB Device C4:35:34:37:12:75 Govee_H6072_1275 Device C4:42:25:D7:3B:34 T-Echo DG1FI-11 [bluetooth]#
but if i run blueducky, only my lge tv is listed- the other devices not.
Same for me … I also contacted the developer on Discoed but he does not respond as he has said ..
在带有 ubuntu 服务器的树莓派 5 上,我解决了这个问题:
重新启动蓝牙
sudo systemctl restart bluetooth
启动进程:
bluetoothctl
执行命令:
power on agent on default-agent scan on
退出bluetoothctl
exit
之后:
sudo python3 BlueDucky.py
将开始。
worked. my device is Pi ZERO 2W
It worked for me once but I need to repeat this process each time I want to run the script . Also most times it does not work ( does not find Bluetooth devices )
I had the same issue: {reset}[{red}!{reset}] {red}CRITICAL{reset}: No Compatible {blue}Bluetooth devices{reset} are connected.
I fixed it by connecting it to a Bluetooth device. After that, it worked just fine.
And how exactly did you do that ?
Script to unblock and restore Bluetooth after a crash of BlueDucky.py
echo "Restoring Bluetooth..." Unblock the Bluetooth device
if ! sudo rfkill unblock bluetooth; then echo "Failed to unblock Bluetooth device." exit 1 fi Bring up the Bluetooth interface
if ! sudo hciconfig hci1 up; then echo "Failed to bring up Bluetooth interface." exit 1 fi Restart the Bluetooth service
if ! sudo systemctl restart bluetooth; then echo "Failed to restart Bluetooth service." exit 1 fi Wait for the service to restart
sleep 5 Use bluetoothctl to configure Bluetooth
{ echo "power on" sleep 1 echo "agent off" sleep 1 echo "agent on" sleep 1 echo "default-agent" sleep 1 echo "scan on" sleep 5 } | bluetoothctl
echo "Bluetooth restored successfully." Delay before running the Python script
sleep 5 Run the Python script
if ! sudo python3 BlueDucky.py; then echo "Failed to run BlueDucky.py." exit 1 fi
exit 0
sudo nano restore_bluetooth.sh
sudo chmod +x restore_bluetooth.sh
or just remove the return False in the script, it is working for me
Can you explain it a bit more please ? Exactly what I need to do in which line etc?
or just remove the return False in the script, it is working for me
Can you explain it a bit more please ? Exactly what I need to do in which line etc?
or just remove the return False in the script, it is working for me
Here, I think it's near to line 640, the last return False, where it says before no compltatible bluetooth devices connected. Or you can also remove the complete if condition:
Check if bluetoothctl is available try: subprocess.run(['bluetoothctl', '--version'], check=True, stdout=subprocess.PIPE) except subprocess.CalledProcessError: print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: {blue}bluetoothctl {reset}is not installed or not working properly.") return False
# Check for Bluetooth adapters
result = subprocess.run(['bluetoothctl', 'list'], capture_output=True, text=True)
if "Controller" not in result.stdout:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No {blue}Bluetooth adapters{reset} have been detected.")
return False
# List devices to see if any are connected
result = subprocess.run(['bluetoothctl', 'devices'], capture_output=True, text=True)
if "Device" not in result.stdout:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No Compatible {blue}Bluetooth devices{reset} are connected.")
return False # HERE ....................... Remove this
# if no issues are found then continue
return True
Pada raspberry Pi 5 dengan server ubuntu saya selesaikan dengan ini:
Mulai ulang bluetoothnya
sudo systemctl restart bluetooth
Mulai prosesnya:
bluetoothctl
jalankan perintah:
power on agent on default-agent scan on
Keluar dari bluetoothctl
exit
setelah itu:
sudo python3 BlueDucky.py
akan dimulai.
good its work
On raspberry Pi 5 with ubuntu server i solved with this:
Restart the bluetooth
sudo systemctl restart bluetooth
Start the process:
bluetoothctl
execute command:
power on agent on default-agent scan on
Exit from bluetoothctl
exit
after that:
sudo python3 BlueDucky.py
will start.
Bro Alex you are amazing
can i run this on my laptop?
@alex8819 @mohamedmajid91 @Christiancoding @Flynnlin @Aggelos11 will this code run on my laptop?
After BlueDucky.py crash, every time i need to make this command 2 times, after that BlueDucky.py start, but when it will crash i need to do it again. i mada a small script to speed up:
sudo nano reset.sh
#!/bin/bash # Script per ripristinare il Bluetooth dopo un crash di BlueDucky.py echo "Ripristino del Bluetooth in corso..." sudo systemctl restart bluetooth bluetoothctl power on bluetoothctl agent on bluetoothctl default-agent bluetoothctl scan on
Add permission:
sudo chmod +x reset.sh
execute the script:
./reset.sh
Stop the script CTRL + C
Execute agin,stop again and start:
sudo python3 BlueDucky.py
Yours dont work so i made one:
# Restart Bluetooth service
echo "Restarting Bluetooth service..."
sudo systemctl restart bluetooth
# Start Bluetoothctl and execute commands
echo "Starting bluetoothctl and executing commands..."
(
echo "power on"
sleep 1
echo "agent on"
sleep 1
echo "default-agent"
sleep 1
echo "scan on"
sleep 5 # Adjust the delay as needed for scanning
echo "exit"
) | bluetoothctl
# Start BlueDucky.py
echo "Starting BlueDucky.py..."
sudo python3 BlueDucky.py
thank you for your guidance --- it worked for me
@Jaron-Wilson brother i get error port 17 refused error even in android 11 and I tried on android 9 its sends a pair passkey for pairing it doesn't work, any thing to fix? Or which bluez version i should install in my laptop?
Help me, I am trying from more then 3 weeks
The port 17 is that android and ios forced an update without permission, when you turn on your phone and don't restart it it does the update in background, I used ble low power mode and that's the one for watches and that works. Error port 17 is patched, and the people who made this only posted the code after it got patched.
@Jaron-Wilson Can you tell how you setup blueducky and bluez for this? which version of bluez you installed, when i tried on older device i get "ERROR - [TX-19] Bluetooth error: [Errno 104] Connection reset by peer" can you tell me how you setup this tool, bluez and blueducky, pybluez these
thank you for support brother
The port 17 is that android and ios forced an update without permission, when you turn on your phone and don't restart it it does the update in background, I used ble low power mode and that's the one for watches and that works. Error port 17 is patched, and the people who made this only posted the code after it got patched.
working with my orange pi 3b i test on a A10