您尚未登录。

楼主 # 2024-01-02 10:42:59

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

求助:RTL8723BS通过Buildroot移植Bluez5.56,Bluetooth工作不正常。

# killall dbus-daemon
# rm /run/messagebus.pid
# dbus-daemon --system --print-pid --print-address
unix:path=/run/dbus/system_bus_socket,guid=c605419e56c29689568f731600000049
499
# insmod hci_uart.ko
[   85.769096] Bluetooth: HCI UART driver ver 2.2.74e8f89.20210423-153941
[   85.769134] Blue# tooth: HCI H4 protocol initialized
[   85.769142] Bluetooth: HCI Realtek H5 protocol initialized
[   85.769151] rtk_btcoex: rtk_btcoex_init: version: 1.2
[   85.769158] rtk_btcoex: create workqueue
[   85.770358] rtk_btcoex: alloc buffers 1408, 2240 for ev and l2

# ./rtk_hciattach -n -s 115200 /dev/ttyS5 rtk_h5 &
# [  111.202955] of_dma_request_slave_channel: dma-names property of nRealtek Bluetootode '/h :Realtek Bluetooth init uart witsh init speed:115200, type:HCI UART H5
erial@ff4Realtek Bluetooth :Realtek hciattach version 3.1.dced3af.20210423-153942

Realtek Bluetooth :Use epoll
f0000' missing or empty
[  111.203055] dw-apbRealtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get S-YNC pkt
uart ff4f0000.serial: failed to reqRealtek Bluetooth :[CONFIG] Get CONFG pkt
Realtek Bluetooth :[CONFIG] Get CONFG resp pkt
Realtek Bluetooth :dic is 1, cfg field 0x14
Realtek Bluetooth :H5 init finished

Realtek Bluetooth :Realtek H5 IC
uest DMA, use interrupt mode
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x06
Realtek Bluetooth :HCI Revision 0x000b
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 01
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 1
Realtek Bluetooth :IC: RTL8723BS
Realtek Bluetooth :Firmware/config: rtl8723b_fw, rtl8723b_config
Realtek Bluetooth :Couldnt open extra config /opt/rtk_btconfig.txt, No such file or directory
Realtek Bluetooth :Couldnt access customer BT MAC file /opt/bdaddr
Realtek Bluetooth :Origin cfg len 55
Realtek Bluetooth :55 ab 23 87 31 00 f4 00 08 01 00 00 00 05 50 00
Realtek Bluetooth :00 0c 00 10 02 80 92 04 50 c5 ea 19 e1 1b f1 af
Realtek Bluetooth :5f 01 a4 0b 27 00 01 63 fe 00 01 01 5b 01 04 0b
Realtek Bluetooth :0b 0b 0a e3 01 01 00
Realtek Bluetooth :Config baudrate: 04928002
Realtek Bluetooth :uart flow ctrl: 1
Realtek Bluetooth :Vendor baud from Config file: 04928002
Realtek Bluetooth :New cfg len 55
Realtek Bluetooth :55 ab 23 87 31 00 f4 00 08 01 00 00 00 05 50 00
Realtek Bluetooth :00 0c 00 10 02 80 92 04 50 c5 ea 19 e1 1b f1 af
Realtek Bluetooth :5f 01 a4 0b 27 00 01 63 fe 00 01 01 5b 01 04 0b
Realtek Bluetooth :0b 0b 0a e3 01 01 00
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8723b_fw OK, size 51364
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 1
Realtek Bluetooth :FW version 0x373e6962, Patch num 3
Realtek Bluetooth :Chip id 0x0000
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Patch length 0x5c5c
Realtek Bluetooth :Start offset 0x00006c00
Realtek Bluetooth :Svn version:    13226
Realtek Bluetooth :Coexistence: BTCOEX_20140708-5240

Realtek Bluetooth :FW  exists, Config file  exists
Realtek Bluetooth :Total len 23699 for fwc
Realtek Bluetooth :baudrate in change speed command: 0x02 0x80 0x92 0x04
Realtek Bluetooth :Receive cmd complete event of command: fc17
Realtek Bluetooth :Received cc of vendor change baud
Realtek Bluetooth :Final speed 1500000
Realtek Bluetooth :end_idx: 94, lp_len: 11, additional pkts: 5

Realtek Bluetooth :Start downloading...
Realtek Bluetooth :Send additional packet 95
Realtek Bluetooth :Send additional packet 96
Realtek Bluetooth :Send additional packet 97
Realtek Bluetooth :Send additional packet 98
Realtek Bluetooth :Last packet 227
Realtek Bluetooth :Send last pkt
Realtek Bluetooth :Enable host hw flow control
Realtek Bluetooth :h5_hci_reset: Issue hci reset cmd
Realtek Bluetooth :Receive cmd complete event of command: 0c03
Realtek Bluetooth :Received cc of hci reset cmd
Realtek Bluetooth :Init Process finished
[  112.061727] Bluetooth: h5_open
[  112.061780] Bluetooth:Realtek Bluetoot hci_h :Realtek Bluetouaoth post processrt_register_dev

Realtek Bluetoot[  112.0h :Device setup c68101] rtk_btcoex: Opeonmplete BTCOEX

[  112.076785] rtk_btcoex: BTCOEX hci_rev 0x373e
[  112.076807] rtk_btcoex: BTCOEX lmp_subver 0x6962
[  112.106088] Bluetooth: __hci_uart_flush: hdev 71d3cf89 tty 968ae35f
[  112.165995] Bluetooth: hci_uart_close: hdev 71d3cf89
[  112.166047] Bluetooth: __hci_uart_flush: hdev 71d3cf89 tty 968ae35f
[  112.166076] rtk_btcoex: Close BTCOEX
[  112.166098] rtk_btcoex: -x

#
#
# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 84:20:96:B1:4D:92  ACL MTU: 820:8  SCO MTU: 255:16
        DOWN
        RX bytes:1079 acl:0 sco:0 events:31 errors:0
        TX bytes:678 acl:0 sco:0 commands:31 errors:0

# hciconfig hci0 up
Can't init device hci0: Unknown error 132 (22)
# echo 1 > /sys/class/rfkill/rfkill2/state
# hciconfig hci0 up
[  149.015170] rtk_btcoex: Open BTCOEX
[  149.281276] Bluetooth: hu c7caa0e2 retransmitting 1 pkts
[  149.283642] rtk_btcoex: BTCOEX hci_rev 0x373e
[  149.283673] rtk_btcoex: BTCOEX lmp_subver 0x6962
#
# cd /usr/libexec/bluetooth/
# ./bluetoothd -n -d &
# bluetoothd[515]: Bluetooth daemon 5.65
bluetoothd[515]: src/adapter.c:adapter_init() sending read version command
bluetoothd[515]: Starting SDP server
bluetoothd[515]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0541
bluetoothd[515]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[515]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading gap plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[515]: src/plugin.c:add_plugin() Loading battery plugin
bluetoothd[515]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[515]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[515]: src/main.c:main() Entering main loop
bluetoothd[515]: src/shared/mgmt.c:send_request() [0xffff] command 0x0001
bluetoothd[515]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 2 op 0 soft 1 hard 0
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0xffff] command 0x0001 complete: 0x00
bluetoothd[515]: Bluetooth management interface 1.18 initialized
bluetoothd[515]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[515]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[515]: src/rfkill.c:rfkill_event() RFKILL event idx 1 type 1 op 0 soft 0 hard 0
bluetoothd[515]: src/rfkill.c:rfkill_event() RFKILL event idx 2 type 2 op 0 soft 0 hard 0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0xffff] command 0x0002
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0xffff] command 0x0002 complete: 0x00
bluetoothd[515]: src/adapter.c:read_commands_complete() Number of commands: 79
bluetoothd[515]: src/adapter.c:read_commands_complete() Number of events: 40
bluetoothd[515]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
bluetoothd[515]: src/adapter.c:read_commands_complete() kernel supports the set_blocked_keys op
bluetoothd[515]: src/adapter.c:read_commands_complete() kernel supports controller cap command
bluetoothd[515]: src/adapter.c:read_commands_complete() kernel supports exp features
bluetoothd[515]: src/adapter.c:read_commands_complete() kernel supports set system confic
bluetoothd[515]: src/adapter.c:read_commands_complete() kernel supports suspend/resume events
bluetoothd[515]: src/shared/mgmt.c:send_request() [0xffff] command 0x0003
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0xffff] command 0x0003 complete: 0x00
bluetoothd[515]: src/adapter.c:read_index_list_complete() Number of controllers: 1
bluetoothd[515]: src/adapter.c:read_index_list_complete() Found index 0
bluetoothd[515]: src/adapter.c:index_added() index 0
bluetoothd[515]: src/adapter.c:reset_adv_monitors() sending remove Adv Monitor command with handle 0
bluetoothd[515]: src/adapter.c:btd_adapter_new() System name: BlueZ 5.65
bluetoothd[515]: src/adapter.c:btd_adapter_new() Major class: 0
bluetoothd[515]: src/adapter.c:btd_adapter_new() Minor class: 0
bluetoothd[515]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d0541
bluetoothd[515]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
bluetoothd[515]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
bluetoothd[515]: src/adapter.c:index_added() sending read info command for index 0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0053
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0053 complete: 0x00
bluetoothd[515]: src/adapter.c:reset_adv_monitors_complete() Removed all Adv Monitors
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0049
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0049 complete: 0x00
bluetoothd[515]: src/adapter.c:read_exp_features_complete() index 0 status 0x00
bluetoothd[515]: src/adapter.c:read_exp_features_complete() 671b10b5-42c0-4696-9227-eb28d1b049d6 flags 0 action 0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0004
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0004 complete: 0x00
bluetoothd[515]: src/adapter.c:read_info_complete() index 0 status 0x00
bluetoothd[515]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
bluetoothd[515]: src/adapter.c:clear_devices() sending clear devices command for index 0
bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/adapter.c:set_privacy() sending set privacy command for index 0
bluetoothd[515]: src/adapter.c:set_privacy() setting privacy mode 0x00 for index 0
bluetoothd[515]: src/gatt-database.c:btd_gatt_database_new() GATT Manager registered for adapter: /org/bluez/hci0
bluetoothd[515]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001800-0000-1000-8000-00805f9
bluetoothd[515]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[515]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[515]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001801-0000-1000-8000-00805f9
bluetoothd[515]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[515]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[515]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[515]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000180a-0000-1000-8000-00805f9
bluetoothd[515]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[515]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[515]: src/advertising.c:btd_adv_manager_new() LE Advertising Manager created for adapter: /org/bluez/hci0
bluetoothd[515]: plugins/policy.c:policy_adapter_probe()
bluetoothd[515]: plugins/hostname.c:hostname_probe()
bluetoothd[515]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
bluetoothd[515]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
bluetoothd[515]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
bluetoothd[515]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
bluetoothd[515]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
bluetoothd[515]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
bluetoothd[515]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[515]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[515]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[515]: src/adapter.c:load_connections() sending get connections command for index 0
bluetoothd[515]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[515]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[515]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 541
bluetoothd[515]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
bluetoothd[515]: src/adapter.c:set_dev_class() sending set device class command for index 0
bluetoothd[515]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[515]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0011
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0011 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0034
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0034 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x000b
[  285.041264] Bluetooth: hu c7caa0e2 retransmitting 1 pkts
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x000b complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x000000c1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000040
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x000d
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x000d complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x000002c1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000200
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[515]: src/adapter.c:trigger_passive_scanning()
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x002d
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x002d complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x00000ac1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000800
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x002f
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x2f status: 0x0b
bluetoothd[515]: Failed to set privacy: Rejected (0x0b)
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0010
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0010 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0010
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0010 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0010
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0010 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x003d
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x003d complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0027
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0027 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0012
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0012 complete: 0x00
bluetoothd[515]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0013
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0013 complete: 0x00
bluetoothd[515]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0030
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0030 complete: 0x00
bluetoothd[515]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0035
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0035 complete: 0x00
bluetoothd[515]: src/adapter.c:load_conn_params_complete() Connection Parameters loaded for hci0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0015
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0015 complete: 0x00
bluetoothd[515]: src/adapter.c:get_connections_complete() Connection count: 0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0010
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0010 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0028
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0028 complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x000e
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x000e complete: 0x00
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x000f
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x000f complete: 0x00
bluetoothd[515]: src/adapter.c:local_name_changed_callback() Name: BlueZ 5.65
bluetoothd[515]: src/adapter.c:local_name_changed_callback() Short name:
bluetoothd[515]: src/adapter.c:local_name_changed_callback() Current alias: BlueZ 5.65
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0046
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0046 complete: 0x00
bluetoothd[515]: src/adapter.c:set_blocked_keys_complete() Successfully set blocked keys for index 0

#
#
#
# bluetoothctl
[bluetooth]# bluetoothd[515]: src/agent.c:add_default_agent() Default agent set to :1.1 /org/bluez/agent
bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/agent.c:agent_ref() 0x58a118: ref=1
bluetoothd[515]: src/agent.c:register_agent() agent :1.1
Agent registered
[blubluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0009
etooth]# bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0009 complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x00000ad1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0018
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0018 complete: 0x00
[CHG] Controller 84:20:96:B1:4D:92 Pairable: yes
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# scan on
[bluetooth]# quit
bluetoothd[515]: src/agent.c:agent_disconnect() Agent :1.1 disconnected
bluetoothd[515]: src/agent.c:remove_default_agent() Default agent cleared
# bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/agent.c:agent_destroy() agent :1.1
bluetoothd[515]: src/agent.c:agent_unref() 0x58a118: ref=0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0009
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0009 complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x00000ac1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000

#
#
# hcitool dev
Devices:
        hci0    84:20:96:B1:4D:92
# hcitool lescan
[  427.201224] Bluetooth: hu c7caa0e2 retransmitting 1 pkts
LE Scan ...
24:96:AE:E4:A5:F4 (unknown)
72:70:12:68:D6:84 (unknown)
26:E0:40:6E:E9:D0 (unknown)
78:D2:46:88:AD:6A (unknown)
38:49:27:67:48:FD (unknown)
49:27:23:ED:48:B6 (unknown)
EA:D8:D1:7C:20:4F (unknown)
69:2B:1A:9B:9F:D3 (unknown)
C9:25:05:40:5C:7A YA50_D451A94C8A2371DD
50:0E:50:8D:A9:80 (unknown)
5E:A8:9D:9C:A7:64 (unknown)
F9:B8:E4:D8:90:96 YA50_D4E23ABD1F96A8D8
CB:C2:68:3F:4B:C2 (unknown)
6D:D9:9E:DE:C3:37 (unknown)
F1:D2:0B:C4:EF:4C YA50_E1BB5A0ADC1F067B
1D:9E:73:B1:E9:D9 (unknown)
F6:33:9C:C0:32:FA (unknown)
71:65:4E:7C:02:EE (unknown)
55:D7:61:98:65:E5 (unknown)
78:76:52:F9:B2:A5 (unknown)
30:F2:BB:9F:53:18 (unknown)
C1:93:C6:8B:E1:F2 (unknown)
CA:3C:4A:5F:2C:38 (unknown)
79:FF:1B:4E:09:83 (unknown)
0C:69:9E:DE:D4:27 (unknown)
^C#
#
# hcitool scan
Scanning ...
[  472.637751] rtk_btcoex: hci (periodic)inq start
[  482.882982] rtk_btcoex: inquiry complete
        70:BB:E9:F2:5F:FA       小米手机
        44:8C:00:46:17:C2       n/a
# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 84:20:96:B1:4D:92  ACL MTU: 820:8  SCO MTU: 255:16
        UP RUNNING
        RX bytes:4928 acl:0 sco:0 events:106 errors:0
        TX bytes:2674 acl:0 sco:0 commands:77 errors:0

# hciconfig -a
hci0:   Type: Primary  Bus: UART
        BD Address: 84:20:96:B1:4D:92  ACL MTU: 820:8  SCO MTU: 255:16
        UP RUNNING
        RX bytes:4928 acl:0 sco:0 events:106 errors:0
        TX bytes:2674 acl:0 sco:0 commands:77 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: PERIPHERAL ACCEPT
[  569.414530] Bluetooth: hu c7caa0e2 retransmitting 1 pkts
        Name: 'BlueZ 5.65'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 4.0 (0x6)  Revision: 0x373e
        LMP Version: 4.0 (0x6)  Subversion: 0x6962
        Manufacturer: Realtek Semiconductor Corporation (93)

# [  569.424401] rtk_btcoex: BTCOEX hci_rev 0x373e
[  569.424434] rtk_btcoex: BTCOEX lmp_subver 0x6962

如上是操作的全部过程,我遇到的问题是进入 bluetoothctl 的交互界面,没有任何反应,不知道是为啥。

# bluetoothctl
[bluetooth]# bluetoothd[515]: src/agent.c:add_default_agent() Default agent set to :1.1 /org/bluez/agent
bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/agent.c:agent_ref() 0x58a118: ref=1
bluetoothd[515]: src/agent.c:register_agent() agent :1.1
Agent registered
[blubluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0009
etooth]# bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0009 complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x00000ad1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0018
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0018 complete: 0x00
[CHG] Controller 84:20:96:B1:4D:92 Pairable: yes
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# scan on
[bluetooth]# quit
bluetoothd[515]: src/agent.c:agent_disconnect() Agent :1.1 disconnected
bluetoothd[515]: src/agent.c:remove_default_agent() Default agent cleared
# bluetoothd[515]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[515]: src/agent.c:agent_destroy() agent :1.1
bluetoothd[515]: src/agent.c:agent_unref() 0x58a118: ref=0
bluetoothd[515]: src/shared/mgmt.c:send_request() [0x0000] command 0x0009
bluetoothd[515]: src/shared/mgmt.c:can_read_data() [0x0000] command 0x0009 complete: 0x00
bluetoothd[515]: src/adapter.c:new_settings_callback() Settings: 0x00000ac1
bluetoothd[515]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[515]: src/adapter.c:settings_changed() Pending settings: 0x00000000

离线

楼主 #1 2024-01-03 15:37:34

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

Re: 求助:RTL8723BS通过Buildroot移植Bluez5.56,Bluetooth工作不正常。

使用hcitool是没有问题的,就是无法理解的是使用bluetoothctl软件进入交互界面,那些命令毫无反应。

离线

楼主 #2 2024-02-20 14:40:23

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

Re: 求助:RTL8723BS通过Buildroot移植Bluez5.56,Bluetooth工作不正常。

我的芯片是瑞芯微  RV1103/RV1106,对应的SDK里面的交叉编译器的C库是基于uClibc,在bluez5_utils: not available with uClibc 可以了解到,Bluez5.27以后的版本是引入了glibc的wordexp模块的(对应的wordexp.c, wordexp.h)而uClibc是没有实现这个wordexp模块的。

好在bluez5源码里面自带了一个wordexp.h文件,里面的两个函数是空的没有实现(使得可以编译过去不报错),

#ifndef _WORDEXP_H_
#define _WORDEXP_H_

#define WRDE_NOCMD 0

typedef struct {
	size_t we_wordc;
	char **we_wordv;
	size_t we_offs;
} wordexp_t;

static inline int wordexp(const char *c, wordexp_t *w, int _i)
{
	return -1;
}

static inline void wordfree(wordexp_t *__wordexp)
{
}

#endif

目前评估可能是由于uClibc这个C库功能支持不完整导致 bluetoothctl软件的交互命令没有反应。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn