Merge remote-tracking branch 'gitlab/main2' into main2
This commit is contained in:
commit
92e3c1a5c0
|
|
@ -3,6 +3,7 @@
|
||||||
<WifiSetCard></WifiSetCard>
|
<WifiSetCard></WifiSetCard>
|
||||||
<EthSetCard></EthSetCard>
|
<EthSetCard></EthSetCard>
|
||||||
<GSMSetCard></GSMSetCard>
|
<GSMSetCard></GSMSetCard>
|
||||||
|
<SerialCard></SerialCard>
|
||||||
<LoRaSetCard></LoRaSetCard>
|
<LoRaSetCard></LoRaSetCard>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -12,6 +13,7 @@ import WifiSetCard from "components/webguicomp/cards/WifiSetCard.vue";
|
||||||
import EthSetCard from "components/webguicomp/cards/EthSetCard.vue";
|
import EthSetCard from "components/webguicomp/cards/EthSetCard.vue";
|
||||||
import GSMSetCard from "src/components/webguicomp/cards/GSMSetCard.vue";
|
import GSMSetCard from "src/components/webguicomp/cards/GSMSetCard.vue";
|
||||||
import LoRaSetCard from "src/components/webguicomp/cards/LoRaSetCard.vue";
|
import LoRaSetCard from "src/components/webguicomp/cards/LoRaSetCard.vue";
|
||||||
|
import SerialCard from "src/components/webguicomp/cards/SerialCard.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'InterfacesSettings'
|
name: 'InterfacesSettings'
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#define APP_UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
|
#define APP_UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
|
||||||
#define APP_DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
|
#define APP_DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
|
||||||
|
|
||||||
|
#define MQTT_CUSTOM_HANDLER_DEBUG CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL
|
||||||
|
|
||||||
esp_err_t AppServiceMQTTSend(char *data, int len, int idx)
|
esp_err_t AppServiceMQTTSend(char *data, int len, int idx)
|
||||||
{
|
{
|
||||||
|
|
@ -109,8 +110,6 @@ void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int3
|
||||||
{
|
{
|
||||||
esp_mqtt_event_handle_t event = event_data;
|
esp_mqtt_event_handle_t event = event_data;
|
||||||
esp_mqtt_client_handle_t client = event->client;
|
esp_mqtt_client_handle_t client = event->client;
|
||||||
//mqtt_client_t *ctx = (mqtt_client_t*) event->user_context;
|
|
||||||
ESP_LOGI(TAG, "%s", (char*)(((mqtt_client_t*)(handler_args))->user_arg));
|
|
||||||
int msg_id;
|
int msg_id;
|
||||||
char topic[CONFIG_WEBGUIAPP_MQTT_MAX_TOPIC_LENGTH];
|
char topic[CONFIG_WEBGUIAPP_MQTT_MAX_TOPIC_LENGTH];
|
||||||
switch ((esp_mqtt_event_id_t) event_id)
|
switch ((esp_mqtt_event_id_t) event_id)
|
||||||
|
|
@ -119,7 +118,10 @@ void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int3
|
||||||
ComposeTopic(topic, idx, APP_SERVICE_NAME, APP_DOWNLINK_SUBTOPIC);
|
ComposeTopic(topic, idx, APP_SERVICE_NAME, APP_DOWNLINK_SUBTOPIC);
|
||||||
//Subscribe to the service called "APP"
|
//Subscribe to the service called "APP"
|
||||||
msg_id = esp_mqtt_client_subscribe(client, (const char*) topic, 0);
|
msg_id = esp_mqtt_client_subscribe(client, (const char*) topic, 0);
|
||||||
|
#if(MQTT_CUSTOM_HANDLER_DEBUG > 0)
|
||||||
ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id);
|
ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id);
|
||||||
|
ESP_LOGI(TAG, "Subscribe to %s", topic);
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MQTT_EVENT_DATA:
|
case MQTT_EVENT_DATA:
|
||||||
|
|
@ -135,12 +137,8 @@ void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int3
|
||||||
M.chlidx = idx;
|
M.chlidx = idx;
|
||||||
M.outputDataBuffer = respbuf;
|
M.outputDataBuffer = respbuf;
|
||||||
M.outputDataLength = EXPECTED_MAX_DATA_SIZE;
|
M.outputDataLength = EXPECTED_MAX_DATA_SIZE;
|
||||||
|
|
||||||
ServiceDataHandler(&M);
|
ServiceDataHandler(&M);
|
||||||
//AppServiceDataHandler(&M);
|
|
||||||
AppServiceMQTTSend(M.outputDataBuffer, strlen(M.outputDataBuffer), idx);
|
AppServiceMQTTSend(M.outputDataBuffer, strlen(M.outputDataBuffer), idx);
|
||||||
|
|
||||||
|
|
||||||
free(respbuf);
|
free(respbuf);
|
||||||
#if(MQTT_CUSTOM_HANDLER_DEBUG > 0)
|
#if(MQTT_CUSTOM_HANDLER_DEBUG > 0)
|
||||||
ESP_LOGI(TAG, "SERVICE data handler on client %d", idx);
|
ESP_LOGI(TAG, "SERVICE data handler on client %d", idx);
|
||||||
|
|
|
||||||
|
|
@ -600,7 +600,7 @@ CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
|
||||||
CONFIG_HTTPD_MAX_URI_LEN=512
|
CONFIG_HTTPD_MAX_URI_LEN=512
|
||||||
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
|
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
|
||||||
CONFIG_HTTPD_PURGE_BUF_LEN=32
|
CONFIG_HTTPD_PURGE_BUF_LEN=32
|
||||||
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
|
CONFIG_HTTPD_LOG_PURGE_DATA=y
|
||||||
# CONFIG_HTTPD_WS_SUPPORT is not set
|
# CONFIG_HTTPD_WS_SUPPORT is not set
|
||||||
# CONFIG_HTTPD_QUEUE_WORK_BLOCKING is not set
|
# CONFIG_HTTPD_QUEUE_WORK_BLOCKING is not set
|
||||||
# end of HTTP Server
|
# end of HTTP Server
|
||||||
|
|
@ -1649,6 +1649,14 @@ CONFIG_WEBGUIAPP_SNTP_AUTOUPDATE_PERIOD=3600
|
||||||
CONFIG_WEBGUIAPP_SNTP_TIMEZONE=2
|
CONFIG_WEBGUIAPP_SNTP_TIMEZONE=2
|
||||||
# end of SNTP client settings
|
# end of SNTP client settings
|
||||||
|
|
||||||
|
#
|
||||||
|
# Command Processor settings
|
||||||
|
#
|
||||||
|
CONFIG_WEBGUIAPP_MAX_OBJECTS_NUM=8
|
||||||
|
CONFIG_WEBGUIAPP_MAX_COMMANDS_NUM=8
|
||||||
|
CONFIG_WEBGUIAPP_MAX_COMMAND_STRING_LENGTH=64
|
||||||
|
# end of Command Processor settings
|
||||||
|
|
||||||
#
|
#
|
||||||
# CRON settings
|
# CRON settings
|
||||||
#
|
#
|
||||||
|
|
@ -1701,46 +1709,28 @@ CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.150.1"
|
||||||
#
|
#
|
||||||
# GPRS settings
|
# GPRS settings
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_GPRS_ENABLE=y
|
# CONFIG_WEBGUIAPP_GPRS_ENABLE is not set
|
||||||
# CONFIG_WEBGUIAPP_GPRS_ON is not set
|
|
||||||
CONFIG_MODEM_DEVICE_POWER_CONTROL_PIN=5
|
|
||||||
CONFIG_MODEM_DEVICE_SIM800=y
|
|
||||||
# CONFIG_MODEM_DEVICE_BG96 is not set
|
|
||||||
# CONFIG_MODEM_DEVICE_SIM7600 is not set
|
|
||||||
CONFIG_MODEM_PPP_APN="internet"
|
|
||||||
CONFIG_MODEM_PPP_AUTH_USERNAME="gdata"
|
|
||||||
CONFIG_MODEM_PPP_AUTH_PASSWORD="gdata"
|
|
||||||
# CONFIG_MODEM_PPP_AUTH_NONE is not set
|
|
||||||
# CONFIG_MODEM_NEED_SIM_PIN is not set
|
|
||||||
|
|
||||||
#
|
|
||||||
# UART Configuration
|
|
||||||
#
|
|
||||||
CONFIG_MODEM_UART_PORT_NUM=1
|
|
||||||
CONFIG_MODEM_UART_TX_PIN=17
|
|
||||||
CONFIG_MODEM_UART_RX_PIN=16
|
|
||||||
CONFIG_MODEM_UART_RTS_PIN=0
|
|
||||||
CONFIG_MODEM_UART_CTS_PIN=0
|
|
||||||
CONFIG_MODEM_UART_EVENT_TASK_STACK_SIZE=2048
|
|
||||||
CONFIG_MODEM_UART_EVENT_TASK_PRIORITY=5
|
|
||||||
CONFIG_MODEM_UART_EVENT_QUEUE_SIZE=30
|
|
||||||
CONFIG_MODEM_UART_PATTERN_QUEUE_SIZE=20
|
|
||||||
CONFIG_MODEM_UART_TX_BUFFER_SIZE=512
|
|
||||||
CONFIG_MODEM_UART_RX_BUFFER_SIZE=1024
|
|
||||||
# end of UART Configuration
|
|
||||||
# end of GPRS settings
|
# end of GPRS settings
|
||||||
|
|
||||||
#
|
#
|
||||||
# LoRaWAN settings
|
# LoRaWAN settings
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_LORAWAN_ENABLE=y
|
# CONFIG_WEBGUIAPP_LORAWAN_ENABLE is not set
|
||||||
CONFIG_LORA_SPI_CS_GPIO=4
|
|
||||||
CONFIG_LORA_DIO0_GPIO=34
|
|
||||||
CONFIG_LORA_DIO1_GPIO=35
|
|
||||||
CONFIG_LORA_APP_ID="BBBBBBBBBBBBBBBB"
|
|
||||||
CONFIG_LORA_APP_KEY="CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
|
|
||||||
# end of LoRaWAN settings
|
# end of LoRaWAN settings
|
||||||
|
|
||||||
|
#
|
||||||
|
# Serial port configuration
|
||||||
|
#
|
||||||
|
CONFIG_WEBGUIAPP_UART_TRANSPORT_ENABLE=y
|
||||||
|
CONFIG_WEBGUIAPP_UART_PORT_NUM=2
|
||||||
|
# CONFIG_WEBGUIAPP_UART_TO_MQTT_BRIDGE_ENABLED is not set
|
||||||
|
CONFIG_WEBGUIAPP_UART_BAUD_RATE=115200
|
||||||
|
CONFIG_WEBGUIAPP_UART_RXD=35
|
||||||
|
CONFIG_WEBGUIAPP_UART_TXD=33
|
||||||
|
# CONFIG_WEBGUIAPP_UART_MODE_RS485_ENABLED is not set
|
||||||
|
CONFIG_WEBGUIAPP_UART_BUF_SIZE=1024
|
||||||
|
# end of Serial port configuration
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modbus settings
|
# Modbus settings
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user