Page 1 of 1

What "max connection!" message means

Posted: Thu May 05, 2016 10:32 pm
by podema
Used hardware: NodeMCU dev board with esp12e

Used software:
- esp-open-rto

Used flash tools:
esptool.py

What happened:
I'm trying to program an access point mode with a dhcp server built in.
After succesfully set up the station. esp starts complaining. after some "max connection!" messages the client disconnects.

What this messages means and how it can be avoided?

example log

Code: Select all

ESP-Open-SDK ver: 0.0.1 compiled @ May  2 2016 10:56:35
phy ver: 273, pp ver: 8.3

SDK version:0.9.9
mode : softAP(1a:fe:34:fa:35:25)
add if1
bcn 100
add 1
aid 1
station: 20:82:c0:b2:a7:76 join, AID = 1
State dump. Message type 3
lease slot 0 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 1 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 2 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 3 expiry 0 hwaddr 00:00:00:00:00:00
DHCP Server Error: 192.168.1.39 not an allowed IP
State dump. Message type 1
lease slot 0 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 1 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 2 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 3 expiry 0 hwaddr 00:00:00:00:00:00
State dump. Message type 3
lease slot 0 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 1 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 2 expiry 0 hwaddr 00:00:00:00:00:00
lease slot 3 expiry 0 hwaddr 00:00:00:00:00:00
DHCP lease addr 172.16.0.2 assigned to MAC 20:82:c0:b2:a7:76
max connection!


ap_config struct

Code: Select all

    struct sdk_softap_config ap_config = {
        .ssid = AP_SSID,
        .ssid_hidden = 0,
        .channel = 3,
        .ssid_len = strlen(AP_SSID),
        .authmode = AUTH_WPA_WPA2_PSK,
        .password = AP_PSK,
        .max_connection = 3,
        .beacon_interval = 100,
    };

Re: What "max connection!" message means

Posted: Fri May 06, 2016 3:51 pm
by ESP_Faye
Hi,

"ap_config.max_connection = 3" means that 3 stations are allowed to connect to ESP8266 softAP at most.
"max connection!" means that there are already 3 stations connected to ESP8266 softAP.

If there is something wrong, you can call wifi_softap_get_config to check if the ap_config.max_connection is actually 3.
Did you download blank.bin as initialization ?

Thanks for your interest in ESP8266 !

Re: What "max connection!" message means

Posted: Fri May 06, 2016 6:28 pm
by podema
Hi,

Ok, so "max connection!" stands for maximum stations connected. Seems obvious now, thanks for your help!
I flashed blank.bin as initialization.
I also checked with wifi_softap_get_config the structure and everything is fine (max_connection==3).

Thre's only one station connected, and even if max_connection was set to 1, why i'm getting disconnected for this ? i'm the one connected.

I'm using this dhcp implementation https://github.com/SuperHouse/esp-open-rtos/tree/master/extras/dhcpserver.
Is "max connection!" message somehow related with the sdk dhcp ?

Re: What "max connection!" message means

Posted: Wed Apr 04, 2018 11:56 am
by mathivijayan
Hi, I'm also experiencing same issue. I'm using ESP Mesh Demo SDK and have only 3 wifi nodes, root node is able to make a connection to demo server, but other nodes couldn't join to root, as it reporting "max connections!". And the MAX_MESH_HOPS is set to default(4). So i wouldn't expect this issue. I flashed blank.bin as well, But it didn't solve the issue. Can any one help me to solve this issue?

Re: What "max connection!" message means

Posted: Tue May 15, 2018 5:10 pm
by neven3
"ap_config.max_connection = 3" = 3 stations are allowed to connect to ESP8266 softAP at most