diff options
| author | Jeff Epler <jeff@adafruit.com> | 2020-11-25 21:09:56 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-25 21:09:56 -0600 |
| commit | 6fd123a5c4b2a06a3464665fdd06d2be85d2161a (patch) | |
| tree | cb467a2d1d3ddb63c05b5358906bae55140945fd /shared-bindings | |
| parent | abff2615cb35eade2553d828923327b2d884e1a8 (diff) | |
| parent | 4ac11c8d31311651b77d13bec0a765aa2439cfb2 (diff) | |
Merge pull request #3758 from tannewt/update_connect_doc
Update wifi.Radio.connect doc
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/wifi/Radio.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index e81e8793c..991abd4f1 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -142,9 +142,25 @@ const mp_obj_property_t wifi_radio_hostname_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def connect(self, ssid: ReadableBuffer, password: ReadableBuffer = b"", *, channel: Optional[int] = 0, timeout: Optional[float] = None) -> bool: +//| def connect(self, +//| ssid: ReadableBuffer, +//| password: ReadableBuffer = b"", +//| *, +//| channel: Optional[int] = 0, +//| bssid: Optional[ReadableBuffer] = b"", +//| timeout: Optional[float] = None) -> bool: //| """Connects to the given ssid and waits for an ip address. Reconnections are handled -//| automatically once one connection succeeds.""" +//| automatically once one connection succeeds. +//| +//| By default, this will scan all channels and connect to the access point (AP) with the +//| given ``ssid`` and greatest signal strength (rssi). +//| +//| If ``channel`` is given, the scan will begin with the given channel and connect to +//| the first AP with the given ``ssid``. This can speed up the connection time +//| significantly because a full scan doesn't occur. +//| +//| If ``bssid`` is given, the scan will start at the first channel or the one given and +//| connect to the AP with the given ``bssid`` and ``ssid``.""" //| ... //| STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { |
