Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong
GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/cache/sources/rtk_hciattach/Readme.txt
8656 views
1
The document describes how to support Realtek UART Bluetooth driver in Linux system.
2
3
The supported kernel version is 2.6.32 - 4.15
4
5
The default serial protocol of Realtek Bluetooth chip is Three-wire (H5) protocol
6
with flow control on, parity even and internel 32k clock.
7
8
The default baud rate is 115200.
9
10
To support Three-wire (H5) protocol, you need to install Realtek hci_uart driver
11
and rtk_hciattach tool.
12
13
1. make sure your UART setting is correct.
14
host tx - controller rx
15
host rx - controller tx
16
host rts - controller cts
17
host cts - ground
18
NC - controller rts
19
20
2. Install Bluetooth kernel driver and rtk_hciattach tool
21
$ sudo make install
22
If you encounter an error like "depmod: ERROR: Bad version passed /lib/modules/...",
23
please change the lines "depmod -a $(MDL_DIR)" to "depmod -a $(shell uname -r)"
24
25
3. Initialize Realtek Bluetooth chip by rtk_hciattach
26
$ sudo rtk_hciattach -n -s 115200 ttyUSB0 rtk_h5
27
28
for H4 protocol chip
29
$ sudo rtk_hciattach -n -s 115200 ttyUSB0 rtk_h4
30
31
Tips: ttyUSB0 is serial port name in your system, you should change it
32
according to hardware such as ttyS0.
33
34
4. Uninstall
35
$ sudo make uninstall
36
37
If you want to change the parameter such as baud rate and pcm settings, you
38
should modify rtl8xxx_config file.
39
40
41