← index #6036Issue #5125
Off-topic · high · value 1.094
QUERY · ISSUE

ESP32 WiFi AP Channel Width

openby gigawattsopened 2020-05-13updated 2024-05-27
port-esp32

It seems when creating a WiFi AP, it defaults to a 40 MHz channel bandwidth.

import network
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid="TEST")
ap.config(authmode=0, channel=2)

In the above example, when viewing the broadcasted SSID with an Android app such as "Wifi Analyzer", shows "CH 2+6" and "2447 - 2407 = 40 MHz".

Is there a setting that can be changed to set this to 20 MHz, so it only uses one channel?

CANDIDATE · ISSUE

[ ESP32 ] How to change the Maximum simultaneously WiFi connection on the softAP?

closedby beyonloopened 2019-09-19updated 2022-07-19
port-esp32

Hello.

I tested and the Maximum is 4, right?

How I tested:

  1. I configured my ESP32 to AP mode.
  2. I want to have 10 other ESP32 STA connected simultaneously in the ESP32 AP.
  3. I have error in the ESP AP when the ESP STA number 5 tried to connect to AP, with error: wifi: max connection, deauth

Follow the sequence error in the AP:

MicroPython v1.11 on 2019-05-29; ESP32 module with ESP32
Type "help()" for more information.

import network
ap = network.WLAN(network.AP_IF)
I (1342589) wifi: wifi driver task: 3ffc4830, prio:23, stack:3584, core=0
I (1342589) wifi: wifi firmware version: 38e2484
I (1342589) wifi: config NVS flash: enabled
I (1342599) wifi: config nano formating: disabled
I (1342599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1342609) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1342639) wifi: Init dynamic tx buffer num: 32
I (1342639) wifi: Init data frame dynamic rx buffer num: 32
I (1342639) wifi: Init management frame dynamic rx buffer num: 32
I (1342639) wifi: Init static rx buffer size: 1600
I (1342649) wifi: Init static rx buffer num: 10
I (1342649) wifi: Init dynamic rx buffer num: 32
ap.config(essid='esp', password='esp')
ap.active(True)
I (1353999) phy: phy_version: 4007, 9c6b43b, Jan 11 2019, 16:45:07, 0, 0
I (1354009) wifi: mode : softAP (24:6f:28:de:40:85)
I (1354009) wifi: Init max length of beacon: 752/752
I (1354009) wifi: Init max length of beacon: 752/752
True
I (1354019) network: event 13
print(ap.ifconfig())
('192.168.4.1', '255.255.255.0', '192.168.4.1', '0.0.0.0')
I (1540579) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1540579) wifi: station: 0c:cb:85:3e:15:c1 join, AID=1, bgn, 20
I (1540579) network: event 15
dhcps: send_offer>>udp_sendto result 0
I (1540959) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
I (1540959) network: event 17
I (1551259) wifi: station: 0c:cb:85:3e:15:c1 leave, AID = 1, bss_flags is 134259
I (1551259) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1551259) network: event 16
I (1556339) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1556339) wifi: station: 0c:cb:85:3e:15:c1 join, AID=1, bgn, 20
I (1556339) network: event 15
dhcps: send_offer>>udp_sendto result 0
I (1556949) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
I (1556949) network: event 17
I (1638929) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1638929) wifi: station: b4:ef:39:84:80:50 join, AID=2, bgn, 20
I (1638929) network: event 15
dhcps: send_offer>>udp_sendto result 0
I (1639649) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.3
I (1639659) network: event 17
I (1677649) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1677649) wifi: station: 08:c5:e1:c4:c5:5a join, AID=3, bgn, 20
I (1677649) network: event 15
dhcps: send_offer>>udp_sendto result 0
I (1678469) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.4
I (1678469) network: event 17
I (1801719) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (1801719) wifi: station: 70:fd:46:ab:86:3c join, AID=4, bgn, 20
I (1801729) network: event 15
dhcps: send_offer>>udp_sendto result 0
I (1802339) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.5
I (1802339) network: event 17
I (1923569) wifi: max connection, deauth!
I (1923879) wifi: max connection, deauth!
I (1924189) wifi: max connection, deauth!
I (1924499) wifi: max connection, deauth!
I (1924819) wifi: max connection, deauth!
I (1925129) wifi: max connection, deauth!
I (1925439) wifi: max connection, deauth!
I (1927019) wifi: max connection, deauth!
I (1927329) wifi: max connection, deauth!
I (1927649) wifi: max connection, deauth!
I (1927959) wifi: max connection, deauth!
I (1928269) wifi: max connection, deauth!
I (1928589) wifi: max connection, deauth!

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied