- fix setup errors

This commit is contained in:
Dmytro Bogovych 2023-08-12 15:36:12 +03:00
parent 3a075e56da
commit 3d3be58e55
2 changed files with 5 additions and 3 deletions

View File

@ -4,7 +4,7 @@ MAC_ADDRESS=""
read -p "Please enter MAC BT address: " MAC_ADDRESS
# Write the address into config file before
sed -i "s/MAC_ADDRESS/$MAC_ADDRESS/" config/config.yaml
sed -i "s/MAC_ADDRESS/$MAC_ADDRESS/" config/agent.yaml
bluetoothctl -- power on
@ -14,6 +14,7 @@ sleep 10 # Time to give BT to start
bluetoothctl -- default-agent
bluetoothctl -- discoverable on
bluetoothctl -- pairable on
bluetoothctl -- scan on
# Try to pair now
bluetoothctl -- pair ${MAC_ADDRESS}

View File

@ -7,7 +7,8 @@ INSTALL_DIR=agent_gsm
GIT_SOURCE=https://git.sevana.biz/public/agent_gsm_redist
# Install prerequisites
sudo apt install git mc python3 sox vim
sudo apt install git mc python3 sox vim libffi-dev
sudo pip3 install pyyaml sox pyrabbit soundfile dbus_python pexpect pydub requests
if [ -f "$INSTALL_DIR" ]; then
rm -rf "$INSTALL_DIR"
@ -32,7 +33,7 @@ cp config/agent.in.yaml config/agent.yaml
# Replace the values
if [[ $BACKEND_URL != "" ]]; then
sed -i "s|BACKEND_URL|$BACKEND_URL|" config/agent.yaml
sed -i "s|BACKEND|$BACKEND|" config/agent.yaml
fi
if [[ $PHONE_NAME != "" ]]; then