ifconfig: "default" interface is STA (simply because not every hardware may provide AP mode).
parent
0281a54682
commit
890cfcba6c
|
@ -429,13 +429,13 @@ Methods:
|
|||
- `wlan.connect(ssid, auth=None, *, bssid, timeout=None)` Connect to the network specified by the SSID using the given authentication. Optionally specify the BSSID and a timeout.
|
||||
- `wlan.disconnect()` Closes the current connection. NOHEAP
|
||||
- `wlan.isconnected()` returns `True` if connected and IP address has been assigned. NOHEAP
|
||||
- `wlan.ifconfig(id=0, config=[(ip, netmask, gateway, dns) or 'dhcp'])` get or set the IP configuration. The `id` is the interface id, and defaults to zero. In the case of `AP+STA` mode, the NIC effectively has 2 interfaces that can be configured independently using `id=0` for the AP and `id=1` for the STA. Alternatively, a port can choose to use string names for the `id`, e.g. `id='STA'` and `id='AP'`.
|
||||
- `wlan.ifconfig(id=0, config=[(ip, netmask, gateway, dns) or 'dhcp'])` get or set the IP configuration. The `id` is the interface id, and defaults to zero. In the case of `AP+STA` mode, the NIC effectively has 2 interfaces that can be configured independently using `id=0` for the STA and `id=1` for the AP. Alternatively, a port can choose to use string names for the `id`, e.g. `id='STA'` and `id='AP'`.
|
||||
|
||||
Constants:
|
||||
|
||||
- `WLAN.STA` Station mode
|
||||
- `WLAN.AP` Access point mode
|
||||
- `WLAN.STA_AP` Station mode + Access point mode.
|
||||
- `WLAN.STA_AP` Station mode + Access point mode. (prefer to use separate `WLAN.STA` & `WLAN.AP`)
|
||||
- `WLAN.P2P` Peer to peer (also called WiFi-direct or Ad-Hoc mode)
|
||||
- `WLAN.WEP` WEP security
|
||||
- `WLAN.WPA` WPA security
|
||||
|
|
Loading…
Reference in New Issue