本文主要是介绍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常用工具
btmgmt
配置工具
btattach
设置蓝牙串口设备
btgatt-server
用于测试的gatt服务
这篇关于Linux蓝牙功能移植的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!