데스크탑을 블루투스 헤드셋으로 사용 confirmation [agent] Confirm passkey 000000

내 데스크탑의 스피커가 휴대 전화보다 훨씬 우수하므로 핸드폰 대신 데스크탑 스피커를 사용하고 싶습니다. USB 또는 오디오 잭을 사용하는 것이 불편하므로 Bluetooth가 남아 있습니다. 을 사용하여 전화를 페어링 bluetoothctl했지만 연결하려고하면 다음과 같이 표시됩니다.

[bluetooth]# pair 00:00:00:00:00:00
Attempting to pair with 00:00:00:00:00:00
[CHG] Device 00:00:00:00:00:00 Connected: yes
Request confirmation
[agent] Confirm passkey 000000 (yes/no): yes
[CHG] Device 00:00:00:00:00:00 Modalias: bluetooth:a000Aa000000000
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
...
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 UUIDs: 000000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 Paired: yes
Pairing successful
[CHG] Device 00:00:00:00:00:00 Connected: no
[CHG] Device 00:00:00:00:00:00 RSSI: -75
[bluetooth]# connect 00:00:00:00:00:00
Attempting to connect to 00:00:00:00:00:00
Failed to connect: org.bluez.Error.Failed

맥 주소를로 바꾸 00:00:00:00:00:00었지만 실제 맥 주소는 전화로보고 된 주소와 일치합니다. UUIDs마지막 핀 이 무엇인지 전혀 알지 못하지만 페어링 핀, Modalias 및와 같은 작업을 수행했습니다 .



답변

pulseaudio* 이 두 가지 모듈 덕분에 bluez실제로 결합 하기가 실제로 쉽습니다.

필수 패키지를 설치하십시오.

sudo pacman -S bluez bluez-utils pulseaudio-bluetooth

사용자를 pulseaudio그룹에 추가하십시오 .

sudo usermod -a -G pulseaudio $USER

블루투스 데몬을 켜거나 재시작하십시오.

sudo systemctl restart bluetooth

블루투스 기기를 활성화합니다 :

sudo hciconfig hci0 up

블루투스 장치가 두 개 이상인 경우 hci0올바른 식별자로 바꾸어야 합니다. 올바른 식별자 hciconfig는 인수없이 실행 하여 찾을 수 있습니다 .

이제 대화식 bluetoothctl유틸리티를 사용하여 장치를 연결할 수 있습니다 .

먼저 아치 머신을 호스트 이름으로 검색 할 수있게합니다.

$ bluetoothctl
[NEW] Controller AA:BB:CC:DD:EE:FF arch [default]

[bluetooth]# agent on
Agent registered

[bluetooth]# default-agent
Default agent request successful

[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller AA:BB:CC:DD:EE:FF Discoverable: yes

휴대 전화에서 아치 상자를 검색 할 수 있습니다. 장치를 선택하고 프롬프트로 돌아가서 확인하십시오.

Request confirmation
[agent] Confirm passkey 748794 (yes/no): yes
[CHG] Device FF:EE:DD:CC:BB:AA ...
... snipped ...
[agent] Authorize service 0001... (yes/no): yes
... snipped ...
[agent] Authorize service 0001... (yes/no): yes
[CHG] Controller AA:BB:CC:DD:EE:FF Discoverable: no

trust연결 후 단순히 명령을 실행하여 해결 된 연결 끊기 문제가 있습니다.

[phone]# trust
[CHG] Device FF:EE:DD:CC:BB:AA Trusted: yes
Changing  trust suceeded

데스크톱 스피커를 통해 오디오를 재생할 수 있어야합니다.