if ('enrollee' in es_role) :
print "Building Easysetup enrollee SDK"
-
+
if es_target in ['linux', 'arduino', 'tizen']:
SConscript('enrollee/SConscript')
else :
print "Enrollees are implemented for IP transport only"
enrollee_env.AppendUnique(CPPDEFINES = ['ESWIFI'])
+if enrollee_env.get('ES_SOFTAP_MODE') == 'ENROLLEE_SOFTAP':
+ enrollee_env.AppendUnique(CPPDEFINES = ['ENROLLEE_SOFTAP'])
+
######################################################################
# Build flags
######################################################################
* @file
*
* This file has methods for on-boarding the Enrollee device.
- * This will contain template methods that will have core business logic & negotiation algorithm
+ * This will contain template methods that will have core business logic & negotiation algorithm
* on various on-boarding methods.
*/
if (ESSoftapOnboarding())
{
-#ifndef ARDUINO //SoftAp at Arduino is not supported
if (ESSoftapAtEnrollee())
{
OC_LOG(DEBUG, ES_ENROLLEE_TAG, "Create softap at enrollee");
ESCreateSoftap(ssid, passwd, cb);
}
else
-#endif
{
OC_LOG(DEBUG, ES_ENROLLEE_TAG, "Connecting to SoftAp");
ConnectToWiFiNetwork(ssid, passwd, cb);
NetworkEventCallback gCallback;
/**
- * It will return Device which is creating Soft AP ; Devices are identified by their role.
+ * It will return Device which is creating Soft AP.
* i.e.Enrollee or Mediator.
+ * This decesion is based on, what is the value set for ES_SOFTAP_MODE in build command as well as
+ * in iotivity.spec file.
*/
DeviceRole ESSoftapHost()
{
- // TODO: To implement
+#ifdef ENROLLEE_SOFTAP
+ //SoftAp at enrollee
return ENROLLEE;
+#else
+ //SoftAp at mediator
+ return MEDIATOR;
+#endif
}
/**
es_role_map = {
'enrollee', 'mediator'
}
-
+
es_target_enrollee_map = {
'arduino', 'tizen', 'linux'
}
-
+
es_softap_mode_map = {
'ENROLLEE_SOFTAP', 'MEDIATOR_SOFTAP'
}
attribute value
es_target_enrollee tizen
es_role enrollee
- softap_mode ENROLLEE_SOFTAP
+ softap_mode ENROLLEE_SOFTAP
3) Go to "iotivity/" folder.
4) Execute following command(s) to start build based on transport selection required :