diff --git a/src/main.c b/src/main.c index b7297fc..a8b91c5 100644 --- a/src/main.c +++ b/src/main.c @@ -82,10 +82,14 @@ int main(int argc, char* argv[]) //mqtt_init(); enice_config_init(); + + rc = 0; - if(!hal_is_device_registed()) + while(!hal_is_device_registed()) { + LOG_EX(LOG_Debug, "Try Register Device %d times\n", rc++); device_register(); + sleep(5); } mqtt_proxy_setup();