comice-control-center icon indicating copy to clipboard operation
comice-control-center copied to clipboard

some bluetooth error?

Open alxb421 opened this issue 3 years ago • 3 comments

pear@PearBook-Air:~/comice-control-center$ ./comice-control-center 
cat: /sys/class/bluetooth/hci0/rfkill3/state: No such file or directory
Traceback (most recent call last):
  File "./comice-control-center", line 71, in do_activate
    connection_box = ConnectionsBox()
  File "/home/pear/comice-control-center/comicecontrolcenter/widgets/connection_box.py", line 65, in __init__
    bluetooth = BluetoothInformation()
  File "/home/pear/comice-control-center/comicecontrolcenter/functions/bluetooth_information.py", line 17, in __init__
    powered_on = int(result)
ValueError: invalid literal for int() with base 10: ''

Maybe I did something wrong?

alxb421 avatar Mar 17 '21 19:03 alxb421

same issue for me too @alxb421

kyrus7 avatar Jun 23 '21 11:06 kyrus7

For me at least the problem was here: the state of BT is getting this file /sys/class/bluetooth/hci0/rfkill3/state, in my case i had no rfkill3. So I went to the folder and looked what rfkill do I have. Turns out I have rfkill2 there so you just change that in python file.

Dyrkon avatar Jul 06 '21 21:07 Dyrkon

Hi guys! @alxb421 @kyrus7 @Dyrkon I'm a noob in terms of Bluetooth... I'm trying to understand the rfkill concept.

Can you share me the full path of bluetooth state file? In my case is /sys/class/bluetooth/hci0/rfkill3/state but can be different in your machines or devices. So with that data i can improve the code to recognize better the state of the bluetooth.

You can open a file manager (nautilus, thunar, etc... or with terminal using cat command). And view the content of something similar in the folder /sys/class/bluetooth/<device>/<userspace>/ and find inside the state file the value saved on it.

Regards!

libredeb avatar Jul 23 '21 00:07 libredeb

For me at least the problem was here: the state of BT is getting this file /sys/class/bluetooth/hci0/rfkill3/state, in my case i had no rfkill3. So I went to the folder and looked what rfkill do I have. Turns out I have rfkill2 there so you just change that in python file.

could you please Dyrkon explain to me how did you do that step by step? thanks in advance

saeedx1418 avatar Dec 18 '22 13:12 saeedx1418

pear@PearBook-Air:~/comice-control-center$ ./comice-control-center 
cat: /sys/class/bluetooth/hci0/rfkill3/state: No such file or directory
Traceback (most recent call last):
  File "./comice-control-center", line 71, in do_activate
    connection_box = ConnectionsBox()
  File "/home/pear/comice-control-center/comicecontrolcenter/widgets/connection_box.py", line 65, in __init__
    bluetooth = BluetoothInformation()
  File "/home/pear/comice-control-center/comicecontrolcenter/functions/bluetooth_information.py", line 17, in __init__
    powered_on = int(result)
ValueError: invalid literal for int() with base 10: ''

Maybe I did something wrong?

if you modify the file ~/comice-control-center/comicecontrolcenter/functions/bluetooth_information.py on line 14, this """cat /sys/class/bluetooth/hci0/rfkill2/state""" to this " ""cat /sys/class/bluetooth/hci0/rfkill*/state""" and updating all BT services should work

natone2 avatar Dec 21 '22 12:12 natone2

also u can modify the hci0 for hci* because the BT controllers in Linux normaly have this prefix

natone2 avatar Dec 21 '22 12:12 natone2

Fixed!

libredeb avatar Mar 22 '23 03:03 libredeb