1234567891011121314151617181920212223 |
- #!/bin/sh -e
- #
-
- if [[ $UID != 0 ]]; then
- echo "This script needs to be executes as root"
- exit 13
- fi
-
- BASEPATH=$(dirname `readlink -f "$0"`)
-
-
- # Make BT discoverable:
- sudo bluetoothctl <<EOF
- power on
- agent off
- agent NoInputNoOutput
- default-agent
- discoverable on
- pairable on
- EOF
-
- # Start bt-agent
- sudo bt-agent --capability=DisplayOnly -p $BASEPATH/bt-pins
|