I'm trying to do a simple shell script that will make my raspberry's bluetooth discoverable but i'm facing some issues. My raspberry is running Raspbian.
Running this through command line works perfectly:
coproc bluetoothctl
echo -e 'discoverable on' >&${COPROC[1]}
But when i create a shell script doing the following:
#! /bin/bash
coproc bluetoothctl
echo -e 'discoverable on' >&${COPROC[1]}
with the command line "bash test_script.sh", the script is exectued correctly but the state of the bluetooth remains the same.
Can someone give me a hand? Thanks!