WiFi Fixed Channel parameter
WiFi Fixed Channel parameter
Does microPython support the specification of a fixed WiFi channel when connecting?
For example, as a parameter in "station.connect('SSID', 'Pass', 'channel-number')", or in some other microPython network setting.
For example, as a parameter in "station.connect('SSID', 'Pass', 'channel-number')", or in some other microPython network setting.
Re: WiFi Fixed Channel parameter
# Set WiFi access point name (formally known as ESSID) and WiFi channel
ap.config(essid='My AP', channel=11)
This appears to be setting the channel when the unit is used as an access-point.
Would that apply to a unit that's being configured as a station (AKA client)?
In other words:
If
station = network.WLAN(network.STA_IF)
iIs there a
station.config(channel=11).
ap.config(essid='My AP', channel=11)
This appears to be setting the channel when the unit is used as an access-point.
Would that apply to a unit that's being configured as a station (AKA client)?
In other words:
If
station = network.WLAN(network.STA_IF)
iIs there a
station.config(channel=11).
Re: WiFi Fixed Channel parameter
I have the answer; it doesn't work.
I inserted station.config(channel=11) into my code right after the creation of the station object; then ran the code. microPython thru an error saying 'requires AP'
If there's a way to set a station channel so it doesn't scan all channels when connecting, that 's not the way.
For a station, a logical place to put it would be as a parameter in the "connect' method.
I can understand not having the facility to set station channels to a fixed number; if for some reason the AP (router) channel is changed all the clients would stop connecting. However, the capability should allow clients to connect faster coming out of deep-sleep.
I inserted station.config(channel=11) into my code right after the creation of the station object; then ran the code. microPython thru an error saying 'requires AP'
If there's a way to set a station channel so it doesn't scan all channels when connecting, that 's not the way.
For a station, a logical place to put it would be as a parameter in the "connect' method.
I can understand not having the facility to set station channels to a fixed number; if for some reason the AP (router) channel is changed all the clients would stop connecting. However, the capability should allow clients to connect faster coming out of deep-sleep.
Re: WiFi Fixed Channel parameter
An interesting comment:
https://micropython-glenn20.readthedocs ... -operation
https://micropython-glenn20.readthedocs ... -operation
This seems to imply if you use a ESPNow image that you could set the station channel.Some versions of the ESP IDF don’t permit setting the channel of the STA_IF at all, other than by connecting to an Access Point (This seems to be fixed in IDF 4+). Micropython versions without the ESPNow patches also disallow setting the channel of the STA_IF.
Re: WiFi Fixed Channel parameter
WOW, just when you thought using microPython was confusing enough - lol
You're right, they clearly show a coding example:
Thanks, looks like this may work.
By the way I'm also using umqtt for microPython, if you're familiar with MQTT, Node-RED and Node.js you can setup a network between devices very quickly.
The only thing is there are two distributions umqtt.simple and umqtt.robust. umqtt.simple only supports QoS (Quality of Service) levels 0 & 1, not 2. It's my understanding that umqtt.robust adds functionality to umqtt.simple (you need to install both distributions).
If you have any knowledge of umqtt, does umqtt.robust support QoS level 2?
You're right, they clearly show a coding example:
I don't understand why they don't have a single distribution, or at least various distribution levels with clearly labelled feature extensions.w0 = network.WLAN(network.STA_IF)
w0.active(True) # Set channel will fail unless Active
w0.config(channel=6)
Thanks, looks like this may work.
By the way I'm also using umqtt for microPython, if you're familiar with MQTT, Node-RED and Node.js you can setup a network between devices very quickly.
The only thing is there are two distributions umqtt.simple and umqtt.robust. umqtt.simple only supports QoS (Quality of Service) levels 0 & 1, not 2. It's my understanding that umqtt.robust adds functionality to umqtt.simple (you need to install both distributions).
If you have any knowledge of umqtt, does umqtt.robust support QoS level 2?
Re: WiFi Fixed Channel parameter
My understanding is that there is quite a bit of work porting Micropython to all the different hardware platforms and that some features are just not available on various platforms. For example ESPNow, ESPMesh and probably others that I don't even know about.
So, it takes keen individuals to exploit these added features. Check out the ESPNow thread.
I know very little about umqqt and have never used it.
So, it takes keen individuals to exploit these added features. Check out the ESPNow thread.
I know very little about umqqt and have never used it.
Re: WiFi Fixed Channel parameter
I'll definitely be checking-out the ESPNow thread; that looks like a great find - thanks.
As far as MQTT, and Node-RED, if you're interested, checkout these sites (BTW both technologies were created by IBM in the 1990's, but their use is exploding now)
Node-RED Essentials https://www.youtube.com/playlist?list=P ... qFcXBkHy-6
MQTT Essentials https://www.hivemq.com/mqtt-essentials/
Curiously, even though IBM developed MQTT & Node-RED they didn't integrate them; here's a link that will show how to integrate MQTT into Node-RED: http://stevesnoderedguide.com/install-m ... r-node-red
Have fun
As far as MQTT, and Node-RED, if you're interested, checkout these sites (BTW both technologies were created by IBM in the 1990's, but their use is exploding now)
Node-RED Essentials https://www.youtube.com/playlist?list=P ... qFcXBkHy-6
MQTT Essentials https://www.hivemq.com/mqtt-essentials/
Curiously, even though IBM developed MQTT & Node-RED they didn't integrate them; here's a link that will show how to integrate MQTT into Node-RED: http://stevesnoderedguide.com/install-m ... r-node-red
Have fun
Re: WiFi Fixed Channel parameter
I'll check out the links when I get back to civilization and unlimited data.
I had a good play with Hologram a few years ago but my home automation system running on ESP32s using uMail and Gmail's SMTP server works well enough through a cell connection.
I use ESPNow in a remote water tank monitoring system, so keep up to date on that development.
I had a good play with Hologram a few years ago but my home automation system running on ESP32s using uMail and Gmail's SMTP server works well enough through a cell connection.
I use ESPNow in a remote water tank monitoring system, so keep up to date on that development.