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))
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')
%{!?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
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
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')
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':
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'])
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),)
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
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'])
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)
{
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
/*
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
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':
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')
echo $9
export WITH_MQ=$9
+echo $10
+export DISABLE_BLE_SERVER=$10
+
echo $TARGET_TRANSPORT
echo $BUILD_SAMPLE
echo $WITH_MQ
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"
%{!?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)
VERBOSE=%{VERBOSE} \
WITH_MQ=%{WITH_MQ} \
WITH_PROXY=%{WITH_PROXY} \
+ DISABLE_BLE_SERVER=%{DISABLE_BLE_SERVER} \
WITH_TCP=%{WITH_TCP} \
#eol
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
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'])
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'])
%{!?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
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
%{!?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
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
%{!?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
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