const char *getResult(OCStackResult result);
-PROGMEM const char TAG[] = "ArduinoServer";
+PROGMEM const char TAG[] = "ThinServer";
+
+char ssid[] = "hub2.4G";
+char passwd[] = "09877890";
void EventCallbackInApp(ES_RESULT eventFlag)
{
OC_LOG_INIT();
OC_LOG(DEBUG, TAG, PCF("OCServer is starting..."));
- WaitingForOnboarding(ES_WIFI, EventCallbackInApp);
+ FindNetworkForOnboarding(ES_WIFI, ssid, passwd, EventCallbackInApp);
// Initialize the OC Stack in Server mode
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
return;
}
- PrepareToProvisioning(EventCallbackInApp);
+ InitializeProvisioning(EventCallbackInApp);
if (OCStartPresence(0) != OC_STACK_OK)
{
OC_LOG(ERROR, TAG, PCF("OCStack process error"));
return;
}
- //ChangeLightRepresentation(NULL);
}