Sat, 26 Apr 2025 12:34:32 +0200
MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.
9800 | 1 | <!DOCTYPE html> |
2 | <html><head> | |
3 | <title>eric7.MicroPython.WifiDialogs.WifiController</title> | |
4 | <meta charset="UTF-8"> | |
5 | <link rel="stylesheet" href="styles.css"> | |
6 | </head> | |
7 | <body> | |
8 | <a NAME="top" ID="top"></a> | |
9 | <h1>eric7.MicroPython.WifiDialogs.WifiController</h1> | |
10 | <p> | |
11 | Module implementing the WiFi related functionality. | |
12 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
13 | |
9800 | 14 | <h3>Global Attributes</h3> |
15 | <table> | |
16 | <tr><td>None</td></tr> | |
17 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
18 | |
9800 | 19 | <h3>Classes</h3> |
20 | <table> | |
21 | <tr> | |
22 | <td><a href="#WifiController">WifiController</a></td> | |
23 | <td>Class implementing the WiFi related functionality.</td> | |
24 | </tr> | |
25 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
26 | |
9800 | 27 | <h3>Functions</h3> |
28 | <table> | |
29 | <tr><td>None</td></tr> | |
30 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
31 | |
9800 | 32 | <hr /> |
33 | <hr /> | |
34 | <a NAME="WifiController" ID="WifiController"></a> | |
35 | <h2>WifiController</h2> | |
36 | <p> | |
37 | Class implementing the WiFi related functionality. | |
38 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
39 | |
9800 | 40 | <h3>Derived from</h3> |
41 | QObject | |
42 | <h3>Class Attributes</h3> | |
43 | <table> | |
44 | <tr><td>None</td></tr> | |
45 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
46 | |
9800 | 47 | <h3>Class Methods</h3> |
48 | <table> | |
49 | <tr><td>None</td></tr> | |
50 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
51 | |
9800 | 52 | <h3>Methods</h3> |
53 | <table> | |
54 | <tr> | |
55 | <td><a href="#WifiController.__init__">WifiController</a></td> | |
56 | <td>Constructor</td> | |
57 | </tr> | |
58 | <tr> | |
59 | <td><a href="#WifiController.__checkInternet">__checkInternet</a></td> | |
60 | <td>Private slot to check the availability of an internet connection.</td> | |
61 | </tr> | |
62 | <tr> | |
63 | <td><a href="#WifiController.__connectWifi">__connectWifi</a></td> | |
64 | <td>Private slot to connect the current device to a WiFi network.</td> | |
65 | </tr> | |
66 | <tr> | |
67 | <td><a href="#WifiController.__deactivateInterface">__deactivateInterface</a></td> | |
68 | <td>Private method to deactivate a given WiFi interface of the connected device.</td> | |
69 | </tr> | |
70 | <tr> | |
10022 | 71 | <td><a href="#WifiController.__disableWebrepl">__disableWebrepl</a></td> |
72 | <td>Private slot to disable the WebREPL server of the device.</td> | |
73 | </tr> | |
74 | <tr> | |
9800 | 75 | <td><a href="#WifiController.__disconnectWifi">__disconnectWifi</a></td> |
76 | <td>Private slot to disconnect the current device from the WiFi network.</td> | |
77 | </tr> | |
78 | <tr> | |
10022 | 79 | <td><a href="#WifiController.__enableWebrepl">__enableWebrepl</a></td> |
80 | <td>Private slot to enable the WebREPL server of the device.</td> | |
81 | </tr> | |
82 | <tr> | |
9800 | 83 | <td><a href="#WifiController.__removeCredentials">__removeCredentials</a></td> |
84 | <td>Private slot to remove the saved WiFi credentials from the connected device.</td> | |
85 | </tr> | |
86 | <tr> | |
87 | <td><a href="#WifiController.__scanNetwork">__scanNetwork</a></td> | |
88 | <td>Private slot to scan for visible WiFi networks.</td> | |
89 | </tr> | |
90 | <tr> | |
9871
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
91 | <td><a href="#WifiController.__setNetworkTime">__setNetworkTime</a></td> |
9878 | 92 | <td>Private slot to synchronize the device clock to network time.</td> |
9871
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
93 | </tr> |
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
94 | <tr> |
9800 | 95 | <td><a href="#WifiController.__showConnectedClients">__showConnectedClients</a></td> |
96 | <td>Private slot to show a list of WiFi clients connected to the Access Point interface.</td> | |
97 | </tr> | |
98 | <tr> | |
99 | <td><a href="#WifiController.__showWifiStatus">__showWifiStatus</a></td> | |
100 | <td>Private slot to show a dialog with the WiFi status of the current device.</td> | |
101 | </tr> | |
102 | <tr> | |
103 | <td><a href="#WifiController.__startAccessPoint">__startAccessPoint</a></td> | |
104 | <td>Private slot to start the Access Point interface of the connected device.</td> | |
105 | </tr> | |
106 | <tr> | |
107 | <td><a href="#WifiController.__startAccessPointIP">__startAccessPointIP</a></td> | |
108 | <td>Private slot to start the Access Point interface of the connected device with given IP parameters.</td> | |
109 | </tr> | |
110 | <tr> | |
111 | <td><a href="#WifiController.__stopAccessPoint">__stopAccessPoint</a></td> | |
112 | <td>Private slot to stop the Access Point interface of the connected device.</td> | |
113 | </tr> | |
114 | <tr> | |
115 | <td><a href="#WifiController.__writeCredentials">__writeCredentials</a></td> | |
116 | <td>Private slot to save the WiFi login credentials to the connected device.</td> | |
117 | </tr> | |
118 | <tr> | |
119 | <td><a href="#WifiController.createMenu">createMenu</a></td> | |
120 | <td>Public method to create the WiFi submenu.</td> | |
121 | </tr> | |
122 | </table> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
123 | |
9800 | 124 | <h3>Static Methods</h3> |
125 | <table> | |
126 | <tr><td>None</td></tr> | |
127 | </table> | |
128 | ||
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
129 | |
9800 | 130 | <a NAME="WifiController.__init__" ID="WifiController.__init__"></a> |
131 | <h4>WifiController (Constructor)</h4> | |
132 | <b>WifiController</b>(<i>microPython, parent=None</i>) | |
133 | <p> | |
134 | Constructor | |
135 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
136 | |
9800 | 137 | <dl> |
138 | ||
11006
a671918232f3
Modified modal dialog usage to always include a valid parent (needed for Wayland).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10479
diff
changeset
|
139 | <dt><i>microPython</i> (MicroPythonWidget)</dt> |
9800 | 140 | <dd> |
141 | reference to the MicroPython widget | |
142 | </dd> | |
143 | <dt><i>parent</i> (QObject (optional))</dt> | |
144 | <dd> | |
145 | reference to the parent object (defaults to None) | |
146 | </dd> | |
147 | </dl> | |
148 | <a NAME="WifiController.__checkInternet" ID="WifiController.__checkInternet"></a> | |
149 | <h4>WifiController.__checkInternet</h4> | |
150 | <b>__checkInternet</b>(<i></i>) | |
151 | <p> | |
152 | Private slot to check the availability of an internet connection. | |
153 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
154 | |
9800 | 155 | <a NAME="WifiController.__connectWifi" ID="WifiController.__connectWifi"></a> |
156 | <h4>WifiController.__connectWifi</h4> | |
157 | <b>__connectWifi</b>(<i></i>) | |
158 | <p> | |
159 | Private slot to connect the current device to a WiFi network. | |
160 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
161 | |
9800 | 162 | <a NAME="WifiController.__deactivateInterface" ID="WifiController.__deactivateInterface"></a> |
163 | <h4>WifiController.__deactivateInterface</h4> | |
164 | <b>__deactivateInterface</b>(<i>interface</i>) | |
165 | <p> | |
166 | Private method to deactivate a given WiFi interface of the connected device. | |
167 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
168 | |
9800 | 169 | <dl> |
170 | ||
171 | <dt><i>interface</i> (str)</dt> | |
172 | <dd> | |
173 | designation of the interface to be deactivated (one of 'AP' | |
174 | or 'STA') | |
175 | </dd> | |
176 | </dl> | |
10022 | 177 | <a NAME="WifiController.__disableWebrepl" ID="WifiController.__disableWebrepl"></a> |
178 | <h4>WifiController.__disableWebrepl</h4> | |
179 | <b>__disableWebrepl</b>(<i></i>) | |
180 | <p> | |
181 | Private slot to disable the WebREPL server of the device. | |
182 | </p> | |
183 | <p> | |
184 | This will not remove the 'webrepl_cfg.py' file. It will just modify the boot | |
185 | script. | |
186 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
187 | |
9800 | 188 | <a NAME="WifiController.__disconnectWifi" ID="WifiController.__disconnectWifi"></a> |
189 | <h4>WifiController.__disconnectWifi</h4> | |
190 | <b>__disconnectWifi</b>(<i></i>) | |
191 | <p> | |
192 | Private slot to disconnect the current device from the WiFi network. | |
193 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
194 | |
10022 | 195 | <a NAME="WifiController.__enableWebrepl" ID="WifiController.__enableWebrepl"></a> |
196 | <h4>WifiController.__enableWebrepl</h4> | |
197 | <b>__enableWebrepl</b>(<i></i>) | |
198 | <p> | |
199 | Private slot to enable the WebREPL server of the device. | |
200 | </p> | |
201 | <p> | |
202 | This will also modify the boot script. | |
203 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
204 | |
9800 | 205 | <a NAME="WifiController.__removeCredentials" ID="WifiController.__removeCredentials"></a> |
206 | <h4>WifiController.__removeCredentials</h4> | |
207 | <b>__removeCredentials</b>(<i></i>) | |
208 | <p> | |
209 | Private slot to remove the saved WiFi credentials from the connected device. | |
210 | </p> | |
211 | <p> | |
212 | This will not remove the auto-connect part of the boot script. This needs to be | |
213 | done manually if desired. | |
214 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
215 | |
9800 | 216 | <a NAME="WifiController.__scanNetwork" ID="WifiController.__scanNetwork"></a> |
217 | <h4>WifiController.__scanNetwork</h4> | |
218 | <b>__scanNetwork</b>(<i></i>) | |
219 | <p> | |
220 | Private slot to scan for visible WiFi networks. | |
221 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
222 | |
9871
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
223 | <a NAME="WifiController.__setNetworkTime" ID="WifiController.__setNetworkTime"></a> |
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
224 | <h4>WifiController.__setNetworkTime</h4> |
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
225 | <b>__setNetworkTime</b>(<i></i>) |
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
226 | <p> |
9878 | 227 | Private slot to synchronize the device clock to network time. |
9871
4a302b8c4d28
Updated source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9800
diff
changeset
|
228 | </p> |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
229 | |
9800 | 230 | <a NAME="WifiController.__showConnectedClients" ID="WifiController.__showConnectedClients"></a> |
231 | <h4>WifiController.__showConnectedClients</h4> | |
232 | <b>__showConnectedClients</b>(<i></i>) | |
233 | <p> | |
234 | Private slot to show a list of WiFi clients connected to the Access Point | |
235 | interface. | |
236 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
237 | |
9800 | 238 | <a NAME="WifiController.__showWifiStatus" ID="WifiController.__showWifiStatus"></a> |
239 | <h4>WifiController.__showWifiStatus</h4> | |
240 | <b>__showWifiStatus</b>(<i></i>) | |
241 | <p> | |
242 | Private slot to show a dialog with the WiFi status of the current device. | |
243 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
244 | |
9800 | 245 | <a NAME="WifiController.__startAccessPoint" ID="WifiController.__startAccessPoint"></a> |
246 | <h4>WifiController.__startAccessPoint</h4> | |
247 | <b>__startAccessPoint</b>(<i>withIP=False</i>) | |
248 | <p> | |
249 | Private slot to start the Access Point interface of the connected device. | |
250 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
251 | |
9800 | 252 | <dl> |
253 | ||
254 | <dt><i>withIP</i> (bool)</dt> | |
255 | <dd> | |
256 | flag indicating to start the access point with an IP configuration | |
257 | </dd> | |
258 | </dl> | |
259 | <a NAME="WifiController.__startAccessPointIP" ID="WifiController.__startAccessPointIP"></a> | |
260 | <h4>WifiController.__startAccessPointIP</h4> | |
261 | <b>__startAccessPointIP</b>(<i></i>) | |
262 | <p> | |
263 | Private slot to start the Access Point interface of the connected device | |
264 | with given IP parameters. | |
265 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
266 | |
9800 | 267 | <a NAME="WifiController.__stopAccessPoint" ID="WifiController.__stopAccessPoint"></a> |
268 | <h4>WifiController.__stopAccessPoint</h4> | |
269 | <b>__stopAccessPoint</b>(<i></i>) | |
270 | <p> | |
271 | Private slot to stop the Access Point interface of the connected device. | |
272 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
273 | |
9800 | 274 | <a NAME="WifiController.__writeCredentials" ID="WifiController.__writeCredentials"></a> |
275 | <h4>WifiController.__writeCredentials</h4> | |
276 | <b>__writeCredentials</b>(<i></i>) | |
277 | <p> | |
278 | Private slot to save the WiFi login credentials to the connected device. | |
279 | </p> | |
280 | <p> | |
281 | This will also modify the boot script to perform an automatic WiFi connection. | |
282 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
283 | |
9800 | 284 | <a NAME="WifiController.createMenu" ID="WifiController.createMenu"></a> |
285 | <h4>WifiController.createMenu</h4> | |
286 | <b>createMenu</b>(<i>menu</i>) | |
287 | <p> | |
288 | Public method to create the WiFi submenu. | |
289 | </p> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
290 | |
9800 | 291 | <dl> |
292 | ||
293 | <dt><i>menu</i> (QMenu)</dt> | |
294 | <dd> | |
295 | reference to the parent menu | |
296 | </dd> | |
297 | </dl> | |
298 | <dl> | |
299 | <dt>Return:</dt> | |
300 | <dd> | |
301 | reference to the created menu | |
302 | </dd> | |
303 | </dl> | |
304 | <dl> | |
305 | <dt>Return Type:</dt> | |
306 | <dd> | |
307 | QMenu | |
308 | </dd> | |
309 | </dl> | |
310 | <div align="right"><a href="#top">Up</a></div> | |
311 | <hr /> | |
10479
856476537696
Fine tuned the source code documentation template and regenerated the source code documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10022
diff
changeset
|
312 | </body></html> |