summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_common/SConscript4
-rwxr-xr-xpackaging/iotivity.spec2
-rw-r--r--resource/csdk/connectivity/SConscript8
-rw-r--r--resource/csdk/connectivity/build/SConscript1
-rw-r--r--resource/csdk/connectivity/build/tizen/scons/SConscript4
-rw-r--r--resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c6
-rw-r--r--resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript1
-rw-r--r--resource/csdk/stack/samples/tizen/build/SConscript3
-rwxr-xr-xresource/csdk/stack/samples/tizen/build/gbsbuild.sh5
-rw-r--r--resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec2
-rw-r--r--resource/csdk/stack/samples/tizen/build/scons/SConscript7
-rw-r--r--tools/tizen/iotivity-vd-tv-es-tizen30.spec2
-rw-r--r--tools/tizen/iotivity-vd-tv-tizen30.spec2
-rw-r--r--tools/tizen/iotivity.spec2
14 files changed, 46 insertions, 3 deletions
diff --git a/build_common/SConscript b/build_common/SConscript
index 4a9a35024..8612220ba 100644
--- a/build_common/SConscript
+++ b/build_common/SConscript
@@ -102,6 +102,7 @@ help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/broker', 'OFF', [
help_vars.Add(BoolVariable('WITH_CLOUD', 'Build including AccountManager class and Cloud Client sample', False))
help_vars.Add(ListVariable('RD_MODE', 'Resource Directory build mode', 'CLIENT', ['CLIENT', 'SERVER']))
help_vars.Add(BoolVariable('DISABLE_PRESENCE', 'Disable Presence Feature', False))
+help_vars.Add(BoolVariable('DISABLE_BLE_SERVER', 'Disable BLE server', False))
help_vars.Add(BoolVariable('SIMULATOR', 'Build with simulator module', False))
@@ -362,6 +363,9 @@ if env.get('DISABLE_TCP_SERVER'):
if env.get('DISABLE_PRESENCE') == False:
env.AppendUnique(CPPDEFINES = ['WITH_PRESENCE'])
+if env.get('DISABLE_BLE_SERVER'):
+ defines.append('-DDISABLE_BLE_SERVER=1')
+
libs = []
if env.get('SECURED') == '1':
defines.append('-D__WITH_DTLS__=1')
diff --git a/packaging/iotivity.spec b/packaging/iotivity.spec
index f5b7f60ea..764c96304 100755
--- a/packaging/iotivity.spec
+++ b/packaging/iotivity.spec
@@ -86,6 +86,7 @@ Source1002: %{name}-test.manifest
%{!?BLE_CUSTOM_ADV: %define BLE_CUSTOM_ADV False}
%{!?BLE_DIVISION: %define BLE_DIVISION VD}
%{!?BLE_TIZEN_30: %define BLE_TIZEN_30 True}
+%{!?DISABLE_BLE_SERVER: %define DISABLE_BLE_SERVER 0}
%{!?MULTIPLE_OWNER: %define MULTIPLE_OWNER 1}
BuildRequires: expat-devel
@@ -183,6 +184,7 @@ scons %{JOB} --prefix=%{_prefix} \
BLE_CUSTOM_ADV=%{BLE_CUSTOM_ADV} \
BLE_DIVISION=%{BLE_DIVISION} \
BLE_TIZEN_30=%{BLE_TIZEN_30} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
#eol
diff --git a/resource/csdk/connectivity/SConscript b/resource/csdk/connectivity/SConscript
index a38cdbce2..d5ebfe2ff 100644
--- a/resource/csdk/connectivity/SConscript
+++ b/resource/csdk/connectivity/SConscript
@@ -10,6 +10,7 @@ build_sample = env.get('BUILD_SAMPLE')
with_ra = env.get('WITH_RA')
with_tcp = env.get('WITH_TCP')
disable_tcp_server = env.get('DISABLE_TCP_SERVER')
+disable_ble_server = env.get('DISABLE_BLE_SERVER')
with_mq = env.get('WITH_MQ')
ble_custom_adv = env.get('BLE_CUSTOM_ADV')
@@ -33,6 +34,9 @@ if 'ALL' in transport:
env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER'])
if disable_tcp_server == True:
env.AppendUnique(CPPDEFINES = ['DISABLE_TCP_SERVER'])
+ if disable_ble_server == True:
+ if target_os in ['tizen']:
+ env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER'])
if target_os in ['linux']:
env.AppendUnique(CPPDEFINES = ['IP_ADAPTER','NO_EDR_ADAPTER','LE_ADAPTER'])
elif target_os == 'tizen':
@@ -65,6 +69,10 @@ else:
print "BLE Custom advertisement supported"
else:
print "BLE Custom advertisement not supported"
+ if disable_ble_server == True:
+ if target_os in ['tizen']:
+ env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER'])
+ print "BLE Server Disabled"
else:
env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
diff --git a/resource/csdk/connectivity/build/SConscript b/resource/csdk/connectivity/build/SConscript
index 6aaa3c0ed..05be0219d 100644
--- a/resource/csdk/connectivity/build/SConscript
+++ b/resource/csdk/connectivity/build/SConscript
@@ -67,6 +67,7 @@ help_vars.Add(EnumVariable('ROUTING', 'Enable routing', 'EP', allowed_values=('G
help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
help_vars.Add(BoolVariable('WITH_TCP', 'Enable TCP', False))
help_vars.Add(BoolVariable('DISABLE_TCP_SERVER', 'Disable TCP server', False))
+help_vars.Add(BoolVariable('DISABLE_BLE_SERVER', 'Disable BLE server', False))
help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/subscriber/broker', 'OFF', ['OFF', 'SUB', 'PUB', 'BROKER']))
help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device', 'OIC-DEVICE', None, None),)
diff --git a/resource/csdk/connectivity/build/tizen/scons/SConscript b/resource/csdk/connectivity/build/tizen/scons/SConscript
index 6b6d55b22..1042e31b0 100644
--- a/resource/csdk/connectivity/build/tizen/scons/SConscript
+++ b/resource/csdk/connectivity/build/tizen/scons/SConscript
@@ -10,6 +10,7 @@ target_os = env.get('TARGET_OS')
transport = env.get('TARGET_TRANSPORT')
with_tcp = env.get('WITH_TCP')
disable_tcp_server = env.get('DISABLE_TCP_SERVER')
+disable_ble_server = env.get('DISABLE_BLE_SERVER')
print "Given Transport is %s" % transport
@@ -57,6 +58,9 @@ else:
env.AppendUnique(CPPDEFINES = ['DISABLE_TCP_SERVER'])
print "TCP server is disabled"
+ if disable_ble_server == True:
+ env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER'])
+ print "BLE server is disabled"
env.SConscript(['../con/lib/libcoap-4.1.1/SConscript'])
env.SConscript(['../con/SConscript'])
diff --git a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
index f9d000b6a..78e4c12ea 100644
--- a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
+++ b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
@@ -2379,6 +2379,7 @@ static CAResult_t CALEAdapterClientSendData(const CAEndpoint_t *remoteEndpoint,
static CAResult_t CALEAdapterGattServerStart()
{
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "%s", __func__);
+ CAResult_t result = CA_STATUS_FAILED;
if (caglobals.bleFlags & CA_LE_SERVER_DISABLE)
{
@@ -2387,7 +2388,10 @@ static CAResult_t CALEAdapterGattServerStart()
return CA_STATUS_OK;
}
- CAResult_t result = CAStartLEGattServer();
+#ifndef DISABLE_BLE_SERVER
+ OIC_LOG_V(INFO, CALEADAPTER_TAG, "Starting LE GATT Server");
+ result = CAStartLEGattServer();
+#endif
#ifndef SINGLE_THREAD
/*
diff --git a/resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript b/resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript
index 704e44f20..a3f9fa75d 100644
--- a/resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript
+++ b/resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript
@@ -60,6 +60,7 @@ help_vars.Add(BoolVariable('WITH_PROXY', 'CoAP-HTTP Proxy', False)) # set to 'no
help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/subscriber/broker', 'OFF', ['OFF', 'SUB', 'PUB', 'BROKER']))
help_vars.Add(BoolVariable('WITH_TCP', 'Build with TCP', False))
help_vars.Add(BoolVariable('DISABLE_TCP_SERVER', 'Disable TCP server', False))
+help_vars.Add(BoolVariable('DISABLE_BLE_SERVER', 'Disable BLE server', True))
######################################################################
# Platform(build target) specific options: SDK/NDK & toolchain
diff --git a/resource/csdk/stack/samples/tizen/build/SConscript b/resource/csdk/stack/samples/tizen/build/SConscript
index a2f27fa3f..225d6178a 100644
--- a/resource/csdk/stack/samples/tizen/build/SConscript
+++ b/resource/csdk/stack/samples/tizen/build/SConscript
@@ -16,6 +16,7 @@ routing = env.get('ROUTING')
with_proxy = env.get('WITH_PROXY')
with_tcp = env.get('WITH_TCP')
with_mq = env.get('WITH_MQ')
+disable_ble_server = env.get('DISABLE_BLE_SERVER')
with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1':
@@ -52,7 +53,7 @@ if (('BLE' in transport) or ('ALL' in transport)):
gbs_command_prefix += "gbsprofile=tizen_4_0_unified_armv7l "
if target_os == 'tizen':
- command = gbs_command_prefix + "./resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing, with_tcp, with_proxy, with_mq)
+ command = gbs_command_prefix + "./resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing, with_tcp, with_proxy, with_mq, disable_ble_server)
print "Created Command is %s" % command
gbs_script = env.Command('gbs_build', None, command)
AlwaysBuild ('gbs_script')
diff --git a/resource/csdk/stack/samples/tizen/build/gbsbuild.sh b/resource/csdk/stack/samples/tizen/build/gbsbuild.sh
index 8d761f0ec..141b8d86c 100755
--- a/resource/csdk/stack/samples/tizen/build/gbsbuild.sh
+++ b/resource/csdk/stack/samples/tizen/build/gbsbuild.sh
@@ -36,6 +36,9 @@ export WITH_PROXY=$8
echo $9
export WITH_MQ=$9
+echo $10
+export DISABLE_BLE_SERVER=$10
+
echo $TARGET_TRANSPORT
echo $BUILD_SAMPLE
echo $WITH_MQ
@@ -110,7 +113,7 @@ nproc=$(expr 1 + $(expr `nproc --ignore=1` / 2 ) )
gbscommand_prefix=${gbscommand_prefix}" --define '_smp_mflags -j${nproc}'"
echo "Calling core gbs build command"
-gbscommand=${gbscommand_prefix}" -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9'"
+gbscommand=${gbscommand_prefix}" -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7' --define 'WITH_PROXY $8' --define 'WITH_MQ $9' --define 'DISABLE_BLE_SERVER $10'"
echo $gbscommand
if eval $gbscommand; then
echo "Core build is successful"
diff --git a/resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec b/resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
index 9f1cec93a..dd16d6a2a 100644
--- a/resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
+++ b/resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
@@ -31,6 +31,7 @@ Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
%{!?WITH_MQ: %define WITH_MQ OFF}
%{!?WITH_PROXY: %define WITH_PROXY 0}
%{!?WITH_TCP: %define WITH_TCP 0}
+%{!?DISABLE_BLE_SERVER: %define DISABLE_BLE_SERVER 0}
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ttrace)
@@ -62,6 +63,7 @@ scons %{JOB} --prefix=%{_prefix} \
VERBOSE=%{VERBOSE} \
WITH_MQ=%{WITH_MQ} \
WITH_PROXY=%{WITH_PROXY} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
WITH_TCP=%{WITH_TCP} \
#eol
diff --git a/resource/csdk/stack/samples/tizen/build/scons/SConscript b/resource/csdk/stack/samples/tizen/build/scons/SConscript
index 46e24beaf..1390ace67 100644
--- a/resource/csdk/stack/samples/tizen/build/scons/SConscript
+++ b/resource/csdk/stack/samples/tizen/build/scons/SConscript
@@ -9,6 +9,7 @@ Import('env')
target_os = env.get('TARGET_OS')
transport = env.get('TARGET_TRANSPORT')
with_mq = env.get('WITH_MQ')
+disable_ble_server = env.get('DISABLE_BLE_SERVER')
print "Given Transport is %s" % transport
@@ -27,6 +28,9 @@ if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
if 'ALL' in transport:
env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
print "CA Transport is ALL"
+ if env.get('DISABLE_BLE_SERVER'):
+ env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER'])
+ print "BLE Server Disabled"
else:
if 'BT' in transport:
env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER'])
@@ -37,6 +41,9 @@ else:
if 'BLE' in transport:
env.AppendUnique(CPPDEFINES = ['LE_ADAPTER'])
print "CA Transport is BLE"
+ if env.get('DISABLE_BLE_SERVER'):
+ env.AppendUnique(CPPDEFINES = ['DISABLE_BLE_SERVER'])
+ print "BLE Server Disabled"
else:
env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
diff --git a/tools/tizen/iotivity-vd-tv-es-tizen30.spec b/tools/tizen/iotivity-vd-tv-es-tizen30.spec
index 7b4ce2ffb..97da3c74b 100644
--- a/tools/tizen/iotivity-vd-tv-es-tizen30.spec
+++ b/tools/tizen/iotivity-vd-tv-es-tizen30.spec
@@ -84,6 +84,7 @@ Source1002: %{name}-test.manifest
%{!?BLE_CUSTOM_ADV: %define BLE_CUSTOM_ADV False}
%{!?BLE_DIVISION: %define BLE_DIVISION VD}
%{!?BLE_TIZEN_30: %define BLE_TIZEN_30 True}
+%{!?DISABLE_BLE_SERVER: %define DISABLE_BLE_SERVER 0}
%{!?MULTIPLE_OWNER: %define MULTIPLE_OWNER 0}
BuildRequires: expat-devel
@@ -181,6 +182,7 @@ scons %{JOB} --prefix=%{_prefix} \
BLE_CUSTOM_ADV=%{BLE_CUSTOM_ADV} \
BLE_DIVISION=%{BLE_DIVISION} \
BLE_TIZEN_30=%{BLE_TIZEN_30} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
#eol
diff --git a/tools/tizen/iotivity-vd-tv-tizen30.spec b/tools/tizen/iotivity-vd-tv-tizen30.spec
index 557c55ded..8c6bd8099 100644
--- a/tools/tizen/iotivity-vd-tv-tizen30.spec
+++ b/tools/tizen/iotivity-vd-tv-tizen30.spec
@@ -84,6 +84,7 @@ Source1002: %{name}-test.manifest
%{!?BLE_CUSTOM_ADV: %define BLE_CUSTOM_ADV False}
%{!?BLE_DIVISION: %define BLE_DIVISION VD}
%{!?BLE_TIZEN_30: %define BLE_TIZEN_30 True}
+%{!?DISABLE_BLE_SERVER: %define DISABLE_BLE_SERVER 0}
%{!?MULTIPLE_OWNER: %define MULTIPLE_OWNER 0}
BuildRequires: expat-devel
@@ -181,6 +182,7 @@ scons %{JOB} --prefix=%{_prefix} \
BLE_CUSTOM_ADV=%{BLE_CUSTOM_ADV} \
BLE_DIVISION=%{BLE_DIVISION} \
BLE_TIZEN_30=%{BLE_TIZEN_30} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
#eol
diff --git a/tools/tizen/iotivity.spec b/tools/tizen/iotivity.spec
index 903a32ba4..e571f2299 100644
--- a/tools/tizen/iotivity.spec
+++ b/tools/tizen/iotivity.spec
@@ -83,6 +83,7 @@ Source1002: %{name}-test.manifest
%{!?BLE_CUSTOM_ADV: %define BLE_CUSTOM_ADV False}
%{!?BLE_DIVISION: %define BLE_DIVISION VD}
%{!?BLE_TIZEN_30: %define BLE_TIZEN_30 True}
+%{!?DISABLE_BLE_SERVER: %define DISABLE_BLE_SERVER 0}
%{!?MULTIPLE_OWNER: %define MULTIPLE_OWNER 0}
BuildRequires: expat-devel
@@ -179,6 +180,7 @@ scons %{JOB} --prefix=%{_prefix} \
BLE_CUSTOM_ADV=%{BLE_CUSTOM_ADV} \
BLE_DIVISION=%{BLE_DIVISION} \
BLE_TIZEN_30=%{BLE_TIZEN_30} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
#eol