remove http server start from user application
This commit is contained in:
parent
1b73b97108
commit
cadd90a3ca
|
|
@ -1 +1 @@
|
||||||
Subproject commit a239dc9b964fa8a717cc0142443855b47bd074be
|
Subproject commit 6fa1c4abd48625348b17c3dab1933ca79a0c6d8f
|
||||||
24
main/main.c
24
main/main.c
|
|
@ -1,17 +1,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "esp_event.h"
|
|
||||||
#include "esp_netif.h"
|
|
||||||
#include "nvs_flash.h"
|
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "driver/gpio.h"
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#include "SystemConfiguration.h"
|
#include "SystemConfiguration.h"
|
||||||
#include "romfs.h"
|
|
||||||
#include "NetTransport.h"
|
|
||||||
#include "HTTPServer.h"
|
#include "HTTPServer.h"
|
||||||
|
|
||||||
#define MANUAL_RESET 0
|
#define MANUAL_RESET 0
|
||||||
|
|
@ -23,22 +16,11 @@ void app_main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
WebGuiAppInit();
|
WebGuiAppInit();
|
||||||
|
regHTTPPrintCustom(&HTTPPrintCustom);
|
||||||
|
regAfterPostHandlerCustom(&AfterPostHandlerCustom);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Start web server*/
|
|
||||||
if (CONFIG_WEBGUIAPP_GPRS_ENABLE ||
|
|
||||||
CONFIG_WEBGUIAPP_ETHERNET_ENABLE ||
|
|
||||||
CONFIG_WEBGUIAPP_WIFI_ENABLE)
|
|
||||||
{
|
|
||||||
ESP_ERROR_CHECK(start_file_server());
|
|
||||||
regHTTPPrintCustom(&HTTPPrintCustom);
|
|
||||||
regAfterPostHandlerCustom(&AfterPostHandlerCustom);
|
|
||||||
|
|
||||||
}
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
printf("Hello from app_main!\n");
|
sleep(1);
|
||||||
sleep(5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
sdkconfig
38
sdkconfig
|
|
@ -1215,7 +1215,7 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||||
#
|
#
|
||||||
# WebGuiApp configuration
|
# WebGuiApp configuration
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0001"
|
CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0000"
|
||||||
CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME"
|
CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME"
|
||||||
CONFIG_WEBGUIAPP_USERNAME="user"
|
CONFIG_WEBGUIAPP_USERNAME="user"
|
||||||
CONFIG_WEBGUIAPP_USERPASS="password"
|
CONFIG_WEBGUIAPP_USERPASS="password"
|
||||||
|
|
@ -1250,10 +1250,10 @@ CONFIG_WEBGUIAPP_WIFI_SSID_AP="YourAP"
|
||||||
CONFIG_WEBGUIAPP_WIFI_KEY_AP="123456789"
|
CONFIG_WEBGUIAPP_WIFI_KEY_AP="123456789"
|
||||||
CONFIG_WEBGUIAPP_WIFI_SSID_STA="YourSTA"
|
CONFIG_WEBGUIAPP_WIFI_SSID_STA="YourSTA"
|
||||||
CONFIG_WEBGUIAPP_WIFI_KEY_STA="123456789"
|
CONFIG_WEBGUIAPP_WIFI_KEY_STA="123456789"
|
||||||
CONFIG_WEBGUIAPP_WIFI_IP_AP="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_IP_AP="192.168.150.1"
|
||||||
CONFIG_WEBGUIAPP_WIFI_IP_STA="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_IP_STA="192.168.150.1"
|
||||||
CONFIG_WEBGUIAPP_WIFI_MASK_STA="255.255.255.0"
|
CONFIG_WEBGUIAPP_WIFI_MASK_STA="255.255.255.0"
|
||||||
CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.150.1"
|
||||||
# end of WiFi settings
|
# end of WiFi settings
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -1261,9 +1261,9 @@ CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.1.150"
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_ETHERNET_ENABLE=y
|
CONFIG_WEBGUIAPP_ETHERNET_ENABLE=y
|
||||||
CONFIG_WEBGUIAPP_ETHERNET_ON=y
|
CONFIG_WEBGUIAPP_ETHERNET_ON=y
|
||||||
CONFIG_WEBGUIAPP_ETH_IP_DEFAULT="192.168.1.150"
|
CONFIG_WEBGUIAPP_ETH_IP_DEFAULT="192.168.160.1"
|
||||||
CONFIG_WEBGUIAPP_ETH_MASK_DEFAULT="255.255.255.0"
|
CONFIG_WEBGUIAPP_ETH_MASK_DEFAULT="255.255.255.0"
|
||||||
CONFIG_WEBGUIAPP_ETH_GATEWAY_DEFAULT="192.168.1.150"
|
CONFIG_WEBGUIAPP_ETH_GATEWAY_DEFAULT="192.168.160.1"
|
||||||
# CONFIG_WEBGUIAPP_ETHERNET_DHCP_DEFAULT is not set
|
# CONFIG_WEBGUIAPP_ETHERNET_DHCP_DEFAULT is not set
|
||||||
CONFIG_GPIO_RANGE_MIN=0
|
CONFIG_GPIO_RANGE_MIN=0
|
||||||
CONFIG_GPIO_RANGE_MAX=36
|
CONFIG_GPIO_RANGE_MAX=36
|
||||||
|
|
@ -1283,31 +1283,7 @@ CONFIG_ETH_SPI_PHY_ADDR0=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_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_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
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1215,7 +1215,7 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||||
#
|
#
|
||||||
# WebGuiApp configuration
|
# WebGuiApp configuration
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0001"
|
CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0000"
|
||||||
CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME"
|
CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME"
|
||||||
CONFIG_WEBGUIAPP_USERNAME="user"
|
CONFIG_WEBGUIAPP_USERNAME="user"
|
||||||
CONFIG_WEBGUIAPP_USERPASS="password"
|
CONFIG_WEBGUIAPP_USERPASS="password"
|
||||||
|
|
@ -1250,10 +1250,10 @@ CONFIG_WEBGUIAPP_WIFI_SSID_AP="YourAP"
|
||||||
CONFIG_WEBGUIAPP_WIFI_KEY_AP="123456789"
|
CONFIG_WEBGUIAPP_WIFI_KEY_AP="123456789"
|
||||||
CONFIG_WEBGUIAPP_WIFI_SSID_STA="YourSTA"
|
CONFIG_WEBGUIAPP_WIFI_SSID_STA="YourSTA"
|
||||||
CONFIG_WEBGUIAPP_WIFI_KEY_STA="123456789"
|
CONFIG_WEBGUIAPP_WIFI_KEY_STA="123456789"
|
||||||
CONFIG_WEBGUIAPP_WIFI_IP_AP="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_IP_AP="192.168.150.1"
|
||||||
CONFIG_WEBGUIAPP_WIFI_IP_STA="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_IP_STA="192.168.150.1"
|
||||||
CONFIG_WEBGUIAPP_WIFI_MASK_STA="255.255.255.0"
|
CONFIG_WEBGUIAPP_WIFI_MASK_STA="255.255.255.0"
|
||||||
CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.1.150"
|
CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.150.1"
|
||||||
# end of WiFi settings
|
# end of WiFi settings
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -1261,9 +1261,9 @@ CONFIG_WEBGUIAPP_WIFI_GATEWAY_STA="192.168.1.150"
|
||||||
#
|
#
|
||||||
CONFIG_WEBGUIAPP_ETHERNET_ENABLE=y
|
CONFIG_WEBGUIAPP_ETHERNET_ENABLE=y
|
||||||
CONFIG_WEBGUIAPP_ETHERNET_ON=y
|
CONFIG_WEBGUIAPP_ETHERNET_ON=y
|
||||||
CONFIG_WEBGUIAPP_ETH_IP_DEFAULT="192.168.1.150"
|
CONFIG_WEBGUIAPP_ETH_IP_DEFAULT="192.168.160.1"
|
||||||
CONFIG_WEBGUIAPP_ETH_MASK_DEFAULT="255.255.255.0"
|
CONFIG_WEBGUIAPP_ETH_MASK_DEFAULT="255.255.255.0"
|
||||||
CONFIG_WEBGUIAPP_ETH_GATEWAY_DEFAULT="192.168.1.150"
|
CONFIG_WEBGUIAPP_ETH_GATEWAY_DEFAULT="192.168.160.1"
|
||||||
# CONFIG_WEBGUIAPP_ETHERNET_DHCP_DEFAULT is not set
|
# CONFIG_WEBGUIAPP_ETHERNET_DHCP_DEFAULT is not set
|
||||||
CONFIG_GPIO_RANGE_MIN=0
|
CONFIG_GPIO_RANGE_MIN=0
|
||||||
CONFIG_GPIO_RANGE_MAX=36
|
CONFIG_GPIO_RANGE_MAX=36
|
||||||
|
|
@ -1274,9 +1274,9 @@ CONFIG_SPI_ETHERNETS_NUM=1
|
||||||
# CONFIG_KSZ8851SNL is not set
|
# CONFIG_KSZ8851SNL is not set
|
||||||
CONFIG_W5500=y
|
CONFIG_W5500=y
|
||||||
CONFIG_ETH_SPI_CLOCK_MHZ=12
|
CONFIG_ETH_SPI_CLOCK_MHZ=12
|
||||||
CONFIG_ETH_SPI_CS0_GPIO=15
|
CONFIG_ETH_SPI_CS0_GPIO=23
|
||||||
CONFIG_ETH_SPI_INT0_GPIO=4
|
CONFIG_ETH_SPI_INT0_GPIO=35
|
||||||
CONFIG_ETH_SPI_PHY_RST0_GPIO=-1
|
CONFIG_ETH_SPI_PHY_RST0_GPIO=4
|
||||||
CONFIG_ETH_SPI_PHY_ADDR0=1
|
CONFIG_ETH_SPI_PHY_ADDR0=1
|
||||||
# end of Ethernet settings
|
# end of Ethernet settings
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user