espressif / esp32-wifi-lib

ESP32 WiFi stack precompiled libraries
Apache License 2.0
165 stars 71 forks source link

About increasing the number of WiFi MAX STA connections. 关于增加WiFi的最大STA连接数 #31

Closed FPOOOOOOO closed 2 years ago

FPOOOOOOO commented 2 years ago

I am using the code in "esp-idf/examples/wifi/getting_started/softAP", with version ESP-IDF 4.4 dirty. Here is my step: First: I change the value "Maximal STA connections" in "idf.py" to 16
Second: change the value "ESP_WIFI_MAX_CONN_NUM" in "esp-idf/components/esp_wifi/include/esp_wifi_types.h" to 16 as well Then I flash into ESP32_DevKit , then use STATION to connect the AP. When the 11st STA join , the log print "wifi:max connection, deauth!" it seems that it can't be more than 10. But I really need to use 16 station STRAIGHT connect to the AP, not by AP-STA mode or Mesh. Please help to solve the limit of number of connection. If possible, please offer me a version of " libnet80211.a" that the ESP_WIFI_MAX_CONN_NUM is 16.

您好,我正在用 "esp-idf/examples/wifi/getting_started/softAP" 的代码,版本是ESP- IDF 4.4。 1、首先我更改了idf.py里的Maximal STA connections到16 2、然后我修改了esp_wifi_types.h 里的ESP_WIFI_MAX_CONN_NUM 到16 然后烧录到板子里,第11个STA连上AP的时候,得到了wifi:max connection, deauth! 说明这样子增加没有用。我真的很需要1主16从的直连方式,而不是通过AP STA或者Mesh模式转接。请尽快帮助我解决这个限制。 如果可以的话能够给我一个 libnet80211静态库,里面的ESP_WIFI_MAX_CONN_NUM限制是16,这样我可以用到项目里。

FPOOOOOOO commented 2 years ago

Here is my log:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:6624 load:0x40078000,len:14780 load:0x40080400,len:3792 entry 0x40080694 I (27) boot: ESP-IDF v4.4-dirty 2nd stage bootloader I (27) boot: compile time 11:52:46 I (27) boot: chip revision: 1 I (30) boot_comm: chip revision: 1, min. bootloader chip revision: 0 I (37) boot.esp32: SPI Speed : 40MHz I (42) boot.esp32: SPI Mode : DIO I (46) boot.esp32: SPI Flash Size : 2MB I (51) boot: Enabling RNG early entropy source... I (56) boot: Partition Table: I (60) boot: ## Label Usage Type ST Offset Length I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (74) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (82) boot: 2 factory factory app 00 00 00010000 00100000 I (89) boot: End of partition table I (93) boot_comm: chip revision: 1, min. application chip revision: 0 I (101) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=13370h ( 78704) map I (138) esp_image: segment 1: paddr=00023398 vaddr=3ffb0000 size=03810h ( 14352) load I (144) esp_image: segment 2: paddr=00026bb0 vaddr=40080000 size=09468h ( 37992) load I (159) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=6d3b0h (447408) map I (322) esp_image: segment 4: paddr=0009d3d8 vaddr=40089468 size=0ae7ch ( 44668) load I (340) esp_image: segment 5: paddr=000a825c vaddr=500000ect name: wifi_softAP I (387) cpu_start: App verect name: wifi_softAP I (387) cpu_start: App version: v4.4-dirty I (392) cpu_start: Compile time: Jul 18 2022 20:28:44 I (398) cpu_start: ELF file SHA256: 2a132ad0197da055... I (404) cpu_start: ESP-IDF: v4.4-dirty I (409) heap_init: Initializing. RAM available for dynamic allocation: I (416) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (423) heap_init: At 3FFB74B0 len 00028B50 (162 KiB): DRAM I (429) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (435) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (442) heap_init: At 400942E4 len 0000BD1C (47 KiB): IRAM I (449) spi_flash: detected chip: generic I (452) spi_flash: flash io: dio W (456) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (471) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (544) wifi softAP: ESP_WIFI_MODE_AP I (564) wifi:wifi driver task: 3ffc0624, prio:23, stack:6656, core=0 I (564) system_api: Base MAC address is not set I (564) system_api: read default base MAC address from EFUSE I (584) wifi:wifi firmware version: 7679c42 I (584) wifi:wifi certification version: v7.0 I (584) wifi:config NVS flash: enabled I (584) wifi:config nano formating: disabled I (594) wifi:Init data frame dynamic rx buffer num: 32 I (594) wifi:Init management frame dynamic rx buffer num: 32 I (604) wifi:Init management short buffer num: 32 I (604) wifi:Init dynamic tx buffer num: 32 I (604) wifi:Init static rx buffer size: 1600 I (614) wifi:Init static rx buffer num: 10 I (614) wifi:Init dynamic rx buffer num: 32 I (624) wifi_init: rx ba win: 6 I (624) wifi_init: tcpip mbox: 32 I (624) wifi_init: udp mbox: 6 I (634) wifi_init: tcp mbox: 6 I (634) wifi_init: tcp tx win: 5744 I (644) wifi_init: tcp rx win: 5744 I (644) wifi_init: tcp mss: 1440 I (644) wifi_init: WiFi IRAM OP enabled I (654) wifi_init: WiFi RX IRAM OP enabled I (664) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (764) wifi:mode : softAP (c4:dd:57:c9:89:5d) I (764) wifi:Total power save buffer number: 16 I (764) wifi:Init max length of beacon: 752/752 I (764) wifi:Init max length of beacon: 752/752 I (774) wifi softAP: wifi_init_softap finished. SSID:TEST0718 password:12345678 channel:1 I (38574) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (38584) wifi:station: 4c:f2:02:b6:55:a1 join, AID=1, bgn, 40U I (38614) wifi softAP: station 4c:f2:02:b6:55:a1 join, AID=1, Now has 1 STA W (38784) wifi:idx:2 (ifx:1, 4c:f2:02:b6:55:a1), tid:0, ssn:0, winSize:64 W (38784) wifi:idx:3 (ifx:1, 4c:f2:02:b6:55:a1), tid:7, ssn:0, winSize:64 W (38814) wifi:idx W (38824) wifi:idx:2 (ifx:1, 4c:f2:02:b6:55:a1), tid:0, ssn:0, winSize:64 I (38844) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2 W (39494) wifi:idx:4 (ifx:1, 4c:f2:02:b6:55:a1), tid:6, ssn:2, winSize:64 I (82004) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (82004) wifi:station: dc:a9:04:89:5f:86 join, AID=2, bgn, 20 I (82034) wifi softAP: station dc:a9:04:89:5f:86 join, AID=2, Now has 2 STA W (82094) wifi:idx:5 (ifx:1, dc:a9:04:89:5f:86), tid:6, ssn:2, winSize:64 I (83194) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.3 W (85354) wifi:idx:6 (ifx:1, dc:a9:04:89:5f:86), tid:0, ssn:0, winSize:64 W (87684) wifi:idx:7 (ifx:1, dc:a9:04:89:5f:86), tid:1, ssn:0, winSize:64 I (222924) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (222924) wifi:station: 86:a7:99:f8:c8:75 join, AID=3, bgn, 40U I (223084) wifi softAP: station 86:a7:99:f8:c8:75 join, AID=3, Now has 3 STA I (223714) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.4 I (224774) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.4 I (228254) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (228254) wifi:station: ba:b6:06:00:48:6d join, AID=4, bgn, 20 I (228274) wifi softAP: station ba:b6:06:00:48:6d join, AID=4, Now has 4 STA I (229864) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.5 I (230834) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.5 I (234154) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (234154) wifi:station: f2:50:a5:e6:48:a8 join, AID=5, bgn, 20 I (234294) wifi softAP: station f2:50:a5:e6:48:a8 join, AID=5, Now has 5 STA I (234584) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.6 I (246424) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (246424) wifi:station: f0:77:c3:19:ab:04 join, AID=6, bgn, 40U I (246444) wifi softAP: station f0:77:c3:19:ab:04 join, AID=6, Now has 6 STA I (246654) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.7 I (258754) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (258754) wifi:station: 3c:f0:11:cd:30:fc join, AID=7, bgn, 40U I (258794) wifi softAP: station 3c:f0:11:cd:30:fc join, AID=7, Now has 7 STA I (259184) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.8 I (287224) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (287224) wifi:station: 82:a8:75:1c:73:47 join, AID=8, bgn, 40U I (287244) wifi softAP: station 82:a8:75:1c:73:47 join, AID=8, Now has 8 STA I (287414) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.9 I (337154) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (337164) wifi:station: aa:67:f3:dc:52:8c join, AID=9, bgn, 20 I (337184) wifi softAP: station aa:67:f3:dc:52:8c join, AID=9, Now has 9 STA I (341404) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (341404) wifi:station: 8c:4b:14:14:77:b8 join, AID=10, bgn, 40U I (341434) wifi softAP: station 8c:4b:14:14:77:b8 join, AID=10, Now has 10 STA I (341744) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.11 I (342304) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.10 I (350124) wifi:max connection, deauth! I (351134) wifi:max connection, deauth! I (352144) wifi:max connection, deauth! I (353154) wifi:max connection, deauth! I (356364) wifi:max connection, deauth! I (357344) wifi:max connection, deauth! I (358364) wifi:max connection, deauth! I (359374) wifi:max connection, deauth! I (360174) wifi:max connection, deauth! I (360174) wifi:max connection, deauth! I (361174) wifi:max connection, deauth! I (362194) wifi:max connection, deauth!

lijunru-hub commented 2 years ago

非常抱歉,受限于板载资源和稳定性等原因,只能支持最大连接数为10。

FPOOOOOOO commented 2 years ago

乐鑫研发人员告诉我这个是考虑到稳定性和速率等要求不能随意更改,所以写死在静态库里了

FPOOOOOOO commented 2 years ago

可以考虑用mesh代替了