Resolving Bluetooth adapter identification problems in a Python script on Ubuntu
Resolving Bluetooth adapter identification problems in a Python script on Ubuntu
I'm facing a problem with my Python project on Ubuntu, specifically related to Bluetooth communication with an Android or Linux device. The script named project-script.py is supposed to set up a Bluetooth adapter and run various commands. However, it's failing because the system can't locate the adapter 'hci1'. The output when I try to run it shows: vboxuser@ubuntu:~/Downloads/hi_my_name_is_keyboard-main$ ./project-script.py -i hci1 -t 5C:F3:70:AA:07:BD [2024-01-15 15:37:39.259] executing 'sudo service bluetooth restart' [sudo] password for vboxuser: [2024-01-15 15:37:45.538] configuring Bluetooth adapter [2024-01-15 15:37:45.550] calling RegisterProfile [2024-01-15 15:37:45.558] running dbus loop [2024-01-15 15:37:45.560] Unable to find adapter 'hci1', aborting. I've confirmed the adapter is properly connected and the system recognizes it, but after restarting the service and checking permissions, it still doesn't detect hci1. I tried to clarify my situation on January 15, 2024.