飞凌OK113i 您所在的位置:网站首页 8761蓝牙驱动 飞凌OK113i

飞凌OK113i

2024-05-27 00:43| 来源: 网络整理| 查看: 265

启动系统蓝牙服务bluetoothd,使其在后台运行 bluetoothd -d -n & root@ok113i:/# bluetoothd[1516]: Bluetooth daemon 5.50 bluetoothd[1516]: src/adapter.c:adapter_init() sending read version command bluetoothd[1516]: Starting SDP server bluetoothd[1516]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0532 bluetoothd[1516]: src/plugin.c:plugin_init() Loading builtin plugins bluetoothd[1516]: src/plugin.c:add_plugin() Loading hostname plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading wiimote plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading autopair plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading policy plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading neard plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading sap plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading a2dp plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading avrcp plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading network plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading input plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading hog plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading health plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading gap plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading scanparam plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading deviceinfo plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading midi plugin bluetoothd[1516]: src/plugin.c:add_plugin() Loading battery plugin bluetoothd[1516]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins bluetoothd[1516]: src/plugin.c:add_plugin() Loading sixaxis plugin bluetoothd[1516]: profiles/health/hdp.c:hdp_manager_start() Starting Health manager bluetoothd[1516]: profiles/input/suspend-none.c:suspend_init() bluetoothd[1516]: profiles/network/manager.c:read_config() Config options: Security=true bluetoothd[1516]: kernel lacks bnep-protocol support bluetoothd[1516]: System does not support network plugin bluetoothd[1516]: plugins/neard.c:neard_init() Setup neard plugin bluetoothd[1516]: plugins/sixaxis.c:sixaxis_init() bluetoothd[1516]: src/main.c:main() Entering main loop bluetoothd[1516]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 0 soft 0 hard 0 bluetoothd[1516]: Bluetooth management interface 1.14 initialized bluetoothd[1516]: src/adapter.c:read_version_complete() sending read supported commands command bluetoothd[1516]: src/adapter.c:read_version_complete() sending read index list command bluetoothd[1516]: src/adapter.c:read_commands_complete() Number of commands: 65 bluetoothd[1516]: src/adapter.c:read_commands_complete() Number of events: 35 bluetoothd[1516]: src/adapter.c:read_commands_complete() enabling kernel-side connection control bluetoothd[1516]: src/adapter.c:read_index_list_complete() Number of controllers: 0 root@ok113i:/#

通过bluetoothctl对蓝牙设备操作,主要包括:蓝牙设备信息打印查看,蓝牙设备开启和关闭、蓝牙外设扫描、查看扫描到的蓝牙外设设备、配对连接等,下面实例命令行中##开头的行是注释

进入bluetoothctl

root@ok113i:/# bluetoothctl bluetoothd[1516]: src/agent.c:agent_ref() 0x8c9338: ref=1 bluetoothd[1516]: src/agent.c:register_agent() agent :1.1 Agent registered

蓝牙设备信息打印查看

[bluetooth]#show Controller 2C:C3:E6:67:4D:3C (public)

Name: BlueZ 5.50 Alias: BlueZ 5.50 Class: 0x00000000 Powered: no Discoverable: no Pairable: yes UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) Modalias: usb:v1D6Bp0246d0532 Discovering: no 蓝牙设备开启和关闭

[bluetooth]#power on [bluetooth]# [ 417.686414] rtk_btusb: btusb_open start bluetoothd[1516]: src/adapter.c:[ 417.691880] rtk_btusb: btusb_open hdev->promisc ==0 property_set_mode() sending Set [ 417.700202] rtk_btusb: download_patch start Powered command for index 0 [ 417.707637] rtk_btusb: chip type value: 0x71 [ 417.714939] rtk_btusb: HCI reset. [ 417.727699] rtk_btusb: read_ver_rsp->lmp_subver = 0xa133 [ 417.733654] rtk_btusb: read_ver_rsp->hci_rev = 0x82a8 [ 417.739344] rtk_btusb: patch_entry->lmp_sub = 0x8723 [ 417.744905] rtk_btusb: Firmware already exists [ 417.749914] rtk_btusb: Rtk patch end 1 [ 417.754125] rtk_btusb: btusb_open set HCI_RUNNING [ 417.759504] rtk_btcoex: Open BTCOEX [ 417.763412] rtk_btusb: btusb_open end [ 417.769720] rtk_btcoex: BTCOEX hci_rev 0x82a8 [ 417.774656] rtk_btcoex: BTCOEX lmp_subver 0xa133 bluetoothd[1516]: src/adapter.c:property_set_mode_complete() Success (0x00) bluetoothd[1516]: src/adapter.c:new_settings_callback() Settings: 0x00000ad1 bluetoothd[1516]: src/adapter.c:settings_changed() Changed settings: 0x00000001 bluetoothd[1516]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled bluetoothd[1516]: src/adapter.c:trigger_passive_scanning() Changing power on succeeded [CHG] Controller 2C:C3:E6:67:4D:3C Powered: yes

蓝牙设备开启和关闭

[bluetooth]#scan on [bluetooth]#scan off

查看扫描到的蓝牙外设设备

[bluetooth]#devices Device F1:22:33:1A:48:9B F1-22-33-1A-48-9B Device C4:DE:E2:DF:E8:22 Keep_CC_50200973 Device 34:29:EF:5B:D2:D3 34-29-EF-5B-D2-D3 Device E8:F5:63:87:03:9D Mi Band 3 Device B8:8C:29:87:72:C9 midea Device 04:7F:0E:40:4A:BD BEIJING-EU5 Device CC:B5:D1:FB:45:3A SMI-M14 Device 45:B8:CC:87:53:F8 45-B8-CC-87-53-F8 Device 84:7C:9B:6D:FF:11 midea_db_2943 Device 10:9E:3A:92:2E:DA �方�糖(80:7A)

配对连接

[bluetooth]#connect 10:9E:3A:92:2E:DA Attempting to connect to 10:9E:3A:92:2E:DA bluetoothd[1516]: src/device.c:connect_profiles() /org/bluez/hci0/dev_10_9E_3A_92_2E_DA (all), client :1.2 bluetoothd[1516]: profiles/audio/a2dp.c:a2dp_sink_connect() path /org/bluez/hci0/dev_10_9E_3A_92_2E_DA bluetoothd[1516]: a2dp-sink profile connect failed for 10:9E:3A:92:2E:DA: Protocol not available Failed to connect: org.bluez.Error.Failed



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有