|
@@ -18,6 +18,7 @@
|
|
|
#include "rtc.h"
|
|
|
#include "megatec.h"
|
|
|
#include "log.h"
|
|
|
+#include "parameters.h"
|
|
|
|
|
|
#include "apps/snmp.h"
|
|
|
#include "snmp_mib2.h"
|
|
@@ -188,10 +189,14 @@ void SNMP_SendUserTrap(uint8_t trapName)
|
|
|
|
|
|
void SNMP_SetObjDescr(void)
|
|
|
{
|
|
|
+ char str[50];
|
|
|
+ uint8_t len = 0;
|
|
|
|
|
|
memset(sSettings.sSnmp.sysDesc.description, 0, sizeof(sSettings.sSnmp.sysDesc.description));
|
|
|
|
|
|
strcpy(sSettings.sSnmp.sysDesc.description, HW_REV);
|
|
|
+#if HARDWARE_BT6711 || HARDWARE_BT6711_V1
|
|
|
+#else
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, " ");
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, VERSION);
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, " ");
|
|
@@ -202,8 +207,10 @@ void SNMP_SetObjDescr(void)
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, " ");
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, UPS.model);
|
|
|
strcat(sSettings.sSnmp.sysDesc.description, " ");
|
|
|
- strcat(sSettings.sSnmp.sysDesc.description, UPS.serial);
|
|
|
-
|
|
|
+ memset(str, 0, sizeof(str));
|
|
|
+ GetUPSSerialStr(str, &len);
|
|
|
+ strcat(sSettings.sSnmp.sysDesc.description, str);
|
|
|
+#endif
|
|
|
sSettings.sSnmp.sysDesc.len = strlen(sSettings.sSnmp.sysDesc.description);
|
|
|
snmp_mib2_set_sysdescr((u8_t *)sSettings.sSnmp.sysDesc.description, &sSettings.sSnmp.sysDesc.len);
|
|
|
}
|