mirror of
https://github.com/martin-ger/esp_wifi_repeater.git
synced 2026-07-27 19:56:03 +00:00
PEAP_password now 63 chars
This commit is contained in:
Binary file not shown.
Binary file not shown.
+2
-2
@@ -1,3 +1,3 @@
|
||||
16a684d2010ba4e1f455c0c447eb49fe04842f58 firmware/0x02000.bin
|
||||
9869f9b53d93b2ee6c272e35fcba314e2357a327 firmware/0x82000.bin
|
||||
d324a9a4a90fa827f6ef7c568ee36f15dd6f462c firmware/0x02000.bin
|
||||
bb6317dc3644c01984015b2f4b6772882f5045e1 firmware/0x82000.bin
|
||||
9bd7d25204d71b3db5f35e0b2def8a6aaa7f765c firmware/0x00000.bin
|
||||
|
||||
+82
-3
@@ -190,12 +190,13 @@ int ICACHE_FLASH_ATTR config_load(sysconfig_p config)
|
||||
config_save(config);
|
||||
return -1;
|
||||
}
|
||||
|
||||
os_printf("\r\nConfig found and loaded\r\n");
|
||||
spi_flash_read(base_address * SPI_FLASH_SEC_SIZE, (uint32 *) config, sizeof(sysconfig_t));
|
||||
|
||||
os_printf("\r\nConfig found and loaded (%d Bytes)\r\n", config->length);
|
||||
|
||||
if (config->length != sizeof(sysconfig_t))
|
||||
{
|
||||
os_printf("Length Mismatch, probably old version of config, loading defaults\r\n");
|
||||
os_printf("Length Mismatch (should be %d), probably old version of config, loading defaults\r\n", sizeof(sysconfig_t));
|
||||
config_load_default(config);
|
||||
config_save(config);
|
||||
return -1;
|
||||
@@ -309,3 +310,81 @@ void user_rf_pre_init() {
|
||||
}*/
|
||||
}
|
||||
}
|
||||
/*
|
||||
// user_pre_init is required from SDK v3.0.0 onwards
|
||||
// It is used to register the parition map with the SDK, primarily to allow
|
||||
// the app to use the SDK's OTA capability. We don't make use of that in
|
||||
// otb-iot and therefore the only info we provide is the mandatory stuff:
|
||||
// - RF calibration data
|
||||
// - Physical data
|
||||
// - System parameter
|
||||
// The location and length of these are from the 2A SDK getting started guide
|
||||
void ICACHE_FLASH_ATTR user_pre_init(void)
|
||||
{
|
||||
bool rc = false;
|
||||
static const partition_item_t part_table[] =
|
||||
{
|
||||
{SYSTEM_PARTITION_RF_CAL,
|
||||
0x3fb000,
|
||||
0x1000},
|
||||
{SYSTEM_PARTITION_PHY_DATA,
|
||||
0x3fc000,
|
||||
0x1000},
|
||||
{SYSTEM_PARTITION_SYSTEM_PARAMETER,
|
||||
0x3fd000,
|
||||
0x3000},
|
||||
};
|
||||
/*
|
||||
enum flash_size_map size_map = system_get_flash_size_map();
|
||||
uint32 rf_cal_sec = 0, addr, i;
|
||||
//os_printf("\nUser preinit: ");
|
||||
switch (size_map) {
|
||||
case FLASH_SIZE_4M_MAP_256_256:
|
||||
rf_cal_sec = 128 - 5;
|
||||
break;
|
||||
|
||||
case FLASH_SIZE_8M_MAP_512_512:
|
||||
rf_cal_sec = 256 - 5;
|
||||
break;
|
||||
|
||||
case FLASH_SIZE_16M_MAP_512_512:
|
||||
case FLASH_SIZE_16M_MAP_1024_1024:
|
||||
rf_cal_sec = 512 - 5;
|
||||
break;
|
||||
|
||||
case FLASH_SIZE_32M_MAP_512_512:
|
||||
case FLASH_SIZE_32M_MAP_1024_1024:
|
||||
rf_cal_sec = 1024 - 5;
|
||||
break;
|
||||
|
||||
default:
|
||||
rf_cal_sec = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
static const partition_item_t part_table[] =
|
||||
{
|
||||
{SYSTEM_PARTITION_RF_CAL,
|
||||
rf_cal_sec * 0x1000,
|
||||
0x1000},
|
||||
{SYSTEM_PARTITION_PHY_DATA,
|
||||
(rf_cal_sec + 1) * 0x1000,
|
||||
0x1000},
|
||||
{SYSTEM_PARTITION_SYSTEM_PARAMETER,
|
||||
(rf_cal_sec + 2) * 0x1000,
|
||||
0x3000},
|
||||
};
|
||||
|
||||
// This isn't an ideal approach but there's not much point moving on unless
|
||||
// or until this has succeeded cos otherwise the SDK will just barf and
|
||||
// refuse to call user_init()
|
||||
while (!rc)
|
||||
{
|
||||
rc = system_partition_table_regist(part_table,
|
||||
sizeof(part_table)/sizeof(part_table[0]),
|
||||
4);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
+3
-3
@@ -14,9 +14,9 @@
|
||||
#include "user_config.h"
|
||||
#include "acl.h"
|
||||
|
||||
#define FLASH_BLOCK_NO 0x61
|
||||
#define FLASH_BLOCK_NO 0x68
|
||||
|
||||
#define MAGIC_NUMBER 0x6e2f5510
|
||||
#define MAGIC_NUMBER 0x6e2dc510
|
||||
|
||||
typedef enum {
|
||||
AUTOMESH_OFF = 0, AUTOMESH_LEARNING, AUTOMESH_OPERATIONAL
|
||||
@@ -56,7 +56,7 @@ typedef struct {
|
||||
uint8_t use_PEAP; // WPA2 PEAP Authentication
|
||||
uint8_t PEAP_identity[64]; // PEAP enterprise outer identity
|
||||
uint8_t PEAP_username[64]; // PEAP enterprise username
|
||||
uint8_t PEAP_password[32]; // PEAP enterprise password
|
||||
uint8_t PEAP_password[64]; // PEAP enterprise password
|
||||
#endif
|
||||
uint8_t lock_password[64]; // Password of config lock
|
||||
uint8_t locked; // Should we allow for config changes
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _USER_CONFIG_
|
||||
#define _USER_CONFIG_
|
||||
|
||||
#define ESP_REPEATER_VERSION "V2.2.13"
|
||||
#define ESP_REPEATER_VERSION "V2.2.14"
|
||||
|
||||
#define LOCAL_ACCESS 0x01
|
||||
#define REMOTE_ACCESS 0x02
|
||||
|
||||
+2
-2
@@ -2523,7 +2523,7 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn)
|
||||
|
||||
if (strcmp(tokens[1], "peap_identity") == 0)
|
||||
{
|
||||
if (os_strlen(tokens[2]) > sizeof(config.PEAP_password) - 1)
|
||||
if (os_strlen(tokens[2]) > sizeof(config.PEAP_identity) - 1)
|
||||
{
|
||||
os_sprintf(response, "Identity too long (max. %d)\r\n", sizeof(config.PEAP_identity) - 1);
|
||||
}
|
||||
@@ -2537,7 +2537,7 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn)
|
||||
|
||||
if (strcmp(tokens[1], "peap_username") == 0)
|
||||
{
|
||||
if (os_strlen(tokens[2]) > sizeof(config.PEAP_password) - 1)
|
||||
if (os_strlen(tokens[2]) > sizeof(config.PEAP_username) - 1)
|
||||
{
|
||||
os_sprintf(response, "Username too long (max. %d)\r\n", sizeof(config.PEAP_username) - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user