首页 文章

BlueZ错误:Sap驱动程序初始化失败

提问于
浏览
2

我试图解决这个问题已经筋疲力尽了 . 我似乎无法在BlueZ 5.27中运行示例GATT服务器 . 我正在运行连接到Broadcom BCM20702A0蓝牙4.0 USB加密狗的Linux VM(内核= 3.16) . 我可以使用相关的命令运行hciconfig,hcitool和gatttool,这些正常工作 . 我开始使用广告,

sudo hciconfig hci0 leadv

但是,当我尝试运行BLe GATT服务器时,

bluetoothd -d -n

我得到以下输出:

bluetoothd[8075]: Bluetooth daemon 5.27
bluetoothd[8075]: src/gatt.c:gatt_init() Starting GATT server
bluetoothd[8075]: src/adapter.c:adapter_init() sending read version command
bluetoothd[8075]: Starting SDP server
bluetoothd[8075]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:051b
bluetoothd[8075]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[8075]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading gatt_example plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading neard plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading sap plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading a2dp plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading avrcp plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading hog plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading health plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading gap plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading alert plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading time plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading proximity plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading thermometer plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading heartrate plugin
bluetoothd[8075]: src/plugin.c:add_plugin() Loading cyclingspeed plugin
bluetoothd[8075]: src/plugin.c:plugin_init() Loading plugins /home/vagrant/bluez-5.27/plugins/.libs
bluetoothd[8075]: src/plugin.c:add_plugin() Loading external_dummy plugin
bluetoothd[8075]: profiles/health/hdp.c:hdp_manager_start() Starting Health manager
bluetoothd[8075]: profiles/input/suspend-dummy.c:suspend_init() 
bluetoothd[8075]: profiles/input/suspend-dummy.c:suspend_init() Created suspend-dummy FIFO on /tmp/hogsuspend
bluetoothd[8075]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[8075]: plugins/neard.c:neard_init() Setup neard plugin
bluetoothd[8075]: plugins/external-dummy.c:dummy_init() 
bluetoothd[8075]: src/main.c:main() Entering main loop
bluetoothd[8075]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 2 op 0 soft 0 hard 0
bluetoothd[8075]: Bluetooth management interface 1.6 initialized
bluetoothd[8075]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[8075]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[8075]: src/adapter.c:read_commands_complete() Number of commands: 47
bluetoothd[8075]: src/adapter.c:read_commands_complete() Number of events: 23
bluetoothd[8075]: src/adapter.c:read_index_list_complete() Number of controllers: 1
bluetoothd[8075]: src/adapter.c:read_index_list_complete() Found index 0
bluetoothd[8075]: src/adapter.c:index_added() index 0
bluetoothd[8075]: src/adapter.c:btd_adapter_new() System name: BlueZ 5.27
bluetoothd[8075]: src/adapter.c:btd_adapter_new() Major class: 0
bluetoothd[8075]: src/adapter.c:btd_adapter_new() Minor class: 0
bluetoothd[8075]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d051B
bluetoothd[8075]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
bluetoothd[8075]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
bluetoothd[8075]: src/adapter.c:index_added() sending read info command for index 0
bluetoothd[8075]: src/adapter.c:read_info_complete() index 0 status 0x00
bluetoothd[8075]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
bluetoothd[8075]: src/attrib-server.c:btd_adapter_gatt_server_start() Start GATT server in hci0
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0001
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0004
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0006
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0007
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0008
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001800-0000-1000-8000-00805f9
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0010
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001801-0000-1000-8000-00805f9
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: profiles/audio/a2dp.c:media_server_probe() path /org/bluez/hci0
bluetoothd[8075]: plugins/hostname.c:hostname_probe() 
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0009, UUID a002, 4 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0009
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x000a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000b
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000c
bluetoothd[8075]: plugins/gatt-example.c:register_manuf1_service() start_handle=0x0011
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0011
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0012
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0013
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0014
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0015
bluetoothd[8075]: plugins/gatt-example.c:register_manuf2_service() start_handle=0x0016
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0016
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0017
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0018
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0019
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001a
bluetoothd[8075]: plugins/gatt-example.c:register_termometer_service() start_handle=0x001b manuf1=0x0011-0x0015, manuf2=0x0016-0x001a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001b
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001c
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001d
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001e
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x001f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0020
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0021
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0022
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0023
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0024
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0025
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000a004-0000-1000-8000-00805f9
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: plugins/gatt-example.c:register_vendor_service() start_handle=0x000d
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000d
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000e
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x000f
bluetoothd[8075]: plugins/gatt-example.c:register_weight_service() start_handle=0xfffa, vendor=0x000d-0x000f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xfffa
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xfffb
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xfffc
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xfffd
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xfffe
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0xffff
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10004
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID feee74dc-a8de-3196-1149-d43596c
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0026, UUID 1803, 3 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0026
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0027
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0027
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0028
bluetoothd[8075]: profiles/proximity/linkloss.c:link_loss_register() Link Loss service added
bluetoothd[8075]: profiles/proximity/reporter.c:register_tx_power() start_handle=0x0029
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0029
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002b
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002c
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x002d, UUID 1802, 3 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002d
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x002e
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002e
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x002f
bluetoothd[8075]: profiles/proximity/immalert.c:imm_alert_register() Immediate Alert service added
bluetoothd[8075]: profiles/proximity/reporter.c:reporter_adapter_probe() Proximity Reporter for adapter 0x95ebf28
bluetoothd[8075]: profiles/time/server.c:time_server_init() path /org/bluez/hci0
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0030, UUID 1805, 6 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0030
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0031
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0031
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0032
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0033
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0034
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0034
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0035
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0036, UUID 1806, 5 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0036
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0037
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0037
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0038
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0039
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0039
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003a
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x003b, UUID 180e, 9 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003b
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x003c
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003c
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003d
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003e
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x003f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x003f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0040
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0041
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0041
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0042
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0043
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New service: handle 0x0044, UUID 1811, 13 attributes
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0044
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0045
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0045
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0046
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x0047
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0047
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0048
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0049
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x004a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004a
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004b
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x004c
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004c
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004d
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004e
bluetoothd[8075]: attrib/gatt-service.c:gatt_service_add() New characteristic: handle 0x004f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x004f
bluetoothd[8075]: src/attrib-server.c:attrib_db_add_new() handle=0x0050
bluetoothd[8075]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
bluetoothd[8075]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
bluetoothd[8075]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
bluetoothd[8075]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
bluetoothd[8075]: profiles/audio/avrcp.c:avrcp_controller_server_probe() path /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10005
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110f-0000-1000-8000-00805f9
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: profiles/audio/avrcp.c:avrcp_target_server_probe() path /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10006
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[8075]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0
bluetoothd[8075]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0
bluetoothd[8075]: profiles/sap/manager.c:sap_server_probe() path /org/bluez/hci0
**bluetoothd[8075]: Sap driver initialization failed.**
**bluetoothd[8075]: sap-server: Operation not permitted (1)**
bluetoothd[8075]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
bluetoothd[8075]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
bluetoothd[8075]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[8075]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[8075]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[8075]: src/adapter.c:load_connections() sending get connections command for index 0
bluetoothd[8075]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[8075]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[8075]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 51b
bluetoothd[8075]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
bluetoothd[8075]: src/adapter.c:set_dev_class() sending set device class command for index 0
bluetoothd[8075]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[8075]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[8075]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled
bluetoothd[8075]: src/adapter.c:trigger_passive_scanning() 
bluetoothd[8075]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
bluetoothd[8075]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0
bluetoothd[8075]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
**bluetoothd[8075]: hci0 Load Connection Parameters failed: Unknown Command (0x01)**
bluetoothd[8075]: src/adapter.c:get_connections_complete() Connection count: 0
bluetoothd[8075]: plugins/hostname.c:property_changed() static hostname: jessie-i386
bluetoothd[8075]: plugins/hostname.c:property_changed() pretty hostname: 
bluetoothd[8075]: plugins/hostname.c:update_name() name: jessie-i386
bluetoothd[8075]: src/adapter.c:adapter_set_name() name: jessie-i386
bluetoothd[8075]: src/adapter.c:adapter_set_name() alias: jessie-i386
bluetoothd[8075]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[8075]: plugins/hostname.c:property_changed() chassis: vm
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Name: BlueZ 5.27
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Short name: 
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Current alias: BlueZ 5.27
bluetoothd[8075]: src/attrib-server.c:attrib_db_update() handle=0x0006
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Name: jessie-i386
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Short name: 
bluetoothd[8075]: src/adapter.c:local_name_changed_callback() Current alias: jessie-i386
bluetoothd[8075]: src/attrib-server.c:attrib_db_update() handle=0x0006

Sap驱动程序无法初始化,我猜这会导致hci0适配器无法加载连接参数(请参阅输出) .

BlueZ 5.27堆栈是根据源代码构建的,如下所示:

./configure CFLAGS="$CFLAGS -Wno-sign-compare -Wno-format-security" --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --disable-systemd --enable-experimental --enable-maintainer-mode
make
sudo make install

在构建和安装期间未报告任何错误 .

为什么Sap驱动程序无法初始化?

感谢您的任何帮助,您可以提供 .

1 回答

  • 1

    重新安装后,似乎已经纠正了 . 为了其他人的利益,我列出了我的安装方式,并运行了GATT服务器示例:

    我的环境:

    • Vagrant

    • 虚拟盒子

    • Ubuntu Trusty Tahr作为客户操作系统(v.14.04 32位操作系统)

    • 已更新至linux内核3.16

    安装包:

    libglib2.0-dev  
    libdbus-1-dev  
    libudev-dev  
    libical-dev  
    libreadline-dev
    

    从这里下载BlueZ 5.31:https://www.kernel.org/pub/linux/bluetooth/bluez-5.31.tar.xz
    安装更新的内核:

    sudo apt-get update  
    sudo apt-get install --install-recommends linux-generic-lts-utopic
    

    需要重新启动 . 我正在使用Vagrant并丢失共享文件夹访问权限 . 如果你遇到这种情况,请等待vagrant报告错误然后进入VM(vagrant ssh) . 在VM中,发出此命令以修复共享文件夹问题:

    sudo /etc/init.d/vboxadd setup
    

    我会重新启动(可能没有必要),以检查共享文件夹是否再次处于活动状态 .
    返回VM后,继续安装BlueZ 5.31:

    cd ~  
    sudo apt-get install libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline-dev  
    wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.31.tar.xz  
    tar xvf bluez-5.31.tar.xz  
    cd bluez-5.31  
    ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --disable-systemd --enable-experimental --enable-maintainer-mode  
    make  
    sudo make install  
    sudo cp attrib/gatttool /usr/bin
    

    安装完成 . 检查如下:

    hciconfig
    

    您应该得到以下回复(或类似的东西):

    hci0:   Type: BR/EDR  Bus: USB  
            BD Address: 00:1A:7D:DA:71:0C  ACL MTU: 310:10  SCO MTU: 64:8  
            DOWN  
            RX bytes:15528 acl:126 sco:0 events:683 errors:0  
            TX bytes:6459 acl:146 sco:0 commands:234 errors:0
    

    打开蓝牙适配器,开始做广告,启动示例GATT服务器(心率服务),并详细说明:

    sudo hciconfig hci0 up  
    sudo tools/btmgmt -i hci0 advertising on  
    tools/gatt-server -i hci0 -s low -t public -r -v
    

    转到另一台设备(我使用的是iPod和运行BlueZ的另一台PC,但Android设备出现问题)并连接到该服务 . 以下是我在运行BlueZ的另一台PC上的表现:

    gatttool -b **MAC address of GATT server** -I  
    connect  
    primary  
    characteristics
    

    您可以发出其他命令来读取和写入GATT服务器 .

    我喜欢这个论坛在这里找到很多答案 . 我希望这个小小的贡献可以帮助至少一个其他沮丧的开发人员 .

相关问题