diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 8da1fef..99cdb78 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -119,8 +119,10 @@ lan_status lanStatus = INITIAL_STATE; const char configserver[] PROGMEM = CONFIG_SERVER; const char verval_P[] PROGMEM = QUOTE(PIO_SRC_REV); +#if defined(__SAM3X8E__) +UID UniqueID; +#endif -unsigned int UniqueID[5] = {0,0,0,0,0}; char *deviceName = NULL; aJsonObject *topics = NULL; aJsonObject *root = NULL; @@ -273,12 +275,15 @@ else void printMACAddress() { debugSerial< 1) { strncpy(configServer, args[1], sizeof(configServer) - 1); @@ -1150,13 +1155,13 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args) } else if (!loadFlash(OFFSET_CONFIGSERVER, configServer)) strncpy_P(configServer,configserver,sizeof(configServer)); #ifndef DEVICE_NAME - snprintf(URI, sizeof(URI), "/%02x-%02x-%02x-%02x-%02x-%02x.config.json", mac[0], mac[1], mac[2], mac[3], mac[4], + snprintf(URI, sizeof(URI), "/cnf/%02x-%02x-%02x-%02x-%02x-%02x.config.json", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); #else #ifndef FLASH_64KB - snprintf(URI, sizeof(URI), "/%s_config.json",QUOTE(DEVICE_NAME)); + snprintf(URI, sizeof(URI), "/cnf/%s_config.json",QUOTE(DEVICE_NAME)); #else - strncpy(URI, "/", sizeof(URI)); + strncpy(URI, "/cnf/", sizeof(URI)); strncat(URI, QUOTE(DEVICE_NAME), sizeof(URI)); strncat(URI, "_config.json", sizeof(URI)); #endif @@ -1233,7 +1238,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args) htclient.stop(); wdt_res(); debugSerial<