Comments (27)
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.
from blueducky.
same
from blueducky.
Same - with internal RPI4 BT Device and an Cambridge Stick.
from blueducky.
Confirmed. Same issue. RPI4 Asus BT adapter.
from blueducky.
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
from blueducky.
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
from blueducky.
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
from blueducky.
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 ?
from blueducky.
I do apologise, I did not see the screenshot.
from blueducky.
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.
from blueducky.
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
from blueducky.
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 ?
from blueducky.
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
from blueducky.
Do I need to do this every time I wanna use it or only once ?
from blueducky.
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
from blueducky.
Which chipset does your wireless adaptor have ?
from blueducky.
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
from blueducky.
# 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.
from blueducky.
Same for me …
I also contacted the developer on Discoed but he does not respond as he has said ..
from blueducky.
在带有 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
from blueducky.
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 )
from blueducky.
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.
from blueducky.
And how exactly did you do that ?
from blueducky.
#!/bin/bash
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
from blueducky.
or just remove the return False in the script, it is working for me
from blueducky.
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
from blueducky.
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
from blueducky.
Related Issues (20)
- *NOT AN ISSUE ITS A QUESTION* can i run the script on virtual box linux or i need real linux operation system ?
- E: Unable to locate package install ERROR HOT 3
- Not completing script and getting stuck HOT 12
- How can I solve this?(ERROR-Unable to set adapter name) HOT 5
- how to solve ERROR - ERROR connecting on port 17: [Errno 111] HOT 17
- PROBLEM WITH sudo python3 BlueDucky.py command HOT 8
- Error with Bluetooth adaptor csr 4.0 HOT 3
- New payloads
- Error: Can't change local name on hci0: Network is down (100) HOT 1
- RUNNING ON MAC OS
- error after running script
- 2024-05-30 13:34:57,205 - ERROR - [TX-19] Bluetooth error: [Errno 104] Connection reset by peer HOT 1
- No module named 'bluetooth'
- Adapter not compatibale!!! HOT 1
- No {blue}Bluetooth adapters{reset} have been detected HOT 2
- Thank You in Advance from everyone to creator: TUTORIAL on install succesfully
- ConnectionFailureException: Failed to set name HOT 1
- requerments
- Blue ducky HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blueducky.