Files
operating-system/buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723
Stefan Agner 52e21c9ccf Fix shellcheck warnings (#1003)
* Use double quote to prevent globbing and exit with error in case
  directory doesn't exit in hassos-hook.sh

* echo flags are undefined in POSIX, use bash instead in
  bluetooth-rtl8723
2020-11-17 20:06:03 +01:00

22 lines
577 B
Bash
Executable File

#!/bin/bash
echo "Setup the Bluetooth chip"
echo 146 > /sys/class/gpio/export
echo 149 > /sys/class/gpio/export
echo 151 > /sys/class/gpio/export
echo high > /sys/class/gpio/gpio146/direction
echo high > /sys/class/gpio/gpio149/direction
echo high > /sys/class/gpio/gpio151/direction
echo "Resetting the Bluetooth chip"
echo 0 > /sys/class/gpio/gpio149/value
echo -e "\tBluetooth chip power down..."
sleep 1
echo 1 > /sys/class/gpio/gpio149/value
echo -e "\tBluetooth chip power up..."
sleep 1
echo -e "\tResetting done"
/usr/sbin/rtk_hciattach -s 115200 /dev/ttyS0 rtk_h5