BlueZ-5.66

Introduction à BlueZ

Le paquet BlueZ contient la pile de protocole Bluetooth pour Linux.

This package is known to build and work properly using an LFS 11.3 platform.

Informations sur le paquet

  • Téléchargement (HTTP) : https://www.kernel.org/pub/linux/bluetooth/bluez-5.66.tar.xz

  • Téléchargement (FTP) :

  • Somme de contrôle MD5 : 3f9496fedf878fba985e56713ed7752e

  • Taille du téléchargement : 2,2 Mo

  • Estimation de l'espace disque requis : 149 Mo (avec les tests)

  • Estimation du temps de construction : 0,4 SBU (avec parallélisme = 4 ; avec les tests)

Téléchargements supplémentaires

Dépendances de BlueZ

Requises

dbus-1.14.6, GLib-2.74.5 et libical-3.0.16

Facultatives

docutils-0.19 (pour générer les pages de manuel)

Notes utilisateur : https://wiki.linuxfromscratch.org/blfs/wiki/bluez

Configuration du noyau

Si vous construisez ce paquet pour utiliser des appareils bluetooth (plutôt qu'en tant que dépendance), activez les options suivantes dans la configuration du noyau, ainsi que les options de la section « API cryptographique » si vous voulez lancez les tests, et recompilez le noyau si nécessaire :

General Setup --->
  [ /*] Configure standard kernel features (expert users)   [CONFIG_EXPERT]
    (Note: if CONFIG_EXPERT is disabled, the following options will be
           hidden and enabled implicitly.  We DO NOT recommend to enable
           CONFIG_EXPERT unless you are really an expert user.)
    [*] Enable timerfd() system call                        [CONFIG_TIMERFD]
    [*] Enable eventfd() system call                        [CONFIG_EVENTFD]

[*] Networking support --->                [CONFIG_NET]
  <*/M> Bluetooth subsystem support --->   [CONFIG_BT]
    <*/M> RFCOMM protocol support          [CONFIG_BT_RFCOMM]
    [*]   RFCOMM TTY support               [CONFIG_BT_RFCOMM_TTY]
    <*/M> BNEP protocol support            [CONFIG_BT_BNEP]
    [*]   Multicast filter support         [CONFIG_BT_BNEP_MC_FILTER]
    [*]   Protocol filter support          [CONFIG_BT_BNEP_PROTO_FILTER]
    <*/M> HIDP protocol support            [CONFIG_BT_HIDP]
        Bluetooth device drivers --->
          (Select the appropriate drivers for your Bluetooth hardware)

   <*/M> RF switch subsystem support ----  [CONFIG_RFKILL]

-*- Cryptographic API --->
   Crypto core or helper --- >
      <*/M> User-space cryptographic algorithm configuration   [CONFIG_CRYPTO_USER]
   Block ciphers --->
      <*/M> AES (Advanced Encryption Standard)                 [CONFIG_CRYPTO_AES]
   AEAD (authenticated encryption with associated data) ciphers --->
      <*/M> CCM (Counter with Cipher Block Chaining-MAC)       [CONFIG_CRYPTO_CCM]
   Hashes, digests, and MACs --->
      <*/M> CMAC (Cipher-based MAC)                            [CONFIG_CRYPTO_CMAC]
   Userspace interface --->
      <*/M> Hash algorithms                                    [CONFIG_CRYPTO_USER_API_HASH]
      <*/M> Symmetric key cipher algorithms                    [CONFIG_CRYPTO_USER_API_SKCIPHER]
      <*/M> AEAD cipher algorithms                             [CONFIG_CRYPTO_USER_API_AEAD]

Installation de BlueZ

Maintenant, effectuez quelques changements requis pour les systèmes SystemV :

patch -Np1 -i ../bluez-5.66-obexd_without_systemd-1.patch

Installez BlueZ en exécutant les commandes suivantes :

./configure --prefix=/usr         \
            --sysconfdir=/etc     \
            --localstatedir=/var  \
            --enable-library      \
            --disable-manpages    \
            --disable-systemd     &&
make

Pour tester les résultats, tapez : make check.

Maintenant, en tant qu'utilisateur root :

make install &&
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin

Installez le fichier principal de configuration en tant qu'utilisateur root :

install -v -dm755 /etc/bluetooth &&
install -v -m644 src/main.conf /etc/bluetooth/main.conf

Si vous le souhaitez, installez la documentation de l'API en tant qu'utilisateur root :

install -v -dm755 /usr/share/doc/bluez-5.66 &&
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.66

Explication des commandes

--disable-manpages : ce paramètre désactive la génération des pages de manuel à cause de la dépendance à « rst2man » de docutils. Supprimez ce paramètre si vous avez installé docutils-0.19 et souhaitez générer les pages de manuel.

--enable-library :: Ce paramètre active la construction de la bibliothèque de compatibilité BlueZ 4 qui est requises par certaines applications.

--disable-systemd : Ce paramètre est nécessaire car systemd ne fait pas partie de LFS/BLFS. Si vous utilisez systemd, enlevez ce paramètre.

ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin : Cette commande donne accès au démon bluetooth de façon plus cohérente.

Configuration de BlueZ

Fichiers de configuration

/etc/bluetooth/main.conf est installé automatiquement pendant l'installation. En supplément, il y a trois fichiers de configuration en plus. /etc/sysconfig/bluetooth est installé comme une partie des scripts de démarrage. De plus, vous pouvez éventuellement installer la suite en tant qu'utilisateur root :

cat > /etc/bluetooth/rfcomm.conf << "EOF"
# Start rfcomm.conf
# Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
# Use one line per command
# See the rfcomm man page for options


# End of rfcomm.conf
EOF
cat > /etc/bluetooth/uart.conf << "EOF"
# Start uart.conf
# Attach serial devices via UART HCI to BlueZ stack
# Use one line per device
# See the hciattach man page for options

# End of uart.conf
EOF

Scripts de démarrage

Pour démarrer automatiquement le démon bluetoothd quand le système est redémarré, installez le script de démarrage /etc/rc.d/init.d/bluetooth depuis le paquet blfs-bootscripts-20230101.

make install-bluetooth

Contenu

Programmes installés: bluemoon, bluetoothctl, bluetoothd (lien symbolique), btattach, btmon, hex2hcd, l2ping, l2test, mpris-proxy et rctest
Bibliothèque installée: libbluetooth.so
Répertoires installés: /etc/bluetooth, /usr/{include,libexec}/bluetooth et /usr/share/doc/bluez-5.66

Descriptions courtes

bluemoon

est un utilitaire de configuration de Bluemoon

bluetoothctl

est le programme de contrôle interactif de Bluetooth

bluetoothd

est le démon Bluetooth

btmon

fournit l'accès à l'infrastructure de surveillance de Bluetooth pour lire les traces HCI

hex2hcd

est utilisé pour convertir un fichier utilisé par les périphériques Broadcom au format hcd (Broadcom bluetooth firmware)

l2ping

est utilisé pour envoyer des demandes d'écho L2CAP à l'adresse MAC Bluetooth donné en notation hexadécimale

l2test

est le programme de tests de L2CAP

rctest

est utilisé pour tester les communications RFCOMM de la pile Bluetooth

libbluetooth.so

contient les fonctions de l'API de BlueZ 4