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}
But when i create a shell script doing the following:
#! /bin/bash
coproc bluetoothctl
echo -e 'discoverable on' >&${COPROC}
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!
Asked by Kamigaku
(13 rep)
Aug 22, 2019, 12:14 PM
Last activity: Jan 25, 2025, 11:56 PM
Last activity: Jan 25, 2025, 11:56 PM