Fixing the WiFi channel for a Station Object

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
MMliam
Posts: 121
Joined: Mon May 07, 2018 1:08 pm

Fixing the WiFi channel for a Station Object

Post by MMliam » Sat Feb 26, 2022 1:55 pm

Reference the following microPython instruction: netObj.config(channel=11)

If netObj is a station object , then netObj.connect(SSID, PASS), will scan all channels looking for the SSID channel. This results in a variable, and extended connect time.
A more constant and reduced connect time would be possible if the station object could be configured as a fixed channel, rather than scanning. However, if netObj is a station object, the instruction netObj.config(channel=11) throws an error ('AP required').

Does anyone know if I create an access-point object (netObjAP) and configure the channel [netObjAP.config(channel=11)], then create a station object (netObjSTA), will that force the station object to use the same channel as the configured access-point object?

Post Reply