22 lines
575 B
Bash
Executable File
22 lines
575 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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
|