mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
ESP8266_RTOS example tweaks
PUBLISHED_FROM=11096f272afc0716e0677c68d58ebf4d4e001a47
This commit is contained in:
1 parent
4f9627c612
commit
f1cc8379e7
6 files changed
+27
-40
No files matched your search
@@ -12,7 +12,7 @@
|
||||
#define AP_CHAN 9
|
||||
#define MG_LISTEN_ADDR "80"
|
||||
|
||||
#define MG_TASK_STACK_SIZE 2048
|
||||
#define MG_TASK_STACK_SIZE 4096
|
||||
#define MG_TASK_PRIORITY 1
|
||||
|
||||
void uart_div_modify(int uart_no, unsigned int freq);
|
||||
@@ -55,6 +55,8 @@ void ev_handler(struct mg_connection *nc, int ev, void *p) {
|
||||
}
|
||||
|
||||
void setup_ap() {
|
||||
int off = 0;
|
||||
struct ip_info info;
|
||||
struct softap_config cfg;
|
||||
|
||||
wifi_set_opmode_current(SOFTAP_MODE);
|
||||
@@ -71,6 +73,12 @@ void setup_ap() {
|
||||
|
||||
LOG(LL_INFO, ("Setting up AP '%s' on channel %d", cfg.ssid, cfg.channel));
|
||||
wifi_softap_set_config_current(&cfg);
|
||||
wifi_softap_dhcps_stop();
|
||||
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &off);
|
||||
wifi_softap_dhcps_start();
|
||||
wifi_get_ip_info(SOFTAP_IF, &info);
|
||||
LOG(LL_INFO, ("WiFi AP: SSID %s, channel %d, IP " IPSTR "", cfg.ssid,
|
||||
cfg.channel, IP2STR(&info.ip)));
|
||||
}
|
||||
|
||||
static void mg_task(void *arg) {
|
||||
|
||||
Reference in new issue
Block a user