Eu fiz algo que não sei como consertar e agora preciso de ajuda. Eu estava tentando fazer o bluetooth funcionar, então eu instalei o Bluez 5.39 com o bluez-5.39.tar.xz da página de download com o ./configure
, make
e sudo make install
. (Eu não gosto de instalar coisas desse jeito, e eu não deveria ter feito isso.) Isso não resolveu o problema: ele não estava conseguindo criar uma conexão LE. Então eu decidi desinstalar o Bluez 5.39. (Por que ???)
Do diretório bluez-5.39, executei sudo make uninstall
. E então o verdadeiro problema começou: link para a imagem da mensagem "Bluetooth está desativado" no Ubuntu System Settings . Ativar ou desativar o Bluetooth não afeta a mensagem no lado esquerdo.
Isso é o que a desinstalação fez, e eu só notei que arquivos importantes haviam desaparecido quando já era tarde demais.
bluez-5.39$ sudo make uninstall
( cd '/usr/bin' && rm -f bluetoothctl btmon hciattach hciconfig hcitool hcidump rfcomm rctest l2test l2ping sdptool ciptool bccmd bluemoon hex2hcd mpris-proxy )
( cd '/usr/lib/cups/backend' && rm -f bluetooth )
( cd '/etc/dbus-1/system.d' && rm -f bluetooth.conf )
( cd '/usr/share/dbus-1/services' && rm -f org.bluez.obex.service )
( cd '/usr/share/dbus-1/system-services' && rm -f org.bluez.service )
( cd '/usr/libexec/bluetooth' && rm -f bluetoothd obexd )
( cd '/usr/share/man/man1' && rm -f hciattach.1 hciconfig.1 hcitool.1 hcidump.1 rfcomm.1 rctest.1 l2ping.1 sdptool.1 ciptool.1 bccmd.1 hid2hci.1 )
( cd '/usr/share/man/man8' && rm -f bluetoothd.8 )
( cd '/lib/udev/rules.d' && rm -f 97-hid2hci.rules )
( cd '/lib/systemd/system' && rm -f bluetooth.service )
( cd '/usr/lib/systemd' && rm -f obex.service )
( cd '/lib/udev' && rm -f hid2hci )
Tentando consertar a bagunça que fiz, fiz o seguinte:
$ sudo apt-get --reinstall install bluez bluez-alsa bluez-audio bluez-btsco bluez-compat bluez-cups bluez-dbg bluez-gstreamer bluez-hcidump bluez-pcmcia-support bluez-tools bluez-utils python-bluez bluewho indicator-bluetooth libbluetooth-dev libgnome-bluetooth11 libbluetooth3 python-gobject python-dbus
E isso me causou um erro de dependência.
Então eu fiz:
$ sudo apt-get build-dep bluetooth
E instalou bluez
, bluez-alsa:amd64
, bluez-gstreamer
, bluez-audio
, bluez-dbg
, indicator-bluetooth
.
E o seguinte parece ter sido instalado corretamente:
$ sudo apt-get --reinstall install bluez-btsco bluez-compat bluez-cups bluez-gstreamer bluez-hcidump bluez-pcmcia-support bluez-tools bluez-utils python-bluez bluewho libbluetooth-dev libgnome-bluetooth11 libbluetooth3 python-gobject python-dbus
Eu tentei pesquisar no Google o arquivo bluetooth.conf
padrão, mas não o encontrei e acredito que não seja a única coisa que está faltando.
Atualmente, dmesg | grep -i blue
envia o seguinte no terminal:
$ dmesg | grep -i blue
[ 3.394321] Bluetooth: Core ver 2.20
[ 3.394342] Bluetooth: HCI device and connection manager initialized
[ 3.394346] Bluetooth: HCI socket layer initialized
[ 3.394349] Bluetooth: L2CAP socket layer initialized
[ 3.394356] Bluetooth: SCO socket layer initialized
[ 4.084818] Bluetooth: RFCOMM TTY layer initialized
[ 4.084824] Bluetooth: RFCOMM socket layer initialized
[ 4.084828] Bluetooth: RFCOMM ver 1.11
[ 4.120553] init: bluetooth main process (811) terminated with status 1
[ 4.120566] init: bluetooth main process ended, respawning
[ 4.186711] init: bluetooth main process (924) terminated with status 1
[ 4.186720] init: bluetooth main process ended, respawning
[ 4.201162] init: bluetooth main process (935) terminated with status 1
[ 4.201176] init: bluetooth main process ended, respawning
[ 4.212252] init: bluetooth main process (946) terminated with status 1
[ 4.212266] init: bluetooth main process ended, respawning
[ 4.224325] init: bluetooth main process (960) terminated with status 1
[ 4.224334] init: bluetooth main process ended, respawning
[ 4.239237] init: bluetooth main process (973) terminated with status 1
[ 4.239251] init: bluetooth main process ended, respawning
[ 4.248063] init: bluetooth main process (982) terminated with status 1
[ 4.248077] init: bluetooth main process ended, respawning
[ 4.256712] init: bluetooth main process (991) terminated with status 1
[ 4.256725] init: bluetooth main process ended, respawning
[ 4.265736] init: bluetooth main process (1000) terminated with status 1
[ 4.265751] init: bluetooth main process ended, respawning
[ 4.274191] init: bluetooth main process (1009) terminated with status 1
[ 4.274207] init: bluetooth main process ended, respawning
[ 4.283039] init: bluetooth main process (1018) terminated with status 1
[ 4.283048] init: bluetooth respawning too fast, stopped
Quando tento bluetoothd
no terminal, nada acontece, mas /var/log/syslog
obtém isso:
bluetoothd[3517]: Bluetooth daemon 4.101
bluetoothd[3517]: Unable to get on D-Bus
A questão ficou bastante longa porque estou tentando detalhar o que fiz até agora. (E eu não estou usando nenhum adaptador USB para bluetooth).
Existe algum outro log que eu precise postar?
Linha de fundo: como fazer o bluetooth funcionar novamente?