Soluciones de problemas de Bluetooth

Dzickus, Hhlp, Devurandom Versión 37,38 Last review: 2023-09-04

Bluetooth es un protocolo inalámbrico de corto alcance que se utiliza para conectar diversos dispositivos de E/S de bajo ancho de banda (como teclados, ratones y auriculares). Las versiones más recientes tienen un modo de bajo consumo con un ancho de banda y un alcance ligeramente superiores.

La solución Bluetooth está compuesta de un demonio de espacio de usuario, bluetoothd, que comunica a través de un puerto de gestión dentro del núcleo para los controladores de hardware. Aplicaciones que desean comunicar con el demonio bluetoothd sobre un API d-bus. Esto incluye los varios applet bluetooth de GNOME.

Identificar Problemas con Bluetooth

¿Fue encontrado el hardware bluetooth?

  • asegúrese que bluetooth fue encontrado y habilitado (nota hci0: y 'UP RUNNING'):

    $ hciconfig
    hci0:	Tipo: Bus primario: USB
    	Dirección BD: xx:xx:xx:xx:xx:xx  ACL MTU: 1021:4  SCO MTU: 96:6
    	HASTA EJECUCIÓN DE PSCAN
    	RX bytes:15047 acl:0 sco:0 eventos:2433 errors:0
    	TX bytes:599323 acl:0 sco:0 instrucciones:2431 errores:0
  • Si el comando no devuelve nada (no hcl: info), entonces hay un asunto de hardware

    $ lsusb -v | grep Bluetooth | grep DeviceProtocol
    bDeviceProtocol         1 Bluetooth
  • Si el comando lsusb no devuelve nada, no hay hardware, una salida de dmesg sería necesaria

  • Si los comandos lsusb devuelven Bluetooth, entonces marque para unidad adjuntada

    $ lsusb -t | grep Wireless
        |__ Port 4: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 4: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
  • If Driver is empty, lsusb -v output would be needed to add ids

  • If hciconfig shows output but not UP

    $ hciconfig up
  • List of paired devices:

    $ bluetoothctl
    [bluetooth]# show
    [bluetooth]# devices
    [bluetooth]# info <la dirección de mac de cualquier dispositivo tiene problemas>

Is the bluetoothd daemon running?

  • Verify under systemd bluetooth is 'Active' and 'enabled'

    $ systemctl status bluetooth
    ● bluetooth.service - Bluetooth service
       Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2017-10-04 16:07:40 EDT; 1 day 22h ago
         Docs: man:bluetoothd(8)
     Main PID: 27427 (bluetoothd)
       Status: "Running"
        Tasks: 1 (limit: 4915)
       CGroup: /system.slice/bluetooth.service
               └─27427 /usr/libexec/bluetooth/bluetoothd
  • Verify obex is configured to run (to transfer files from phone)

    $ systemctl --global --user is-enabled obex
    enabled

Depuración simple

Most bluetooth problems happen in the bluez package (bluetoothd), ie the userspace daemon.

  • Enabling bluetoothd debugging

    $ \<edit\> /usr/lib/systemd/system/bluetooth.service
    \<add '-d' to ExecStart line as option to bluetoothd\>
    \<save and quit\>
    $ systemctl daemon-reload
    $ systemctl restart bluetooth

    Debugging is enabled and can help pinpoint where some of the bluetooth problems are

  • Capture the logs to put in bugzilla report

    $ journalctl -r -u bluetooth > /tmp/bluetoothd.out

Resolving firmware problems

It happens that the firmware of bluetooth adapters enters a state where it is unable to pair with a certain (or all) bluetooth devices. You might be able to resolve such problems by resetting your adapter.

In the case of a laptop with a built-in bluetooth adapter this might be achieved by:

  1. Enter the laptop’s firmware settings (BIOS) and disable the built-in adapter

  2. Save settings and restart the laptop

  3. Enter the firmware settings a second time and enable the bluetooth adapter again

  4. Guardar y reiniciar

  5. Ahora pruebe emparejar el dispositivo de nuevo