feat(vd960DBN): TCP JSON协议服务 — 端口5960, 鉴权+15条命令
- net_config.h: TCP_LISTEN=0→1, TCP=2 支持 JSON 监听 - 新增 tcp_json_srv.h/c: 行分隔 JSON, pwd_verify鉴权, 命令分发 - 实现15条协议命令: dev_info/ssc_net/iot_net/iot_topic/pwd_set/factory_reset等 - loop_param_set/query 接受命令返回stub(Loop MCU中继待实现) - net_srv.c: 集成 JSON 中断路由 + init - peripheral_main.c: 主循环 tcp_json_poll()
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "eth_driver.h"
|
||||
#include "net_srv.h"
|
||||
#include "storage.h"
|
||||
#include "tcp_json_srv.h"
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL TYPEDEFS
|
||||
@@ -45,7 +46,7 @@ const uint32_t Address = 0xFFFFFFFF;
|
||||
|
||||
__attribute__((aligned(4))) uint32_t Image_Flag __attribute__((section(".ImageFlag"))) = (uint32_t)&Address;
|
||||
|
||||
uint8_t g_dev_number[6] = ""; // É豸±àºÅ ²úÆ·±àºÅ
|
||||
uint8_t g_dev_number[6] = ""; // <EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD> <20><>Ʒ<EFBFBD><C6B7><EFBFBD>
|
||||
uint8_t g_dev_password[6] = {0x31, 0x32, 0x33, 0x34, 0x35, 0x36};
|
||||
uint8_t g_ble_safe_flag = 0;
|
||||
uint32_t g_ble_safe_counter_ori = 0;
|
||||
@@ -53,7 +54,7 @@ uint32_t g_ble_safe_counter_dst = 0;
|
||||
|
||||
char g_flag_debug = 1;
|
||||
|
||||
uint8_t g_dg_device_type = DDType_DLD950V4; // ???¨¨¡À?????????????
|
||||
uint8_t g_dg_device_type = DDType_DLD950V4; // ???<EFBFBD><EFBFBD><EFBFBD><EFBFBD>?????????????
|
||||
uint8_t g_dg_sub_dev_type = DDType_DLD950V4;
|
||||
|
||||
Sub_Code_Enable g_sub_code_enable = {0,};
|
||||
@@ -266,6 +267,8 @@ void Main_Circulation(void)
|
||||
|
||||
poll_dbn_ble();
|
||||
|
||||
tcp_json_poll();
|
||||
|
||||
key_event_srv();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user