1.关闭原来系统的bluetooth.service
systemctl disable bluetooth
- sh wifi_bt_load.sh //加载驱动,并且开启蓝牙
insmod aic8800_bsp.ko
insmod aic8800_fdrv.ko
hciattach -s 1500000 /dev/ttyS5 any 1500000
hciconfig hci0 up
sleep 1
/usr/libexec/bluetooth/bluetoothd -C -n -d &
3.sh bt_hci_rfcomm.sh
hciconfig hci0 piscan
sdptool add SP
sleep .1
hciconfig hci0 noauth
sleep 1
rfcomm listen /dev/rfcomm0 1 &
4.就可以使用SPP的软件连接开发板, 通过
cat /dev/rfcomm0
echo "123" > /dev/rfcomm0
收发数据了。
5.断开会有Disconneted的字出现,需要重新
rfcomm listen /dev/rfcomm0 1 &
才能重新被连接,否则会连接失败。