系统相关
首页 > 系统相关> > Linux蓝牙功能移植

Linux蓝牙功能移植

作者:互联网

内核配置

CONFIG_BT=y
CONFIG_BT_BREDR=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
CONFIG_BT_HS=y
CONFIG_BT_LE=y
CONFIG_BT_DEBUGFS=y

CONFIG_BT_BCM=y
# CONFIG_BT_HCIBTUSB is not set
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not set
# CONFIG_BT_HCIUART_RTKH5 is not set
# CONFIG_BT_RTKCOEX is not set
# CONFIG_BT_HCIUART_ATH3K is not set
# CONFIG_BT_HCIUART_LL is not set
# CONFIG_BT_HCIUART_3WIRE is not set
# CONFIG_BT_HCIUART_INTEL is not set
CONFIG_BT_HCIUART_BCM=y
# CONFIG_BT_HCIUART_QCA is not set
# CONFIG_BT_HCIUART_AG6XX is not set
# CONFIG_BT_HCIUART_MRVL is not set
# CONFIG_BT_HCIBCM203X is not set
# CONFIG_BT_HCIBPA10X is not set

Buildroot

BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
BR2_PACKAGE_BLUEZ5_UTILS_TEST=y

启动脚本

echo 458 >/sys/class/gpio/export
echo out >/sys/class/gpio/gpio458/direction
echo 0 >/sys/class/gpio/gpio458/active_low
echo 1 >/sys/class/gpio/gpio458/value

brcm_patchram_plus --no2bytes --patchram /appfs/ko/cywdhd_fw/BCM4343A1_001.002.009.0122.0482.hcd /dev/ttyS2 &
sleep 2
killall brcm_patchram_plus
sleep 0.1
brcm_patchram_plus --no2bytes --patchram /appfs/ko/cywdhd_fw/BCM4343A1_001.002.009.0122.0482.hcd /dev/ttyS2

hciattach /dev/ttyS2 any

mkdir /var/run/dbus/
dbus-daemon --config-file /etc/bluetooth/system.conf --fork --print-address
sleep 2
hciconfig hci0 up
sleep 1
hciconfig hci0 iscan
sleep 1
/usr/libexec/bluetooth/bluetoothd &

BlueZ常用工具

标签:set,--,蓝牙,BT,HCIUART,sleep,Linux,CONFIG,移植
来源: https://www.cnblogs.com/kevinjen/p/15975758.html