diff options
Diffstat (limited to 'recipes-support/btuart/files')
-rw-r--r-- | recipes-support/btuart/files/COPYING | 5 | ||||
-rw-r--r-- | recipes-support/btuart/files/btuart.service | 13 | ||||
-rwxr-xr-x | recipes-support/btuart/files/btuart.sh | 8 |
3 files changed, 26 insertions, 0 deletions
diff --git a/recipes-support/btuart/files/COPYING b/recipes-support/btuart/files/COPYING new file mode 100644 index 0000000..040e990 --- /dev/null +++ b/recipes-support/btuart/files/COPYING @@ -0,0 +1,5 @@ +This piece is software is provided by Toradex AG as sample code. +There is no warranty for the program. +Toradex AG put this program in public domain, uncopyrighted. + +Renens, Swizterland, 2008-10-23 diff --git a/recipes-support/btuart/files/btuart.service b/recipes-support/btuart/files/btuart.service new file mode 100644 index 0000000..547f6be --- /dev/null +++ b/recipes-support/btuart/files/btuart.service @@ -0,0 +1,13 @@ +[Unit] +Description=Initialize Bluetooth UART +Wants=bluetooth.service +Before=bluetooth.service +After=sys-subsystem-net-devices-mlan0.device +After=dev-ttymxc3.device + +[Service] +Type=forking +ExecStart=/usr/sbin/btuart.sh + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/btuart/files/btuart.sh b/recipes-support/btuart/files/btuart.sh new file mode 100755 index 0000000..c4f53c1 --- /dev/null +++ b/recipes-support/btuart/files/btuart.sh @@ -0,0 +1,8 @@ +#!/bin/sh +sleep 5 +/usr/bin/hciattach /dev/ttymxc3 any 115200 flow +/usr/sbin/rfkill unblock bluetooth +/usr/bin/hciconfig hci0 up +# Change BT UART baudrate to a higher speed, for example 921600 +/usr/bin/hcitool -i hci0 cmd 0x3F 0x09 0x00 0x10 0x0e 0x00 +/bin/stty -F /dev/ttymxc3 921600 |