Name: bluetooth-tools
Summary: Bluetooth-tools
-Version: 0.2.36
+Version: 0.2.37
Release: 0
Group: Network & Connectivity/Bluetooth
License: Apache-2.0
%if "%{profile}" == "mobile"
-DTIZEN_MOBILE=YES \
-DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=NO \
%else
%if "%{profile}" == "wearable"
-DTIZEN_MOBILE=NO \
-DTIZEN_WEARABLE=YES \
+ -DTIZEN_IVI=NO \
%else
+%if "%{profile}" == "ivi"
-DTIZEN_MOBILE=NO \
-DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=YES \
+%else
+ -DTIZEN_MOBILE=NO \
+ -DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=NO \
+%endif
%endif
%endif
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%if "%{profile}" == "mobile" || "%{profile}" == "wearable"
+%if "%{profile}" == "mobile" || "%{profile}" == "wearable" || "%{profile}" == "ivi"
%exclude %{_sysconfdir}/rc.d/init.d/bluetooth-address
%else
%{_sysconfdir}/rc.d/init.d/bluetooth-address
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/wearable/bt-stack-down.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/wearable/bt-reset-env.sh DESTINATION etc/bluetooth)
ELSE ()
+IF (TIZEN_IVI)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/ivi/bt-stack-up.sh DESTINATION etc/bluetooth)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/ivi/bt-stack-down.sh DESTINATION etc/bluetooth)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/ivi/bt-reset-env.sh DESTINATION etc/bluetooth)
+ELSE ()
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/etc/bt-stack-up.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/etc/bt-stack-down.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/etc/bt-reset-env.sh DESTINATION etc/bluetooth)
# install booting script
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/etc/bluetooth-address DESTINATION /etc/rc.d/init.d)
+ENDIF (TIZEN_IVI)
ENDIF (TIZEN_WEARABLE)
ENDIF (TIZEN_MOBILE)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-on.sh DESTINATION etc/bluetooth)
--- /dev/null
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+#
+# Script for setting local Bluetooth Address during booting time
+#
+
+if [ -x /usr/etc/bluetooth/bt-set-addr.sh ]; then
+ /usr/etc/bluetooth/bt-set-addr.sh &
+fi
--- /dev/null
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# BT Stack and device stop
+/usr/etc/bluetooth/bt-stack-down.sh
+
+killall -9 hciattach
+
+# Remove BT files and setting
+eval $(tzplatform-get TZ_SYS_DATA)
+rm -rf $TZ_SYS_DATA/bluetooth/.bt_paired
+rm -rf /var/lib/bluetooth/*
+
+# Initialize BT vconf values
+vconftool set -f -t int db/bluetooth/status "0" -g 6520
+vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520
+vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
+vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
+vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
+vconftool set -f -t int file/private/libug-setting-bluetooth-efl/visibility_time "0" -g 6520
+vconftool set -f -t bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520 -i
+vconftool set -f -t bool memory/private/bluetooth-share/opp_server_init FALSE -g 6520 -i
+
+# Remove BT shared memory
+list=`ipcs -m | awk '$1==0x0001000 {print $2}'`
+for i in $list
+do
+ ipcrm -m $i
+done
+ipcs -m | grep "0x00001000" | awk '{ print $2 }'
--- /dev/null
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+#
+# Script for stopping Bluetooth stack
+#
+
+# Remove BT device
+/usr/etc/bluetooth/bt-dev-end.sh
+
+# Kill BlueZ bluetooth stack
+killall bluetooth
+killall obexd obex-client
+killall bluetooth-hf-agent
+killall bluetoothd
+
+# result
+exit 0
--- /dev/null
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+/usr/bin/bluetooth-hf-agent &
+
+#
+# Script for executing Bluetooth stack
+#
+
+# Register BT Device
+/usr/etc/bluetooth/bt-dev-start.sh
+
+if !(/usr/bin/hciconfig | grep hci); then
+ echo "Registering BT device is failed."
+ exit 1
+fi
+
+# We have to handle both systemd and sysvinit cases differently
+if [ -d /sys/fs/cgroup/systemd ]; then
+ # bt-service changes USER to 'app' via libprivilege-control, so it needs
+ # to know where the session bus is located under systemd
+ export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/app/dbus/user_bus_socket
+fi
+
+# Execute BlueZ BT stack
+echo "Run bluetoothd"
+/usr/libexec/bluetooth/bluetoothd -d -C &
+
+exit 0