2017-11-08 19 views
0

프로필을 등록하려면 bluetoothctl (bluez5.42)을 사용하려고합니다. 나는 아래 bluetoothctl 실행 RegisterProfile 호출시 org.freedesktop.DBus.Error.UnknownMethod 오류가 발생했습니다.

bluez-5.42/dev/client# ./bluetoothctl 
[NEW] Controller 00:50:43:22:29:D9 pe-lt571-0 [default] 
[bluetooth]# register-profile 00000017-0000-1000-8000-00805f9 
Failed to register profile: org.freedesktop.DBus.Error.UnknownMethod 

그냥 내가 리눅스 커널 4.4 오전 추가 할 수 있습니다. bluetoothctl을 시작하기 전에 bluetoothd를 실행했습니다. 또한 d-feet를 사용하여 동일한 작업을 수행했는지 확인했습니다. 동일한 오류가 발생했습니다.

왜 알 수없는 메서드 오류가 발생합니까? 설치 문제입니까?

은 내가 DBUS에 다음 org.bluez.GattManager1 DBUS 인터페이스에 RegisterProfile라는 방법은 없습니다

method call sender=:1.89 -> dest=org.bluez serial=20 path=/org/bluez/hci0; interface=org.bluez.GattManager1; member=RegisterProfile 
    object path "/org/bluez/profile" 
    array [ 
     string "00000100-0000-1000-8000-00805f9" 
    ] 
    array [ 
    ] 

답변

0

모니터링 얻을. bluez-5.42의 bluetoothctl 코드의 버그로 bluez-5.46으로 수정되었습니다. RegisterProfile 메소드는 org.bluez.ProfileManager1 인터페이스에 있습니다.

bluez-5.46 이상에서 bluetoothctl을 통한 등록 프로필이 존재하지 않습니다. 블루투스 프로파일을 등록하려면 bluez 소스 디렉토리에서 test/test-hfp python 스크립트를보십시오. org.bluez.ProfileManager1에서 RegisterProfile 메소드를 사용하는 방법을 보여줍니다. 또한이 인터페이스에서 사용할 수있는 메소드에 대해 알아 보려면 doc/profile-api.txt를 참조하십시오.

GATT 서비스를 등록하려면 bluez 소스의 test/test-gatt-profile python 스크립트 및 doc/gatt-api.txt를 참조하십시오.

+0

Ravi에게 감사드립니다. 사실 gatt-services.c의 RegisterApplication을 사용했습니다. – dfordevy