我试图解决这个问题已经筋疲力尽了 . 我似乎无法在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