 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
20 #include "../../include/esp3d_config.h"
21 #if defined (WIFI_FEATURE) || defined (ETH_FEATURE)
22 #include "../commands.h"
23 #include "../esp3doutput.h"
24 #include "../settings_esp3d.h"
25 #include "../../modules/network/netconfig.h"
26 #if defined (WIFI_FEATURE)
27 #include "../../modules/wifi/wificonfig.h"
29 #if defined (ETH_FEATURE)
30 #include "../../modules/ethernet/ethconfig.h"
32 #include "../../modules/authentication/authentication_service.h"
39 #ifdef AUTHENTICATION_FEATURE
41 output->
printERROR(
"Wrong authentication!", 401);
46 #endif //AUTHENTICATION_FEATURE
49 if (parameter.length() == 0) {
58 #ifdef AUTHENTICATION_FEATURE
60 output->
printERROR(
"Wrong authentication!", 401);
63 #endif //AUTHENTICATION_FEATURE
65 String IP =
get_param (cmd_params,
"IP=");
66 String GW =
get_param (cmd_params,
"GW=");
67 String MSK =
get_param (cmd_params,
"MSK=");
92 #endif //WIFI_FEATURE || ETH_FEATURE
const char * get_param(const char *cmd_params, const char *label)
bool ESP103(const char *cmd_params, level_authenticate_type auth_level, ESP3DOutput *output)
static bool isValidIP(const char *string)
size_t printMSG(const char *s, bool withNL=true)
size_t printERROR(const char *s, int code_error=200)
#define ESP_STA_GATEWAY_VALUE
static bool write_IP_String(int pos, const char *value)
#define ESP_STA_MASK_VALUE
static String read_IP_String(int pos, bool *haserror=NULL)