ソースを参照

add define for diffrent model, fix service_fw

balbekova 7 年 前
コミット
725eedf51b

+ 1 - 1
.gdbinit_bt6706

@@ -1,5 +1,5 @@
 target remote localhost:3333
-file build/bt6702/stm32bt6706/stm32bt6706.elf
+file build/bt6706/stm32bt6706/stm32bt6706.elf
 load
 break Reset_Handler
 

+ 1 - 1
.gdbinit_bt6706_noflash

@@ -1,4 +1,4 @@
 target remote localhost:3333
-file build/bt6702/stm32bt6706/stm32bt6706.elf
+file build/bt6706/stm32bt6706/stm32bt6706.elf
 break Reset_Handler
 monitor halt

+ 1 - 1
Makefile

@@ -1,4 +1,4 @@
-TARGETS = projects/gcc/tools iap modules  #service_hw 
+TARGETS = projects/gcc/tools iap modules service_hw 
 BUILDDIR = build
 
 .PHONY: all config $(TARGETS) tools distclean

ファイルの差分が大きいため隠しています
+ 750 - 664
modules/HTTP_Server/fsdata.c


+ 9 - 19
modules/HTTP_Server/http_server.c

@@ -20,7 +20,6 @@
 #include "megatec.h"
 #include "log.h"
 #include "hal.h"
-#include "radius_user.h"
 #include "sntp_api.h"
 
 #ifdef PRINTF_STDLIB
@@ -124,9 +123,6 @@ unsigned long log_ptr = 0;
 unsigned long log_size = 0;
 bool fLogTransInprog = false;
 
-
-static bool fl_raddius_net_err = false;
-
 /**
   * @brief  Общая структура настроек
   */
@@ -778,7 +774,7 @@ void HTTP_SetSettings(char *buf, uint16_t lenBuf)
     memset(value, 0, len);
   }
   memset(value, 0, len);
-
+#ifdef HARDWARE_BT6702
   GetParamValue(buf, "swauth=", value, &valueLen);
   SetAuthEnableStateStr(value);
 
@@ -809,6 +805,7 @@ void HTTP_SetSettings(char *buf, uint16_t lenBuf)
 		}
   }
   memset(value, 0, len);
+#endif
 
   // Параметры реле и сухих контактов
   GetParamValue(buf, "di1=", value, &valueLen);
@@ -1197,6 +1194,7 @@ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *
 {
   char *beginValue = 0;
   char *endValue = 0;
+  char *endValueTemp = 0;
   int  len = 0;
   char *strPtr = 0;
 
@@ -1206,6 +1204,9 @@ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *
   {
     beginValue = strpbrk(strPtr,"=");
     endValue = strpbrk(strPtr,";");
+    endValueTemp = strpbrk(strPtr,"\r");
+	if(endValueTemp != 0 && endValueTemp < endValue)
+	   endValue = endValueTemp;
     if (endValue == 0)
       endValue = strpbrk(strPtr,"\n");
     len = endValue - beginValue - 1;
@@ -1358,8 +1359,7 @@ static void HTTP_ForceUserLogout(uint8_t user_id)
   */
 void LogoutTimerCallback(TimerHandle_t pxTimer) {
     uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer );
-	if( sSettings.sRADIUS.Auth_enable )
-		HTTP_ForceUserLogout(user_id);
+	HTTP_ForceUserLogout(user_id);
 }
 
 /**
@@ -1436,19 +1436,12 @@ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 //
 void Cockie(void)
 {
-  char* endPtr;
-  uint32_t len;
   receiveBuf[receivedBufLen] = '\0';
   //printf("receive %s \r\n", receiveBuf);
   // Get cookie "uname" value 
   memset(CookieBuf, 0, sizeof(CookieBuf));
   CookiePtr = strstr(receiveBuf, "uname=");
-  endPtr = strstr(CookiePtr, "\r");
-  len =  (endPtr - CookiePtr)+2;
-  if(len < 50)
-	strncpy(CookieBuf, CookiePtr,len);
-  else
-	strncpy(CookieBuf, CookiePtr, 50);
+  strncpy(CookieBuf, CookiePtr, 50);
   
   //printf("********CookieBuf1= %s\r\n", CookieBuf);
   memset(name, 0, MAX_WEB_COOKIE_LEN);
@@ -1459,10 +1452,7 @@ void Cockie(void)
   memset(CookieBuf, 0, sizeof(CookieBuf));
   // Get cookie "id" value 
   CookiePtr = strstr(receiveBuf, " id=");
-  if(len < 50)
- 	strncpy(CookieBuf, CookiePtr,len);
-  else
-    strncpy(CookieBuf, CookiePtr, 50);
+  strncpy(CookieBuf, CookiePtr, 50);
    
   //printf("********CookieBuf1= %s\r\n", CookieBuf);
   memset(id, 0, MAX_WEB_COOKIE_LEN);

+ 0 - 39
modules/HTTP_Server/http_server.h

@@ -9,20 +9,6 @@
 #define SSL_TASK_PRIO   ( configMAX_PRIORITIES - 3 )
 #define FRAME_SIZE      (1000)
 
-typedef enum
-{
-  SSL_ACCEPT = 0,
-  SSL_ERROR,
-  SSL_CRITICAL_ERROR,
-  SSL_HANDSHAKE,
-  SSL_READ,
-  SSL_PROCESSING,
-  SSL_CLOSE,
-  SSL_WRITE,
-  SSL_WRITE_OK,
-  SSL_WRITE_ERROR,
-  
-} SSL_SERVER_STATE;
 
 typedef enum
 {
@@ -57,10 +43,6 @@ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err);
 static err_t http_recv(void *arg, struct tcp_pcb *pcb,  struct pbuf *p, err_t err);
 
 
-
-
-void http_server_netconn_init();
-
 /**
   * @brief  Выводим запросы в консоль
   */
@@ -142,41 +124,20 @@ void ClearParamString(char *inBuf);
 void HTTP_ReplaceSimbol(char *str, char sim1, char sim2);
 
 
-// -----------------------------------------------------------------------------
-//
-//
-//  SSL тесты
-//
-//
-// -----------------------------------------------------------------------------
 
 #ifdef __cplusplus
  extern "C" {
 #endif
 
 
-/* Exported types ------------------------------------------------------------*/
-typedef struct
-{
-  uint32_t State;
-}rng_state;
-
 void Cockie(void);
 void getAuthenticatedState(void);
-void ssl_server(void *pvParameters);
 
 
-int RandVal(void* arg);
 void HTTP_SendHistory(void);
 void HTTP_SendLog(void);
-void HTTPS_Init();
-int SSL_ReadRoutine(mbedtls_ssl_context *ssl, unsigned char* recvBuf);
-char* SSL_ProcessingRoutine(uint16_t* sendLen);
-SSL_SERVER_STATE SSL_WriteRoutine(mbedtls_ssl_context *ssl, char *data, int datalen);
 char* AuthenticatedFalseRoutine(uint16_t* sendLen);
 char* AuthenticatedTrueRoutine(uint16_t* sendLen);
-SSL_SERVER_STATE SSL_SendFrames(mbedtls_ssl_context *ssl, char *data, int datalen);
-SSL_SERVER_STATE SSL_Write(mbedtls_ssl_context *ssl, char *data, int datalen);
 
 #ifdef __cplusplus
 }

+ 9 - 95
modules/HTTP_Server/my_ssl_server.c

@@ -165,7 +165,6 @@ static err_t http_recv(void *arg, struct tcp_pcb *pcb,  struct pbuf *p, err_t er
 {
 	  char *data;
 	  struct http_state *hs;
-	  struct fs_file file = {0, 0};
 	  char buf[150];
 
 	  hs = arg;
@@ -487,7 +486,6 @@ static int fs_open(char *name, struct fs_file *file)
   */
 void HTTP_Init()
 {
-
     struct tcp_pcb *pcb;
 
     pcb = tcp_new();
@@ -555,9 +553,8 @@ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBuf
 
 int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut)
 {
-  uint8_t i, valueLen = 0;
+  uint8_t valueLen = 0;
   char value[20];
-  uint32_t nbytes = 0;
 
   (void)lenBufIn;
 
@@ -609,9 +606,8 @@ int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *len
 
 int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut)
 {
-  uint8_t i, valueLen = 0;
+  uint8_t valueLen = 0;
   char value[20];
-  uint32_t nbytes = 0;
 
   (void)lenBufIn;
 
@@ -1005,13 +1001,6 @@ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *le
   */
 void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut)
 {
-  char tempStr[50];
-  strncpy(tempStr, bufIn, 50);
-  char value[20];
-  uint8_t valueLen;
-
-  memset(value, 0, 20);
-
   /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть
      отправить ответ серверу о статусе пароля */
   HTTP_StartResetTask(true);
@@ -1032,7 +1021,7 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 	  char tempStr[50];
 	  char login[20];
 	  char password[20];
-	  uint8_t valueLen, user_id;
+	  uint8_t valueLen, user_id = 0xff;
 	  char *strPtr = 0;
 	  char WebPassword[MAX_WEB_PASSWD_LEN];
 	  char WebLogin[MAX_WEB_LOGIN_LEN];
@@ -1261,6 +1250,7 @@ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *
 {
   char *beginValue = 0;
   char *endValue = 0;
+  char *endValueTemp = 0;
   int  len = 0;
   char *strPtr = 0;
 
@@ -1270,6 +1260,9 @@ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *
   {
     beginValue = strpbrk(strPtr,"=");
     endValue = strpbrk(strPtr,";");
+    endValueTemp = strpbrk(strPtr,"\r");
+    if(endValueTemp != 0 && endValueTemp < endValue)
+       endValue = endValueTemp;
     if (endValue == 0)
       endValue = strpbrk(strPtr,"\n");
     len = endValue - beginValue - 1;
@@ -1543,18 +1536,11 @@ struct fs_file file = {0, 0};
 //
 void Cockie(void)
 {
-  char* endPtr;
-  uint32_t len;
   receiveBuf[receivedBufLen] = '\0';
   //printf("receive %s \r\n", receiveBuf);
   // Get cookie "uname" value
   memset(CookieBuf, 0, sizeof(CookieBuf));
   CookiePtr = strstr(receiveBuf, "uname=");
-  endPtr = strstr(CookiePtr, "\r");
-  len =  (endPtr - CookiePtr)+2;
-  if(len < 50)
-	strncpy(CookieBuf, CookiePtr,len);
-  else
 	strncpy(CookieBuf, CookiePtr, 50);
 
   //printf("********CookieBuf1= %s\r\n", CookieBuf);
@@ -1566,10 +1552,7 @@ void Cockie(void)
   memset(CookieBuf, 0, sizeof(CookieBuf));
   // Get cookie "id" value
   CookiePtr = strstr(receiveBuf, " id=");
-  if(len < 50)
- 	strncpy(CookieBuf, CookiePtr,len);
-  else
-    strncpy(CookieBuf, CookiePtr, 50);
+  strncpy(CookieBuf, CookiePtr, 50);
 
   //printf("********CookieBuf1= %s\r\n", CookieBuf);
   memset(id, 0, MAX_WEB_COOKIE_LEN);
@@ -1997,69 +1980,7 @@ char* AuthenticatedTrueRoutine(uint16_t* sendLen)
     char *DataOffset;
     char *ptr;
 
-  /*  if (strncmp(receiveBuf, "GET /main.css", 13) == 0) // +
-    {
-        fs_open("/main.css", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /rotek.png", 14) == 0) // +
-    {
-        fs_open("/rotek.png", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /favicon.ico", 16) == 0) // ?
-    {
-        fs_open("/favicon.ico", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /main.js", 12) == 0) // +
-    {
-        fs_open("/main.js", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /role.js", 12) == 0)
-    {
-        fs_open("/role.js", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /settings.html", 18) == 0) // +
-    {
-        HTTP_UpdateUserLoginTime(user_id);
-        if (seclevel == 0)
-            fs_open("/settings.html", &file);
-        else
-            fs_open("/index.html", &file);
-
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /info.html", 14) == 0) // +
-    {
-        HTTP_UpdateUserLoginTime(user_id);
-        fs_open("/info.html", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /history.html", 17) == 0)
-    {
-        HTTP_UpdateUserLoginTime(user_id);
-        fs_open("/history.html", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else if (strncmp(receiveBuf, "GET /ups_history.html", 21) == 0)
-    {
-        HTTP_UpdateUserLoginTime(user_id);
-        fs_open("/ups_history.html", &file);
-        *sendLen = file.len;
-        return file.data;
-    }
-    else*/ if (strncmp(receiveBuf, "GET /getJson.cgi", 16) == 0) // +
+    if (strncmp(receiveBuf, "GET /getJson.cgi", 16) == 0) // +
     {
         HTTP_GetParamsPage1(sendBuf);
         *sendLen = strlen(sendBuf);
@@ -2563,14 +2484,8 @@ char* send_file(char *filename, char *pnonmatch,  struct fs_file *file, uint16_t
         DBG printf(sendBuf);
         *Len = strlen(sendBuf);
         return sendBuf;
-        //hs->file = sendBuf;
-        //hs->left = strlen(sendBuf);
     }
     else {
-        /* Send file */
-        //DBG printf("%s\r\n\r\n", filename);
-        //hs->file = file->data;
-        //hs->left = file->len;
     	*Len = file->len;
     	return file->data;
     }
@@ -2654,7 +2569,6 @@ bool GetFileName(char *inStr, char *fileName, uint8_t *fileNameLen)
   }
 }
 
-
 #endif
 
 

+ 2 - 1
modules/HTTP_Server/web_params_api.c

@@ -203,7 +203,7 @@ void HTTP_GetSettings(char *buf)
   GetDhcpStateStr(str, &len);  
   strcat(buf, "\",\"dhcp\":");
   strncat(buf, str, len);
-
+#ifdef HARDWARE_BT6702
   GetAuthEnableStateStr(str, &len);
   strcat(buf, ",\"swauth\":");
   strncat(buf, str, len);
@@ -228,6 +228,7 @@ void HTTP_GetSettings(char *buf)
   GetRDSEnableStateStr(str, &len);
   strcat(buf, "\",\"rs_enabled\":");
   strncat(buf, str, len);
+#endif
 
   /* Параметры даты и времени */
   GetDateStr(str, &len);

+ 18 - 1
modules/Makefile

@@ -47,7 +47,9 @@ INCLUDES += -Icommon
 INCLUDES += -Imonitor
 INCLUDES += -Ilog
 INCLUDES += -Itesting
+ifeq ($(HARDWARE), bt6702)
 INCLUDES += -Iradius
+endif
 INCLUDES += -Imbedtls_api
 CSRC += $(wildcard leds/*.c)
 CSRC += $(wildcard buttons/*.c)
@@ -58,7 +60,9 @@ CSRC += $(wildcard common/*.c)
 CSRC += $(wildcard monitor/*.c)
 CSRC += $(wildcard log/*.c)
 CSRC += $(wildcard testing/*.c)
+ifeq ($(HARDWARE), bt6702)
 CSRC += $(wildcard radius/*.c)
+endif
 CSRC += $(wildcard mbedtls_api/*.c)
 
 CFLAGS += -DOS_FREERTOS
@@ -118,6 +122,7 @@ INCLUDES += -I../thirdparty/mbedTLS/include/
 
 CSRC += $(wildcard ../thirdparty/mbedTLS/library/*.c)
 
+ifeq ($(HARDWARE), bt6702)
 #RADDIUS_SERVER
 
 INCLUDES += -I../thirdparty/FreeRadius/
@@ -125,16 +130,28 @@ INCLUDES += -I../thirdparty/FreeRadius/include/
 INCLUDES += -I../thirdparty/FreeRadius/lib/
 
 CSRC += $(wildcard ../thirdparty/FreeRadius/lib/*.c)
-    
+endif
     
 CFLAGS += -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DLOG_ENABLE -DMBEDTLS_CONFIG_FILE='<mbedtls_config.h>'
 
+ifeq ($(HARDWARE), bt6702)
 BUILDDIR = ../build/bt6702/$(TARGET)
+endif
+
+ifeq ($(HARDWARE), bt6706)
+BUILDDIR = ../build/bt6706/$(TARGET)
+endif
 
 FW_FLASH_START = $(shell awk '/USER_FLASH_FIRST_PAGE_ADDRESS/{print $$3}' ../config/common_config.h )
 FW_FLASH_CRC = $(shell awk '/USER_FLASH_CRC_ADDRESS/{print $$3}' ../config/common_config.h )
 
+ifeq ($(HARDWARE), bt6702)
 FW_NAME = BT_6702xx
+endif
+
+ifeq ($(HARDWARE), bt6706)
+FW_NAME = BT_6706xx
+endif
 
 -include ../Makefile.inc.stm32
 

+ 6 - 2
modules/parameters.c

@@ -344,7 +344,7 @@ void GetDOUT1StatusStr(char *str, uint8_t *len)
   */
 void GetDOUT2StatusStr(char *str, uint8_t *len)
 {
-	sprintf(str, "%d", (get_state_din_outs(DOUT3)^3));
+	sprintf(str, "%d", (get_state_din_outs(DOUT3)^1));
 	*len = strlen(str);
 }
 #endif
@@ -644,6 +644,7 @@ void GetManagerIp5(char *str, uint8_t *len)
   *len = strlen(str);
 }
 
+#ifdef HARDWARE_BT6702
 // ************************************************************************** //
 //                             Параметры RADIUS
 
@@ -713,6 +714,8 @@ void GetAuthEnableStateStr(char *str, uint8_t *len)
   *len = 1;
 }
 
+#endif
+
 // ************************************************************************** //
 //                          Флаги
 
@@ -899,6 +902,7 @@ void SetComment(char *str)
   strcpy(sSettings.sInfo.comments, str);
 }
 
+#ifdef HARDWARE_BT6702
 // ************************************************************************** //
 //                             Сетевые параметры RADIUS сервера
 /**
@@ -954,7 +958,7 @@ void SetAuthEnableStateStr(char *str)
   else
 	  sSettings.sRADIUS.Auth_enable = 0;
 }
-
+#endif
 // ************************************************************************** //
 //                             Параметры даты и времени
 

+ 7 - 0
modules/parameters.h

@@ -218,6 +218,7 @@ void GetManagerIp3(char *str, uint8_t *len);
 void GetManagerIp4(char *str, uint8_t *len);
 void GetManagerIp5(char *str, uint8_t *len);
 
+#ifdef HARDWARE_BT6702
 // ************************************************************************** //
 //                             Параметры RADIUS
 
@@ -251,6 +252,8 @@ void GetRDSEnableStateStr(char *str, uint8_t *len);
   */
 void GetAuthEnableStateStr(char *str, uint8_t *len);
 
+#endif
+
 // ************************************************************************** //
 //                             Параметры реле/сухих контактов
 
@@ -394,6 +397,8 @@ void SetLocation(char *str);
   */
 void SetComment(char *str);
 
+#ifdef HARDWARE_BT6702
+
 // ************************************************************************** //
 //                             Сетевые параметры RADIUS сервера
 /**
@@ -426,6 +431,8 @@ void SetRDSEnableStateStr(char *str);
   */
 void SetAuthEnableStateStr(char *str);
 
+#endif
+
 // ************************************************************************** //
 //                             Параметры даты и времени
 

+ 13 - 5
modules/settings_api.c

@@ -70,9 +70,9 @@ void SETTINGS_SetBootParamsDef(void)
 void SETTINGS_SetWebParamsDef(void)
 {
 	  strcpy(sSettings.sWebParams.ip, "192.168.0.254");
-	  strcpy(sSettings.sWebParams.gate, "192.168.14.1");
+	  strcpy(sSettings.sWebParams.gate, "192.168.0.1");
 	  strcpy(sSettings.sWebParams.mask, "255.255.255.0");
-	  sSettings.sWebParams.dhcpEnable = 1;
+	  sSettings.sWebParams.dhcpEnable = 0;
 }
 
 /**
@@ -95,7 +95,7 @@ void SETTINGS_SetSnmpDef(void)
   strcpy(sSettings.sSnmp.readCommunity, "public");
   strcpy(sSettings.sSnmp.writeCommunity, "public");
   strcpy(sSettings.sSnmp.sysContact, "");
-  strcpy(sSettings.sSnmp.sysName, "BT-6702");
+  strcpy(sSettings.sSnmp.sysName, HW_REV);
   strcpy(sSettings.sSnmp.sysLocation, "");
   strcpy(sSettings.sSnmp.managerIP, "0.0.0.0");
   strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0");
@@ -192,6 +192,7 @@ void SETTINGS_SetINOUTSDef(void)
 	sSettings.sInOuts.din_type_act[0] = DI_CONN;
 }
 
+#ifdef HARDWARE_BT6702
 /**
   * @brief  Установить параметры RADIUS по умолчанию
   */
@@ -218,7 +219,8 @@ void SETTINGS_SetSSLcrtDef(void){
 	//memcpy(sSettings.our_srv_key, (unsigned char *) mbedtls_test_srv_key, mbedtls_test_srv_key_len);
   
 }
-  
+#endif
+
 /**
   * @brief  Сброс настроек в значения по умолчанию
   */
@@ -230,8 +232,10 @@ void SETTINGS_SetDefault(void)
   SETTINGS_SetServiceDef();
   SETTINGS_SetSntpDef();
   SETTINGS_SetINOUTSDef();
+#ifdef HARDWARE_BT6702
   SETTINGS_SetRADIUSDef();
   SETTINGS_SetSSLcrtDef();
+#endif
 
   sSettings.CritSecCRC = SETTINGS_GetCritSecCRC();
 }
@@ -268,8 +272,10 @@ void SETTINGS_SetAllDefault(void)
   SETTINGS_SetServiceDef();
   SETTINGS_SetSntpDef();
   SETTINGS_SetINOUTSDef();
+#ifdef HARDWARE_BT6702
   SETTINGS_SetRADIUSDef();
   SETTINGS_SetSSLcrtDef();
+#endif
   
   sSettings.CritSecCRC = SETTINGS_GetCritSecCRC();
 
@@ -289,9 +295,11 @@ void SETTINGS_SetDefaultDebug(void)
   //SETTINGS_SetServiceDef();
   SETTINGS_SetSntpDef();
   SETTINGS_SetINOUTSDef();
-  SETTINGS_SetRADIUSDef();
   //SETTINGS_SetInfoDef();
+#ifdef HARDWARE_BT6702
+  SETTINGS_SetRADIUSDef();
   SETTINGS_SetSSLcrtDef();
+#endif
   
   sSettings.CritSecCRC = SETTINGS_GetCritSecCRC();
 

+ 4 - 2
modules/settings_api.h

@@ -198,9 +198,11 @@ typedef struct
   AUTH_t		sAuth[MAX_WEB_USERS];
   SNTP_t        sSNTP;
   INOUTS_t		sInOuts;
+#ifdef HARDWARE_BT6702
   RADIUS_t		sRADIUS;
   //char			our_srv_crt[1205];
   char			our_srv_crt[1705];
+#endif
   uint32_t      controlWorld;  // Слово для контроля целостности структуры настроек
   
 } SETTINGS_t;
@@ -250,7 +252,7 @@ void SETTINGS_SetSntpDef(void);
   * @brief  Установить параметры настроек сухих контактов / реле по умолчанию
   */
 void SETTINGS_SetINOUTSDef(void);
-
+#ifdef HARDWARE_BT6702
 /**
   * @brief  Установить параметры RADIUS по умолчанию
   */
@@ -260,7 +262,7 @@ void SETTINGS_SetRADIUSDef(void);
   * @brief  Установить параметры сертификата сервера по умолчанию
   */
 void SETTINGS_SetSSLcrtDef(void);
-
+#endif
 /**
   * @brief  Установить значение сервисных настроек по умолчанию
   */

BIN
output/BT_6702xx.bin


BIN
output/iap.bin


+ 1 - 1
service_hw/Makefile

@@ -57,7 +57,7 @@ CSRC += $(wildcard buttons/*.c)
 CSRC += $(wildcard ../modules/jumper/*.c)
 CSRC += $(wildcard ../modules/d_inouts/*.c)
 CSRC += $(wildcard ../modules/common/*.c)
-CSRC += $(wildcard ../modules/mbedtls_api/*.c)
+#CSRC += $(wildcard ../modules/mbedtls_api/*.c)
 CSRC += $(wildcard ../modules/*.c)
 
 CFLAGS += -DOS_FREERTOS

BIN
tracefile.bin


+ 2 - 1
user/init_task.c

@@ -39,10 +39,11 @@
 //#include "ups_params.h"
 //#include "ups_monitor.h"
 #include "lwip/stats.h"
+#ifdef HARDWARE_BT6702
 #include "radius_user.h"
 #include "cert_req.h"
 #include "parse_rsa.h"
-
+#endif
 #ifdef PRINTF_STDLIB
 #include <stdio.h>
 #endif

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません