ok - I have now included the rtk_hciattach code and the firmware in the buildroot system.
echo 0 > /sys/class/rfkill/rfkill0/state
echo 1 > /sys/class/rfkill/rfkill0/state
modprobe hci_uart
rtk_hciattach -n -s 115200 /dev/ttyS4 rtk_h5 &
The output of rtk_hciattach is lower down. hciconfig -a outputs the following :
# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 00:E0:4C:23:99:87 ACL MTU: 1021:8 SCO MTU: 255:12
DOWN
RX bytes:1115 acl:0 sco:0 events:34 errors:0
TX bytes:938 acl:0 sco:0 commands:34 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: SLAVE ACCEPT
rtk_hciattach outputs tthe following :
# Realtek Bluetooth :Realtek Bluetooth init uart with init speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1.8905594.20200602-140152
Realtek Bluetooth :Use epoll
Realtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek 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
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x08
Realtek Bluetooth :HCI Revision 0x000d
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 02
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 2
Realtek Bluetooth :IC: RTL8723DS
Realtek Bluetooth :Firmware/config: rtl8723d_fw, rtl8723d_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 ERROR: Can't access Config file: /lib/firmware/rtlbt/rtl8723d_config, No such file or directory
Realtek Bluetooth ERROR: Read Config file error, use eFuse settings
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8723d_fw OK, size 52712
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 9
Realtek Bluetooth :FW version 0xaa7b5645, Patch num 3
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Chip id 0x0003
Realtek Bluetooth :Patch length 0x8420
Realtek Bluetooth :Start offset 0x00004980
Realtek Bluetooth :Svn version: 20543
Realtek Bluetooth :Coexistence: BTCOEX_20180125-2323
Realtek Bluetooth :FW exists, Config file not exists
Realtek Bluetooth :Total len 33824 for fwc
Realtek Bluetooth :No baud from Config file, set baudrate: 115200, 0x0252c014
Realtek Bluetooth :end_idx: 134, lp_len: 56, additional pkts: 6
Realtek Bluetooth :Start downloading...
Realtek Bluetooth :Send additional packet 8
Realtek Bluetooth :Send additional packet 9
Realtek Bluetooth :Send additional packet 10
Realtek Bluetooth :Send additional packet 11
Realtek Bluetooth :Send additional packet 12
Realtek Bluetooth :Last packet 141
Realtek Bluetooth :Send last pkt
Realtek Bluetooth :Disable 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
Realtek Bluetooth :Realtek Bluetooth post process
Realtek Bluetooth :Device setup complete