Skip to content

Commit 5260974

Browse files
authored
Merge pull request #297 from mate-pycom/wifi_set_protocol
Added protocol argument to wlan init.
2 parents 093189e + cb9fc22 commit 5260974

File tree

1 file changed

+4
-3
lines changed
  • content/firmwareapi/pycom/network

1 file changed

+4
-3
lines changed

content/firmwareapi/pycom/network/wlan.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The WLAN constructor is special in the sense that if no arguments besides the `i
4949

5050
## Methods
5151

52-
#### wlan.init(mode, \* , ssid=None, auth=None, channel=1, antenna=None, power\_save=False, hidden=False, bandwidth=HT40, max\_tx\_pwr=20, country=CN)
52+
#### 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))
5353

5454
Set or get the WiFi network processor configuration.
5555

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

7374
For example, you can do:
7475

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

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

264-
### wlan.wifi\_protocol(\[(bool PHY11\_\_B, bool PHY11\_G, bool PHY11\_N)\])
265+
### wlan.wifi\_protocol(\[(bool PHY11\_B, bool PHY11\_G, bool PHY11\_N)\])
265266

266-
Sets or gets Wifi Protocol supported.
267+
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.
267268

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

0 commit comments

Comments
 (0)