+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
Apache License
Version 2.0, January 2004
+++ /dev/null
-Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
+++ /dev/null
-Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE file for Apache License terms and conditions.
<manifest>
- <define>
- <domain name="bluetooth-tools"/>
- </define>
- <assign>
- <filesystem path="/etc/rc.d/init.d/bluetooth-address" label="_" exec_label="none"/>
- <filesystem path="/etc/rc.d/rc3.d/S60bluetooth-address" label="_" exec_label="none"/>
- <filesystem path="/etc/rc.d/rc5.d/S60bluetooth-address" label="_" exec_label="none"/>
- <filesystem path="/usr/lib/systemd/system/bluetooth-address.service" label="_" exec_label="none" />
- <filesystem path="/usr/lib/systemd/system/multi-user.target.wants/bluetooth-address.service" label="_" exec_label="none" />
- </assign>
<request>
- <domain name="bluetooth-tools"/>
+ <domain name="_"/>
</request>
+ <assign>
+ <filesystem path="/usr/etc/bluetooth/*" label="_" exec_label="none"/>
+ </assign>
</manifest>
+++ /dev/null
-@PREFIX@/etc/bluetooth/*
-/etc/rc.d/*
+++ /dev/null
-bluetooth-tools (0.2.35) precise; urgency=low
-
- * Synchronize the code with Private git
- * Git: adaptation/devices/bluetooth-tools
- * Tag: bluetooth-tools_0.2.35
-
- -- Jaekyun Lee <jkyun.lee@samsung.com> Fri, 07 Dec 2012 14:42:28 +0900
-
-bluetooth-tools (0.2.32) unstable; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.32
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Fri, 05 Oct 2012 15:04:50 +0900
-
-bluetooth-tools (0.2.31) unstable; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.31
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Wed, 26 Sep 2012 13:31:06 +0900
-
-bluetooth-tools (0.2.30) unstable; urgency=low
-
- * Change SMACK domain name
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.30
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Wed, 26 Sep 2012 08:45:53 +0900
-
-bluetooth-tools (0.2.29) unstable; urgency=low
-
- * Change SMACK domain name
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.29
-
- -- Sangki Park <sangki79.park@samsung.com> Tue, 25 Sep 2012 10:35:52 +0900
-
-bluetooth-tools (0.2.28) unstable; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.28
-
- -- Sangki Park <sangki79.park@samsung.com> Fri, 21 Sep 2012 09:06:54 +0900
-
-bluetooth-tools (0.2.27) natty; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.27
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Mon, 17 Sep 2012 10:56:45 +0900
-
-bluetooth-tools (0.2.26) unstable; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.26
-
- -- Divya yadav <divya.yadav@samsung.com> Tue, 07 Aug 2012 12:48:23 +0530
-
-bluetooth-tools (0.2.25) unstable; urgency=low
-
- * Upload the package
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.25
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Wed, 23 May 2012 12:15:46 +0900
-
-bluetooth-tools (0.2.24) unstable; urgency=low
-
- * Remove the code to launch the Obexd
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.24
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Fri, 11 May 2012 09:42:39 +0900
-
-bluetooth-tools (0.2.23) unstable; urgency=low
-
- * Changhe the basic FTP root folder
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.23
-
- -- DoHyun Pyun <dh79.pyun@samsung.com> Tue, 08 May 2012 08:53:47 +0900
-
-bluetooth-tools (0.2.22) unstable; urgency=low
-
- * split from bluetooth-dev-tools
- * Git: slp/pkgs/b/bluetooth-tools
- * Tag: bluetooth-tools_0.2.22
-
- -- Jkyun Lee <jkyun.lee@samsung.com> Mon, 05 Mar 2012 13:48:49 +0900
+++ /dev/null
-Source: bluetooth-tools
-Section: devel
-Priority: optional
-Maintainer: DoHyun Pyun <dh79.pyun@samsung.com>, ChanYeol Park <chanyeol.park@samsung.com>, Girish A J <girish.joshi@samsung.com>, InJun Yang <injun.yang@samsung.com>, Jaekyun Lee <jkyun.lee@samsung.com>
-Uploaders: Sunil Behera <sunil.behera@samsung.com>, Syam Sidhardhan <s.syam@samsung.com>
-Build-Depends: debhelper (>= 5), libglib2.0-dev, libdbus-glib-1-dev, libvconf-dev
-Standards-Version: 3.7.2
-Homepage: N/A
-
-Package: bluetooth-tools
-Architecture: any
-Section: utils
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Conflicts: bluetooth-dev-tool
-Breaks: bluetooth-dev-tool
-Replaces: bluetooth-dev-tool
-Description: Tools and scripts for Bluetooth stack
- Tools for Bluetooth
+++ /dev/null
-#!/usr/bin/make -f
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-LDFLAGS ?=
-PREFIX ?= /usr
-DATADIR ?= /opt
-PLUGIN_PREFIX ?= /usr
-
-
-CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- mkdir -p $(CMAKE_BUILD_DIR) && \
- cd $(CMAKE_BUILD_DIR) && \
- CFLAGS="$(CFLAGS) -fpie" LDFLAGS="$(LDFLAGS) -pie" \
- cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DPLUGIN_INSTALL_PREFIX=$(PLUGIN_PREFIX)
-
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- cd $(CMAKE_BUILD_DIR) && $(MAKE)
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- sed -i -e "s#@PLUGIN_PREFIX@#$(PLUGIN_PREFIX)#g" $${f%.in}; \
- done
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -rm -rf $(CMAKE_BUILD_DIR)
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/wavplayer.
- cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
- # Booting script
- mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc3.d
- mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc5.d
- ln -s ../init.d/bluetooth-address $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/S60bluetooth-address
- ln -s ../init.d/bluetooth-address $(CURDIR)/debian/tmp/etc/rc.d/rc5.d/S60bluetooth-address
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
-# dh_strip --dbg-package=bluetooth-tools-dbg
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+++ /dev/null
-# this Unit set Bluetooth Address, some application use the address although bluetooth doesn't turn on.
-# especially, OSP API use it as such way.
-#
-
-[Unit]
-Description=Generate Bluetooth Address
-
-[Service]
-Type=oneshot
-ExecStart=/usr/etc/bluetooth/bt-set-addr.sh
-RemainAfterExit=yes
-
-[Install]
-WantedBy=bluetooth.target
-
Name: bluetooth-tools
Summary: bluetooth-tools
-Version: 0.2.35
-Release: 3
+Version: 0.2.45
+Release: 1
Group: TO_BE/FILLED_IN
-License: Apache License, Version 2.0
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Source1001: bluetooth-address.service
BuildRequires: cmake
%description
-Tools fo bluetooth run/stop and set address
-
+Tools fo bluetooth run/stop
%prep
%setup -q
export CFLAGS+=" -fpie -fvisibility=hidden"
export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+%if "%{?tizen_profile_name}" == "wearable"
+export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
+%endif
+
+%cmake \
+%if "%{?tizen_profile_name}" == "wearable"
+ -DTIZEN_WEARABLE=YES \
+%elseif "%{?tizen_profile_name}" == "mobile"
+ -DTIZEN_WEARABLE=NO \
+%endif
+
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
make %{?jobs:-j%jobs}
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d
-ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-address %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
-ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-address %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
-
-mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
-install -m 0644 %{SOURCE1001} %{buildroot}%{_libdir}/systemd/system/
-ln -s ../bluetooth-address.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/bluetooth-address.service
+install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-tools
%files
%manifest bluetooth-tools.manifest
%defattr(-,root,root,-)
-%{_sysconfdir}/rc.d/init.d/bluetooth-address
-%{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
-%{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-stack-up.sh
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-stack-down.sh
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-reset-env.sh
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
-%{_libdir}/systemd/system/multi-user.target.wants/bluetooth-address.service
-%{_libdir}/systemd/system/bluetooth-address.service
-
+%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
+%{_datadir}/license/bluetooth-tools
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# install script files
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-stack-up.sh DESTINATION etc/bluetooth)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-stack-down.sh DESTINATION etc/bluetooth)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-reset-env.sh DESTINATION etc/bluetooth)
+
+IF (TIZEN_WEARABLE)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/wearable/bt-stack-up.sh DESTINATION etc/bluetooth)
+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 ()
+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-reset-env.sh DESTINATION etc/bluetooth)
+ENDIF (TIZEN_WEARABLE)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-on.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-dev-up.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-mode-on.sh DESTINATION etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-off.sh DESTINATION etc/bluetooth)
-
-# install booting script
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-address DESTINATION /etc/rc.d/init.d)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-hci-logdump.sh DESTINATION etc/bluetooth)
# Script for turning on Bluetooth (EDUTM)
#
-if /usr/sbin/hciconfig | grep hci; then
+if /usr/bin/hciconfig | /bin/grep hci; then
/usr/etc/bluetooth/bt-stack-down.sh
- sleep 1
+ /bin/sleep 1
fi
# Register BT Device
/usr/etc/bluetooth/bt-dev-start.sh
-if !(/usr/sbin/hciconfig | grep hci); then
+if !(/usr/bin/hciconfig | /bin/grep hci); then
echo "BT EDUTM failed. Registering BT device is failed."
exit 1
fi
# Execute BlueZ BT stack
echo "Run bluetoothd"
-/usr/sbin/bluetoothd
+/usr/lib/bluetooth/bluetoothd &
/usr/bin/bt-service &
-sleep 0.1
+/bin/sleep 0.1
-/usr/sbin/hciconfig hci0 name TIZEN-Mobile
+/usr/bin/hciconfig hci0 name TIZEN-Mobile
-/usr/sbin/hciconfig hci0 piscan
+/usr/bin/hciconfig hci0 piscan
if [ -e "/sys/devices/hci0/idle_timeout" ]
then
echo "Set idle time"
- echo 0> /sys/devices/hci0/idle_timeout
+ echo 0 > /sys/devices/hci0/idle_timeout
fi
# Script for turning on EDUTM mode
#
-if /usr/sbin/hciconfig | grep hci; then
+if /usr/bin/hciconfig | /bin/grep hci; then
echo EDUTM already done, exit
else
echo Start EDUTM
if [ -e /usr/etc/bluetooth/TIInit_* ]
then
echo "Reset device"
- hcitool cmd 0x3 0xFD0C
+ /usr/bin/hcitool cmd 0x3 0xFD0C
fi
echo "Configure BT device"
-hcitool cmd 0x3 0x0005 0x02 0x00 0x02
+/usr/bin/hcitool cmd 0x3 0x0005 0x02 0x00 0x02
echo "Send BT edutm command"
-hcitool cmd 0x06 0x0003
+/usr/bin/hcitool cmd 0x06 0x0003
echo "BT edutm done"
#
# Kill BlueZ bluetooth stack
-killall bluetoothd
+/usr/bin/killall bluetoothd
# Remove BT device
/usr/etc/bluetooth/bt-dev-end.sh
# Script for turning on Bluetooth EDUTM
#
+HCIDUMP_ENABLE="true" # Available values : true | false (default : false)
+HCIDUMP_DIR="/opt/usr/media/.bluetooth"
+HCIDUMP_FILENAME="bt_hcidump.log"
+HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}"
+LOGDUMP_DIR="/opt/etc/dump.d/module.d"
+LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh"
+
# Register BT Device
/usr/etc/bluetooth/bt-dev-start.sh
-if !(/usr/sbin/hciconfig | grep hci); then
+if !(/usr/bin/hciconfig | /bin/grep hci); then
echo "BT EDUTM failed. Registering BT device is failed."
exit 1
fi
+if [ -e /usr/sbin/hcidump -a ${HCIDUMP_ENABLE} = "true" ]
+then
+ # When *#9900# is typed, this is executed to archive logs. #
+ /bin/mkdir -p ${LOGDUMP_DIR}
+ /bin/cp -f /usr/etc/bluetooth/bt-hci-logdump.sh ${LOGDUMP_PATH}
+
+ /bin/mkdir -p ${HCIDUMP_DIR}/old_hcidump
+# /bin/rm -f ${HCIDUMP_DIR}/old_hcidump/*
+ /bin/mv ${HCIDUMP_PATH}* ${HCIDUMP_DIR}/old_hcidump/
+ /usr/sbin/hcidump -w ${HCIDUMP_PATH}_`date +%s_%N` & # You can get unique file name.
+# /usr/sbin/hcidump -w ${HCIDUMP_PATH} &
+fi
+
+echo "Configure BT device"
+/usr/bin/hcitool cmd 0x3 0x0005 0x02 0x00 0x02
+
+echo "Send BT edutm command"
+/usr/bin/hcitool cmd 0x06 0x0003
+
# Execute BlueZ BT stack
echo "Run bluetoothd"
-/usr/sbin/bluetoothd
+/usr/lib/bluetooth/bluetoothd &
/usr/bin/bt-service &
-sleep 0.1
+/bin/sleep 0.1
-/usr/sbin/hciconfig hci0 name TIZEN-Mobile
+/usr/bin/hciconfig hci0 name TIZEN-Mobile
-/usr/sbin/hciconfig hci0 piscan
+/usr/bin/hciconfig hci0 piscan
if [ -e "/sys/devices/hci0/idle_timeout" ]
then
echo "Set idle time"
- echo 0> /sys/devices/hci0/idle_timeout
+ echo 0 > /sys/devices/hci0/idle_timeout
fi
if [ -e /usr/etc/bluetooth/TIInit_* ]
then
echo "Reset device"
- hcitool cmd 0x3 0xFD0C
+ /usr/bin/hcitool cmd 0x3 0xFD0C
fi
-echo "Configure BT device"
-hcitool cmd 0x3 0x0005 0x02 0x00 0x02
-
-echo "Send BT edutm command"
-hcitool cmd 0x06 0x0003
-
echo "BT edutm done"
# result
--- /dev/null
+#!/bin/sh
+
+#--------------------------------------
+# bluetooth hci
+#--------------------------------------
+
+BLUETOOTH_DEBUG=${1}/bluetooth
+PREV_PWD=${PWD}
+BT_DUMP_DIR=/opt/usr/media/.bluetooth
+
+if [ ! -e ${BT_DUMP_DIR} ]
+then
+ exit 0
+fi
+
+mkdir -p ${BLUETOOTH_DEBUG}
+
+cd ${BT_DUMP_DIR}
+/bin/tar -cvzf ${BLUETOOTH_DEBUG}/bt_dump.tar.gz *
+
+cd ${PREV_PWD}
# Initialize BT vconf values
vconftool set -tf int db/bluetooth/status "0" -g 6520
-vconftool set -tf int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
+vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 6520 -i
vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
/usr/etc/bluetooth/bt-dev-end.sh
# Kill BlueZ bluetooth stack
-killall bluetooth
killall obexd obex-client
killall bt-syspopup
killall bluetooth-share
# Register BT Device
/usr/etc/bluetooth/bt-dev-start.sh
-if !(/usr/sbin/hciconfig | grep hci); then
+if !(/usr/bin/hciconfig | grep hci); then
echo "Registering BT device is failed."
exit 1
fi
-# Execute BlueZ BT stack
-echo "Run bluetoothd"
-
# 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
-else
- # Under systemd, bluetoothd is dbus activated. sysvinit requires it to be
- # launched explicitly
- /usr/sbin/bluetoothd -d
fi
-/usr/bin/bt-service &
+# Execute BlueZ BT stack
+echo "Run bluetoothd"
+/usr/lib/bluetooth/bluetoothd -d -C &
/usr/bin/bluetooth-share &
exit 0
--- /dev/null
+#!/bin/sh
+
+# BT Stack and device stop
+/usr/etc/bluetooth/bt-stack-down.sh
+
+killall -9 hciattach
+
+# Remove BT files and setting
+rm -rf /opt/data/bluetooth/.bt_paired
+rm -rf /var/lib/bluetooth/*
+
+# Initialize BT vconf values
+vconftool set -tf int db/bluetooth/status "0" -g 6520
+vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 6520 -i
+vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
+vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
+vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
+vconftool set -tf int file/private/libug-setting-bluetooth-efl/visibility_time "0" -g 6520
+vconftool set -tf bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520 -i
+vconftool set -tf 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
+
+#
+# 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-share
+killall bluetooth-pb-agent
+killall bluetooth-map-agent
+killall bluetooth-hfp-agent
+killall bluetooth-hf-agent
+killall bluetoothd
+
+# result
+exit 0
--- /dev/null
+#!/bin/sh
+
+HCIDUMP_DIR="/opt/usr/media/.bluetooth"
+HCIDUMP_FILENAME="bt_hcidump.log"
+HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}"
+LOGDUMP_DIR="/opt/etc/dump.d/module.d"
+LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh"
+
+/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
+
+debug_mode=`cat /sys/module/sec_debug/parameters/enable`
+debug_mode_user=`cat /sys/module/sec_debug/parameters/enable_user`
+
+if [ ${debug_mode} = '1' -o ${debug_mode_user} = '1' ]
+then
+ if [ -e /usr/sbin/hcidump ]
+ then
+ # When *#9900# is typed, this is executed to archive logs. #
+ /bin/mkdir -p ${LOGDUMP_DIR}
+ /bin/cp -f /usr/etc/bluetooth/bt-hci-logdump.sh ${LOGDUMP_PATH}
+
+ /bin/mkdir -p ${HCIDUMP_DIR}/old_hcidump
+ /bin/rm -f ${HCIDUMP_DIR}/old_hcidump/*
+ /bin/mv ${HCIDUMP_PATH}* ${HCIDUMP_DIR}/old_hcidump/
+ /usr/sbin/hcidump -w ${HCIDUMP_PATH} &
+ fi
+elif [ -e ${HCIDUMP_DIR} ]
+then
+ /bin/rm -rf ${HCIDUMP_DIR}
+fi
+
+# Execute BlueZ BT stack
+echo "Run bluetoothd"
+/usr/lib/bluetooth/bluetoothd -d -C &
+/usr/bin/dbus-send --print-reply --system --type=method_call \
+ --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 \
+ org.freedesktop.systemd1.Manager.StartUnit \
+ string:'wms.service' string:'fail'
+
+exit 0