Add the script for BT off script when radio module's status is on 39/89539/1 accepted/tizen/common/20160928.164247 accepted/tizen/ivi/20160929.002004 accepted/tizen/mobile/20160929.001900 accepted/tizen/tv/20160929.001913 accepted/tizen/wearable/20160929.002040 submit/tizen/20160928.062430
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 26 Sep 2016 04:04:39 +0000 (13:04 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 26 Sep 2016 04:04:39 +0000 (13:04 +0900)
Change-Id: Ia709864e1cabad98f6fce9a91ac2530cd9200c93
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
packaging/bluetooth-tools.spec
scripts/CMakeLists.txt
scripts/mobile/bt-stack-down-with-radio.sh [new file with mode: 0755]

index ba9c286..d10eb11 100644 (file)
@@ -1,6 +1,6 @@
 Name:       bluetooth-tools
 Summary:    Bluetooth-tools
-Version:    0.2.35
+Version:    0.2.36
 Release:    0
 Group:      Network & Connectivity/Bluetooth
 License:    Apache-2.0
@@ -97,6 +97,9 @@ install -D -m 0644 LICENSE.APLv2 %{buildroot}%{_datadir}/license/bluetooth-tools
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hcidump.sh
+%if "%{profile}" == "mobile"
+%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-stack-down-with-radio.sh
+%endif
 %{_datadir}/license/bluetooth-tools
 %{_unitdir}/multi-user.target.wants/bluetooth-address.service
 %{_unitdir}/bluetooth-address.service
index 03b021d..f9a751e 100755 (executable)
@@ -5,6 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 IF (TIZEN_MOBILE)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-up.sh DESTINATION etc/bluetooth)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-down.sh DESTINATION etc/bluetooth)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-down-with-radio.sh DESTINATION etc/bluetooth)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-reset-env.sh DESTINATION etc/bluetooth)
 ELSE ()
 IF (TIZEN_WEARABLE)
diff --git a/scripts/mobile/bt-stack-down-with-radio.sh b/scripts/mobile/bt-stack-down-with-radio.sh
new file mode 100755 (executable)
index 0000000..801481c
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+#
+# Script for stopping Bluetooth stack
+#
+
+# If radio is on, should not call the device down script
+#/usr/etc/bluetooth/bt-dev-end.sh
+
+# Kill BlueZ bluetooth stack
+killall obexd obex-client
+killall bt-syspopup
+killall bluetooth-pb-agent
+killall bluetooth-map-agent
+killall bluetooth-hfp-agent
+killall bluetooth-ag-agent
+killall bluetoothd
+killall bluetooth-share
+
+# result
+exit 0