summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-11-24 17:54:39 -0800
committerScott Shawcroft <scott@tannewt.org>2020-11-24 17:54:39 -0800
commit4ac11c8d31311651b77d13bec0a765aa2439cfb2 (patch)
tree490c5cbf67028892a034d6bd635a8fd76d36af50 /shared-bindings
parente778fc1f876116fd8f07b95f9eb8439745988fba (diff)
Update wifi.Radio.connect doc
Now it includes bssid info.
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/wifi/Radio.c20
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) {