명령줄에서 Bluez 버전을 찾는 방법은 무엇입니까?

명령줄에서 Bluez 버전을 찾는 방법은 무엇입니까?

UI 없이 일부 사용자 정의 Linux 배포판을 사용하고 있습니다. 명령줄을 통해 Bluez 버전을 확인하고 싶습니다. 이것이 어떻게 달성될 수 있습니까?

답변1

대략적인 아이디어가 있거나 지난 10년 동안의 내용을 다룰 수 있는 경우 bluez버전을 요청할 수 있는 도구를 제공해 주세요. bluez-uils안타깝게도 이러한 도구는 버전 4와 버전 5 사이에서 변경되었으므로 둘 중 하나가 설치되어 있는지 확인해야 할 수도 있습니다.

BlueZ 4.0의 경우:

bluetoothd --version

BlueZ 5.0부터 새로운 명령줄 도구가 있습니다 bluetoothctl.

bluetoothctl --version

답변2

Bluez는 libbluetooth.so라는 공유 라이브러리를 제공합니다. x86_64 배포판에서는 이 파일을 찾을 수 있으므로 다음 을 /usr/lib64/수행하십시오.ls -la

$ls -la /usr/lib64/libbluetooth.so
lrwxrwxrwx 1 root root 22 Jan 17 12:44 /usr/lib64/libbluetooth.so -> libbluetooth.so.3.17.0

내 경우에는 버전을 사용하고 있습니다.3.17.0

readelf(1)일부 정보도 제공될 수 있습니다.

답변3

/usr/share/doc/bluez/ChangeLog.내 배포판(Fedora 21)에서 less찾을 수 있습니다. 또는 유사한 것으로 읽어 볼 수도 있습니다.

답변4

systemd를 사용하는 경우 다음을 사용하여 BlueZ 버전을 실행할 수 있습니다 systemctl.

sudo systemctl status bluetooth

다음과 같이 출력됩니다.

bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; 
vendor preset: enabled)
Active: active (running) since Wed 2018-07-25 13:00:52 UTC; 14min ago
Docs: man:bluetoothd(8)
Main PID: 471 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
        └─471 /usr/libexec/bluetooth/bluetoothd

Jul 25 13:00:52 raspberrypi systemd[1]: Starting Bluetooth service...
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Bluetooth daemon 5.50
Jul 25 13:00:52 raspberrypi systemd[1]: Started Bluetooth service.
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Starting SDP server
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Bluetooth management interface 1.14 initialized

이렇게 하면 올바른 버전을 실행하고 있다고 100% 확신할 수 있습니다.

관련 정보