Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added protocol argument to wlan init. #297

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions content/firmwareapi/pycom/network/wlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The WLAN constructor is special in the sense that if no arguments besides the `i

## Methods

#### wlan.init(mode, \* , ssid=None, auth=None, channel=1, antenna=None, power\_save=False, hidden=False, bandwidth=HT40, max\_tx\_pwr=20, country=CN)
#### wlan.init(mode, \* , ssid=None, auth=None, channel=1, antenna=None, power\_save=False, hidden=False, bandwidth=HT40, max\_tx\_pwr=20, country=CN, protocol=(1,1,1))

Set or get the WiFi network processor configuration.

Expand All @@ -69,6 +69,7 @@ Arguments are:
* `bandwidth` is the Bandwidth to use, either 20MHz or 40 MHz , use `HT20` or `HT40`
* `max_tx_pwr` is the maximum WiFi Tx power allowed. see `WLAN.max_tx_power()` for more details
* `country` tuple representing the country configuration parameters. see `WLAN.country()` for more details
* `protocol` tuple representing the protocol. see `WLAN.wifi_protocol()` for more details

For example, you can do:

Expand Down Expand Up @@ -261,9 +262,9 @@ Gets or set s Country configuration parameters for wifi.

Returns a tuple with (bssid, ssid, primary channel, rssi, Authorization method, wifi standard used) of the connected AP in case of STA mode.

### wlan.wifi\_protocol(\[(bool PHY11\_\_B, bool PHY11\_G, bool PHY11\_N)\])
### wlan.wifi\_protocol(\[(bool PHY11\_B, bool PHY11\_G, bool PHY11\_N)\])

Sets or gets Wifi Protocol supported.
Sets or gets Wifi Protocol supported in (`PHY_11_B`,`PHY_11_G`,`PHY_11_N`) format. Currently 802.11b or 802.11bg or 802.11bgn mode is available.

### wlan.send\_raw(Buffer, interface=STA, use\_sys\_seq=True)

Expand Down