From 3b9e74d5eeaa00cbd9a4b33517d32a3ac5bb39e4 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Mon, 18 Dec 2023 11:08:08 +0000 Subject: [PATCH] - changes for PipeWire and Debian Bookworm --- setup/setup_agent_gsm.sh | 2 +- src/bt_phone_test.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/bt_phone_test.py diff --git a/setup/setup_agent_gsm.sh b/setup/setup_agent_gsm.sh index ab71d90..2fd792b 100755 --- a/setup/setup_agent_gsm.sh +++ b/setup/setup_agent_gsm.sh @@ -11,7 +11,7 @@ GIT_SOURCE=https://git.sevana.biz/public/agent_gsm # Install prerequisites sudo apt install --assume-yes git mc python3 sox vim libffi-dev screen python3-pip python3-numpy dnsmasq hostapd screen -sudo pip3 install pyyaml sox pyrabbit soundfile dbus_python pexpect requests rabbitpy bottle +sudo pip3 install pyyaml sox pyrabbit soundfile dbus_python pexpect requests rabbitpy bottle --break-system-packages if [ -f "$INSTALL_DIR" ]; then rm -rf "$INSTALL_DIR" diff --git a/src/bt_phone_test.py b/src/bt_phone_test.py old mode 100644 new mode 100755 index 9e0b172..19e3f7f --- a/src/bt_phone_test.py +++ b/src/bt_phone_test.py @@ -13,7 +13,7 @@ PHONE_BT_MAC = '40:B0:76:B4:36:98' # Connection to phone bluetooth_ctl = bt_controller.Bluetoothctl() -devices = bt_controller.get_paired_devices() +devices = bluetooth_ctl.get_paired_devices() print(f'Paired devices: {devices}') # disconnect before connect @@ -34,9 +34,11 @@ phone.call_number('111222') # Wait 5 seconds time.sleep(5) -# Just to be sure +# Just to be sure - finish the call phone.hangup_call() phone.quit_dbus_loop() +# Disconnect BT transport from the phone +bluetooth_ctl.disconnect(PHONE_BT_MAC) exit(EXIT_OK) \ No newline at end of file