BlueZ-5.72

Introduksjon til BlueZ

BlueZ pakken inneholder Bluetooth protokollstabel for Linux.

Denne pakken er kjent for å bygge og fungere riktig ved å bruke en LFS 12.1 plattform.

Pakkeinformasjon

BlueZ Avhengigheter

Påkrevd

dbus-1.14.10, GLib-2.78.4, og libical-3.0.17

Valgfri

docutils-0.20.1 (for å generere man sider)

Kjernekonfigurasjon

Hvis du bygger denne pakken for å bruke bluetooth enheter (i stedet for som en byggeavhengighet), aktiverer følgende alternativer i kjernekonfigurasjonen, også alternativene i Cryptographic API seksjonen hvis du har tenkt å kjøre testene, og kompilere kjernen på nytt om nødvendig:

General setup --->
  # If it is disabled, [TIMERFD] and [EVENTFD] will be hidden and
  # enabled implicitly.  We DO NOT recommend to enable [EXPERT]
  # unless you are really an expert user:
  [ /*] Configure standard kernel features (expert users) --->          [EXPERT]
    [*] Enable timerfd() system call                                   [TIMERFD]
    [*] Enable eventfd() system call                                   [EVENTFD]

[*] Networking support --->                                                [NET]
  <*/M> Bluetooth subsystem support --->                                    [BT]
    [*]   Bluetooth Classic (BR/EDR) features                         [BT_BREDR]
    <*/M>   RFCOMM protocol support                                  [BT_RFCOMM]
    [*]       RFCOMM TTY support                                 [BT_RFCOMM_TTY]
    <*/M>   BNEP protocol support                                      [BT_BNEP]
    [*]       Multicast filter support                       [BT_BNEP_MC_FILTER]
    [*]       Protocol filter support                     [BT_BNEP_PROTO_FILTER]
    <*/M>   HIDP protocol support                                      [BT_HIDP]
    Bluetooth device drivers --->
      # Select the appropriate drivers for your bluetooth hardware.
      # There are more vendor-specific drivers not listed here:
      < /*/M> HCI USB driver                                       [BT_HCIBTUSB]
      < /*/M> HCI SDIO driver                                     [BT_HCIBTSDIO]
      < /*/M> HCI UART driver                                       [BT_HCIUART]
  <*/M> RF switch subsystem support --->                                [RFKILL]

-*- Cryptographic API --->                                              [CRYPTO]
  Crypto core or helper --->
    <*/M> Userspace cryptographic algorithm configuration          [CRYPTO_USER]
  Block ciphers --->
    <*/M> AES (Advanced Encryption Standard)                        [CRYPTO_AES]
  AEAD (authenticated encryption with associated data) ciphers --->
    <*/M> CCM (Counter with Cipher Block Chaining-MAC)              [CRYPTO_CCM]
  Hashes, digests, and MACs --->
    <*/M> CMAC (Cipher-based MAC)                                  [CRYPTO_CMAC]
  Userspace interface --->
    <*/M> Hash algorithms                                 [CRYPTO_USER_API_HASH]
    <*/M> Symmetric key cipher algorithms             [CRYPTO_USER_API_SKCIPHER]
    <*/M> AEAD cipher algorithms                          [CRYPTO_USER_API_AEAD]

Installasjon av BlueZ

Installer BlueZ ved å kjøre følgende kommandoer:

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

For å teste resultatene, kjør: make check.

Nå, som root bruker:

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

Installer hovedkonfigurasjonsfilen som root bruker:

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

Hvis ønskelig, installer API dokumentasjonen som root bruker:

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

Parameterforklaringer

--disable-manpages: Denne bryteren deaktiverer generering av manualsidene på grunn av avhengigheten av 'rst2man' i docutils. Fjern denne bryteren hvis du har docutils-0.20.1 installert og ønsker å generere manualsidene.

--enable-library: Denne bryteren gjør det mulig å bygge BlueZ 4 kompatibilitetsbibliotek som kreves av noen applikasjoner.

ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin: Denne kommandoen gjør tilgangen til bluetooth nissen mer praktisk.

Konfigurere BlueZ

Konfigurasjonsfiler

/etc/bluetooth/main.conf installeres automatisk under installasjonen. I tillegg er det to tilleggs konfigurasjonsfiler. Du kan eventuelt installere følgende filer som root bruker:

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

Systemd Bluez Tjenester

For å starte bluetoothd nissen ved oppstart, aktiver den tidligere installerte systemd enheten ved å kjøre følgende kommando som root bruker:

systemctl enable bluetooth

For å starte obexd nissen for en brukerøkt (for å støtte noen Bluetooth programmer som bruker det), aktiverer den tidligere installerte systemd enheten for alle brukere ved å kjøre følgende kommando som root bruker:

systemctl enable --global obex
[Note]

Note

Systemd vil starte Bluetooth nissen bare når en bluetooth enhet oppdages på systemet.

Innhold

Installerte Programmer: bluemoon, bluetoothctl, bluetoothd (symlink), btattach, btmon, hex2hcd, l2ping, l2test, mpris-proxy, og rctest
Installert Bibliotek: libbluetooth.so
Installerte Mapper: /etc/bluetooth, /usr/{include,libexec}/bluetooth, og /usr/share/doc/bluez-5.72

Korte Beskrivelser

bluemoon

er et Bluemoon konfigurasjonsverktøy

bluetoothctl

er det interaktive Bluetooth kontrollprogrammet

bluetoothd

er Bluetooth nissen

btmon

gir tilgang til Bluetooth undersystemmonitoren infrastruktur for lesing av HCI spor

hex2hcd

brukes til å konvertere en fil som trengs av Broadcom enheter til hcd format (Broadcom bluetooth firmware).

l2ping

brukes til å sende en L2CAP ekkoforespørsel til Bluetooth MAC adresse oppgitt i stiplet sekskantet notasjon

l2test

er et L2CAP testprogram

rctest

brukes til å teste RFCOMM kommunikasjon på Bluetooth stabelen

libbluetooth.so

inneholder BlueZ 4 API funksjoner