BlueZ-5.66
Configuração do Núcleo
Se você estiver construindo esse pacote para usar dispositivos
"bluetooth" (em vez de uma dependência de construção), [então]
habilite as seguintes opções na configuração do núcleo, também as
opções na seção “Cryptographic API” se você pretende executar
os testes e recompile o núcleo, se necessário:
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]
Instalação do "BlueZ"
Agora, faça algumas mudanças necessárias para sistemas "SystemV":
patch -Np1 -i ../bluez-5.66-obexd_without_systemd-1.patch
Instale BlueZ executando os
seguintes comandos:
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-library \
--disable-manpages \
--disable-systemd &&
make
Para testar os resultados, emita: make check
.
Agora, como o(a) usuário(a) root
:
make install &&
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin
Instale o principal arquivo de configuração como o(a) usuário(a)
root
:
install -v -dm755 /etc/bluetooth &&
install -v -m644 src/main.conf /etc/bluetooth/main.conf
Se desejado, [então] instale a documentação da "API" como o(a)
usuário(a) root
:
install -v -dm755 /usr/share/doc/bluez-5.66 &&
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.66
Explicações do Comando
--disable-manpages
: Essa
chave desabilita a geração de páginas de manual por causa da
dependência de 'rst2man' em "docutils". Remova essa chave se você
tiver docutils-0.19 instalado e desejar gerar as
páginas de manual.
--enable-library
: Essa
chave habilita construir a biblioteca de compatibilidade
BlueZ 4 que é exigida por alguns
aplicativos.
--disable-systemd
: Essa
chave é necessária porque o systemd não é parte do LFS/BLFS. Se você
estiver usando o "systemd", [então] remova essa chave.
ln -svf
../libexec/bluetooth/bluetoothd /usr/sbin: Esse
comando torna o acesso ao processo de segundo plano "bluetooth"
mais conveniente.
Configurando o "BlueZ"
Arquivos de
Configuração
/etc/bluetooth/main.conf
é
instalado automaticamente durante a instalação. Além disso,
existem três arquivos de configuração suplementares.
"/etc/sysconfig/bluetooth" é instalado como parte do script de
inicialização abaixo. Além disso, você pode opcionalmente
instalar o seguinte, como o(a) usuário(a) root
:
cat > /etc/bluetooth/rfcomm.conf << "EOF"
# Início rfcomm.conf
# Configura a configuração "RFCOMM" do subsistema "Bluetooth" no núcleo Linux.
# Usa uma linha por comando
# Veja-se a página de manual do "rfcomm" para opções
# Fim do rfcomm.conf
EOF
cat > /etc/bluetooth/uart.conf << "EOF"
# Início uart.conf
# Anexa dispositivos seriais via "UART HCI" à pilha "BlueZ"
# Usa uma linha por dispositivo
# Veja-se a página de manual do "hciattach" para opções
# Fim do uart.conf
EOF
Script de Inicialização
Para iniciar automaticamente o processo de segundo plano
bluetoothd quando o
sistema for reinicializado, instale o script de inicialização
/etc/rc.d/init.d/bluetooth
originário do pacote blfs-bootscripts-20230101.
make install-bluetooth
Conteúdo
Aplicativos Instalados:
bluemoon, bluetoothctl, bluetoothd (link
simbólico), btattach, btmon, hex2hcd, l2ping, l2test,
mpris-proxy e rctest
Biblioteca Instalada:
libbluetooth.so
Diretórios Instalados:
/etc/bluetooth,
/usr/{include,libexec}/bluetooth e
/usr/share/doc/bluez-5.66
Descrições Curtas
bluemoon
|
é um utilitário de configuração do "Bluemoon"
|
bluetoothctl
|
é o aplicativo interativo de controle do "Bluetooth"
|
bluetoothd
|
é o processo de segundo plano "Bluetooth"
|
btmon
|
fornece acesso à infraestrutura do monitor do subsistema
"Bluetooth" para leitura de rastreamentos "HCI"
|
hex2hcd
|
é usado para converter um arquivo necessário para
dispositivos "Broadcom" para o formato "hcd" ("Broadcom
bluetooth firmware")
|
l2ping
|
é usado para enviar uma solicitação de eco "L2CAP" para o
endereço "MAC" do "Bluetooth" fornecido em notação
hexadecimal com pontos
|
l2test
|
é um aplicativo de teste "L2CAP"
|
rctest
|
é usado para testar as comunicações "RFCOMM" na pilha
"Bluetooth"
|
libbluetooth.so
|
contém as funções de "API" do BlueZ 4
|