src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html

branch
mpy_network
changeset 9799
a79430a8811d
parent 9766
f0e22f3a5878
child 9829
cafb132fe3bb
equal deleted inserted replaced
9798:4402d76c5fa9 9799:a79430a8811d
45 in the board specific subclass. Commands are provided to perform operations 45 in the board specific subclass. Commands are provided to perform operations
46 on the file system of a connected MicroPython device, for getting and setting 46 on the file system of a connected MicroPython device, for getting and setting
47 the time on the board and getting board related data. Supported file system 47 the time on the board and getting board related data. Supported file system
48 commands are: 48 commands are:
49 <ul> 49 <ul>
50 <li>cd: change directory</li>
51 <li>fileSystemInfo: get information about the file system
52 <li>get: get a file from the connected device</li>
53 <li>getData: read data of a file of the connected device</li>
54 <li>lls: directory listing with meta data</li>
50 <li>ls: directory listing</li> 55 <li>ls: directory listing</li>
51 <li>lls: directory listing with meta data</li> 56 <li>mkdir: create a new directory</li>
52 <li>cd: change directory</li>
53 <li>pwd: get the current directory</li>
54 <li>put: copy a file to the connected device</li> 57 <li>put: copy a file to the connected device</li>
55 <li>putData: write data to a file of the connected device</li> 58 <li>putData: write data to a file of the connected device</li>
56 <li>get: get a file from the connected device</li> 59 <li>pwd: get the current directory</li>
57 <li>getData: read data of a file of the connected device</li>
58 <li>rm: remove a file from the connected device</li> 60 <li>rm: remove a file from the connected device</li>
61 <li>rmdir: remove an empty directory</li>
59 <li>rmrf: remove a file/directory recursively (like 'rm -rf' in bash) 62 <li>rmrf: remove a file/directory recursively (like 'rm -rf' in bash)
60 <li>mkdir: create a new directory</li>
61 <li>rmdir: remove an empty directory</li>
62 <li>fileSystemInfo: get information about the file system
63 </ul> 63 </ul>
64 </p> 64 </p>
65 <p> 65 <p>
66 Supported non file system commands are: 66 Supported non file system commands are:
67 <ul> 67 <ul>
68 <li>getBoardData: get information about the connected board</li> 68 <li>getBoardData: get information about the connected board</li>
69 <li>getDeviceData: get version info about MicroPython and some implementation 69 <li>getDeviceData: get version info about MicroPython and some implementation
70 information</li> 70 information</li>
71 <li>getModules: get a list of built-in modules</li> 71 <li>getModules: get a list of built-in modules</li>
72 <li>getTime: get the current time</li> 72 <li>getTime: get the current time</li>
73 <li>showTime: show the current time of the connected device</li>
73 <li>syncTime: synchronize the time of the connected device</li> 74 <li>syncTime: synchronize the time of the connected device</li>
74 <li>showTime: show the current time of the connected device</li> 75 </ul>
76 </p>
77 <p>
78 Supported WiFi commands are:
79 <ul>
80 <li>hasWifi: check, if the board has WiFi functionality</li>
81 <li>getWifiData: get WiFi status data</li>
82 <li>connectWifi: connect to a WiFi network</li>
83 <li>disconnectWifi: disconnect from a WiFi network</li>
84 <li>writeCredentials: save the WiFi credentials to the board and create
85 functionality to auto-connect at boot time</li>
86 <li>removeCredentials: remove the saved credentials</li>
87 <li>checkInternet: check, if internet access is possible</li>
88 <li>scanNetworks: scan for available WiFi networks</li>
89 <li>deactivateInterface: deactivate a WiFi interface</li>
90 <li>startAccessPoint: start an access point</li>
91 <li>stopAccessPoint: stop the access point</li>
92 <li>getConnectedClients: get a list of connected WiFi clients</li>
75 </ul> 93 </ul>
76 </p> 94 </p>
77 <h3>Derived from</h3> 95 <h3>Derived from</h3>
78 QObject 96 QObject
79 <h3>Class Attributes</h3> 97 <h3>Class Attributes</h3>
109 <tr> 127 <tr>
110 <td><a href="#BaseDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> 128 <td><a href="#BaseDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
111 <td>Public method to add device specific entries to the given menu.</td> 129 <td>Public method to add device specific entries to the given menu.</td>
112 </tr> 130 </tr>
113 <tr> 131 <tr>
132 <td><a href="#BaseDevice.addDeviceWifiEntries">addDeviceWifiEntries</a></td>
133 <td>Public method to add device specific entries to the given menu.</td>
134 </tr>
135 <tr>
114 <td><a href="#BaseDevice.canRunScript">canRunScript</a></td> 136 <td><a href="#BaseDevice.canRunScript">canRunScript</a></td>
115 <td>Public method to determine, if a script can be executed.</td> 137 <td>Public method to determine, if a script can be executed.</td>
116 </tr> 138 </tr>
117 <tr> 139 <tr>
118 <td><a href="#BaseDevice.canStartFileManager">canStartFileManager</a></td> 140 <td><a href="#BaseDevice.canStartFileManager">canStartFileManager</a></td>
133 <tr> 155 <tr>
134 <td><a href="#BaseDevice.checkDeviceData">checkDeviceData</a></td> 156 <td><a href="#BaseDevice.checkDeviceData">checkDeviceData</a></td>
135 <td>Public method to check the validity of the device data determined during connecting the device.</td> 157 <td>Public method to check the validity of the device data determined during connecting the device.</td>
136 </tr> 158 </tr>
137 <tr> 159 <tr>
160 <td><a href="#BaseDevice.checkInternet">checkInternet</a></td>
161 <td>Public method to check, if the internet can be reached.</td>
162 </tr>
163 <tr>
164 <td><a href="#BaseDevice.connectWifi">connectWifi</a></td>
165 <td>Public method to connect a device to a WiFi network.</td>
166 </tr>
167 <tr>
168 <td><a href="#BaseDevice.deactivateInterface">deactivateInterface</a></td>
169 <td>Public method to deactivate a given WiFi interface of the connected device.</td>
170 </tr>
171 <tr>
138 <td><a href="#BaseDevice.deviceName">deviceName</a></td> 172 <td><a href="#BaseDevice.deviceName">deviceName</a></td>
139 <td>Public method to get the name of the device.</td> 173 <td>Public method to get the name of the device.</td>
140 </tr> 174 </tr>
141 <tr> 175 <tr>
176 <td><a href="#BaseDevice.disconnectWifi">disconnectWifi</a></td>
177 <td>Public method to disconnect a device from the WiFi network.</td>
178 </tr>
179 <tr>
142 <td><a href="#BaseDevice.downloadFirmware">downloadFirmware</a></td> 180 <td><a href="#BaseDevice.downloadFirmware">downloadFirmware</a></td>
143 <td>Public method to download the device firmware.</td> 181 <td>Public method to download the device firmware.</td>
144 </tr> 182 </tr>
145 <tr> 183 <tr>
146 <td><a href="#BaseDevice.fileSystemInfo">fileSystemInfo</a></td> 184 <td><a href="#BaseDevice.fileSystemInfo">fileSystemInfo</a></td>
157 <tr> 195 <tr>
158 <td><a href="#BaseDevice.getBoardInformation">getBoardInformation</a></td> 196 <td><a href="#BaseDevice.getBoardInformation">getBoardInformation</a></td>
159 <td>Public method to get some information data of the connected board.</td> 197 <td>Public method to get some information data of the connected board.</td>
160 </tr> 198 </tr>
161 <tr> 199 <tr>
200 <td><a href="#BaseDevice.getConnectedClients">getConnectedClients</a></td>
201 <td>Public method to get a list of connected clients.</td>
202 </tr>
203 <tr>
162 <td><a href="#BaseDevice.getData">getData</a></td> 204 <td><a href="#BaseDevice.getData">getData</a></td>
163 <td>Public method to read data from the connected device.</td> 205 <td>Public method to read data from the connected device.</td>
164 </tr> 206 </tr>
165 <tr> 207 <tr>
166 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td> 208 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td>
189 <tr> 231 <tr>
190 <td><a href="#BaseDevice.getTime">getTime</a></td> 232 <td><a href="#BaseDevice.getTime">getTime</a></td>
191 <td>Public method to get the current time of the device.</td> 233 <td>Public method to get the current time of the device.</td>
192 </tr> 234 </tr>
193 <tr> 235 <tr>
236 <td><a href="#BaseDevice.getWifiData">getWifiData</a></td>
237 <td>Public method to get data related to the current WiFi status.</td>
238 </tr>
239 <tr>
194 <td><a href="#BaseDevice.getWorkspace">getWorkspace</a></td> 240 <td><a href="#BaseDevice.getWorkspace">getWorkspace</a></td>
195 <td>Public method to get the workspace directory.</td> 241 <td>Public method to get the workspace directory.</td>
196 </tr> 242 </tr>
197 <tr> 243 <tr>
198 <td><a href="#BaseDevice.handleDataFlood">handleDataFlood</a></td> 244 <td><a href="#BaseDevice.handleDataFlood">handleDataFlood</a></td>
199 <td>Public slot handling a data floof from the device.</td> 245 <td>Public slot handling a data floof from the device.</td>
200 </tr> 246 </tr>
201 <tr> 247 <tr>
248 <td><a href="#BaseDevice.hasBluetooth">hasBluetooth</a></td>
249 <td>Public method to check the availability of Bluetooth.</td>
250 </tr>
251 <tr>
202 <td><a href="#BaseDevice.hasCircuitPython">hasCircuitPython</a></td> 252 <td><a href="#BaseDevice.hasCircuitPython">hasCircuitPython</a></td>
203 <td>Public method to check, if the connected device is flashed with CircuitPython.</td> 253 <td>Public method to check, if the connected device is flashed with CircuitPython.</td>
204 </tr> 254 </tr>
205 <tr> 255 <tr>
206 <td><a href="#BaseDevice.hasDocumentationUrl">hasDocumentationUrl</a></td> 256 <td><a href="#BaseDevice.hasDocumentationUrl">hasDocumentationUrl</a></td>
207 <td>Public method to check, if the device has a configured documentation URL.</td> 257 <td>Public method to check, if the device has a configured documentation URL.</td>
208 </tr> 258 </tr>
209 <tr> 259 <tr>
260 <td><a href="#BaseDevice.hasEthernet">hasEthernet</a></td>
261 <td>Public method to check the availability of Ethernet.</td>
262 </tr>
263 <tr>
210 <td><a href="#BaseDevice.hasFirmwareUrl">hasFirmwareUrl</a></td> 264 <td><a href="#BaseDevice.hasFirmwareUrl">hasFirmwareUrl</a></td>
211 <td>Public method to check, if the device has a configured firmware download URL.</td> 265 <td>Public method to check, if the device has a configured firmware download URL.</td>
212 </tr> 266 </tr>
213 <tr> 267 <tr>
214 <td><a href="#BaseDevice.hasFlashMenuEntry">hasFlashMenuEntry</a></td> 268 <td><a href="#BaseDevice.hasFlashMenuEntry">hasFlashMenuEntry</a></td>
217 <tr> 271 <tr>
218 <td><a href="#BaseDevice.hasTimeCommands">hasTimeCommands</a></td> 272 <td><a href="#BaseDevice.hasTimeCommands">hasTimeCommands</a></td>
219 <td>Public method to check, if the device supports time commands.</td> 273 <td>Public method to check, if the device supports time commands.</td>
220 </tr> 274 </tr>
221 <tr> 275 <tr>
276 <td><a href="#BaseDevice.hasWifi">hasWifi</a></td>
277 <td>Public method to check the availability of WiFi.</td>
278 </tr>
279 <tr>
222 <td><a href="#BaseDevice.lls">lls</a></td> 280 <td><a href="#BaseDevice.lls">lls</a></td>
223 <td>Public method to get a long directory listing of the connected device including meta data.</td> 281 <td>Public method to get a long directory listing of the connected device including meta data.</td>
224 </tr> 282 </tr>
225 <tr> 283 <tr>
226 <td><a href="#BaseDevice.ls">ls</a></td> 284 <td><a href="#BaseDevice.ls">ls</a></td>
241 <tr> 299 <tr>
242 <td><a href="#BaseDevice.pwd">pwd</a></td> 300 <td><a href="#BaseDevice.pwd">pwd</a></td>
243 <td>Public method to get the current directory of the connected device.</td> 301 <td>Public method to get the current directory of the connected device.</td>
244 </tr> 302 </tr>
245 <tr> 303 <tr>
304 <td><a href="#BaseDevice.removeCredentials">removeCredentials</a></td>
305 <td>Public method to remove the saved credentials from the connected device.</td>
306 </tr>
307 <tr>
246 <td><a href="#BaseDevice.rm">rm</a></td> 308 <td><a href="#BaseDevice.rm">rm</a></td>
247 <td>Public method to remove a file from the connected device.</td> 309 <td>Public method to remove a file from the connected device.</td>
248 </tr> 310 </tr>
249 <tr> 311 <tr>
250 <td><a href="#BaseDevice.rmdir">rmdir</a></td> 312 <td><a href="#BaseDevice.rmdir">rmdir</a></td>
257 <tr> 319 <tr>
258 <td><a href="#BaseDevice.runScript">runScript</a></td> 320 <td><a href="#BaseDevice.runScript">runScript</a></td>
259 <td>Public method to run the given Python script.</td> 321 <td>Public method to run the given Python script.</td>
260 </tr> 322 </tr>
261 <tr> 323 <tr>
324 <td><a href="#BaseDevice.scanNetworks">scanNetworks</a></td>
325 <td>Public method to scan for available WiFi networks.</td>
326 </tr>
327 <tr>
262 <td><a href="#BaseDevice.selectDeviceDirectory">selectDeviceDirectory</a></td> 328 <td><a href="#BaseDevice.selectDeviceDirectory">selectDeviceDirectory</a></td>
263 <td>Public method to select the device directory from a list of detected ones.</td> 329 <td>Public method to select the device directory from a list of detected ones.</td>
264 </tr> 330 </tr>
265 <tr> 331 <tr>
266 <td><a href="#BaseDevice.sendCommands">sendCommands</a></td> 332 <td><a href="#BaseDevice.sendCommands">sendCommands</a></td>
285 <tr> 351 <tr>
286 <td><a href="#BaseDevice.setRepl">setRepl</a></td> 352 <td><a href="#BaseDevice.setRepl">setRepl</a></td>
287 <td>Public method to set the REPL status and dependent status.</td> 353 <td>Public method to set the REPL status and dependent status.</td>
288 </tr> 354 </tr>
289 <tr> 355 <tr>
356 <td><a href="#BaseDevice.startAccessPoint">startAccessPoint</a></td>
357 <td>Public method to start the access point interface.</td>
358 </tr>
359 <tr>
360 <td><a href="#BaseDevice.stopAccessPoint">stopAccessPoint</a></td>
361 <td>Public method to stop the access point interface.</td>
362 </tr>
363 <tr>
290 <td><a href="#BaseDevice.supportsLocalFileAccess">supportsLocalFileAccess</a></td> 364 <td><a href="#BaseDevice.supportsLocalFileAccess">supportsLocalFileAccess</a></td>
291 <td>Public method to indicate file access via a local directory.</td> 365 <td>Public method to indicate file access via a local directory.</td>
292 </tr> 366 </tr>
293 <tr> 367 <tr>
294 <td><a href="#BaseDevice.syncTime">syncTime</a></td> 368 <td><a href="#BaseDevice.syncTime">syncTime</a></td>
295 <td>Public method to set the time of the connected device to the local computer's time.</td> 369 <td>Public method to set the time of the connected device to the local computer's time.</td>
370 </tr>
371 <tr>
372 <td><a href="#BaseDevice.writeCredentials">writeCredentials</a></td>
373 <td>Public method to write the given credentials to the connected device and modify the start script to connect automatically.</td>
296 </tr> 374 </tr>
297 </table> 375 </table>
298 <h3>Static Methods</h3> 376 <h3>Static Methods</h3>
299 377
300 <table> 378 <table>
410 <dt><i>menu</i> (QMenu)</dt> 488 <dt><i>menu</i> (QMenu)</dt>
411 <dd> 489 <dd>
412 reference to the context menu 490 reference to the context menu
413 </dd> 491 </dd>
414 </dl> 492 </dl>
493 <a NAME="BaseDevice.addDeviceWifiEntries" ID="BaseDevice.addDeviceWifiEntries"></a>
494 <h4>BaseDevice.addDeviceWifiEntries</h4>
495 <b>addDeviceWifiEntries</b>(<i>menu</i>)
496
497 <p>
498 Public method to add device specific entries to the given menu.
499 </p>
500 <dl>
501
502 <dt><i>menu</i> (QMenu)</dt>
503 <dd>
504 reference to the context menu
505 </dd>
506 </dl>
415 <a NAME="BaseDevice.canRunScript" ID="BaseDevice.canRunScript"></a> 507 <a NAME="BaseDevice.canRunScript" ID="BaseDevice.canRunScript"></a>
416 <h4>BaseDevice.canRunScript</h4> 508 <h4>BaseDevice.canRunScript</h4>
417 <b>canRunScript</b>(<i></i>) 509 <b>canRunScript</b>(<i></i>)
418 510
419 <p> 511 <p>
531 <dt>Return Type:</dt> 623 <dt>Return Type:</dt>
532 <dd> 624 <dd>
533 bool 625 bool
534 </dd> 626 </dd>
535 </dl> 627 </dl>
628 <a NAME="BaseDevice.checkInternet" ID="BaseDevice.checkInternet"></a>
629 <h4>BaseDevice.checkInternet</h4>
630 <b>checkInternet</b>(<i></i>)
631
632 <p>
633 Public method to check, if the internet can be reached.
634 </p>
635 <dl>
636 <dt>Return:</dt>
637 <dd>
638 tuple containing a flag indicating reachability and an error string
639 </dd>
640 </dl>
641 <dl>
642 <dt>Return Type:</dt>
643 <dd>
644 tuple of (bool, str)
645 </dd>
646 </dl>
647 <a NAME="BaseDevice.connectWifi" ID="BaseDevice.connectWifi"></a>
648 <h4>BaseDevice.connectWifi</h4>
649 <b>connectWifi</b>(<i>ssid, password</i>)
650
651 <p>
652 Public method to connect a device to a WiFi network.
653 </p>
654 <dl>
655
656 <dt><i>ssid</i> (str)</dt>
657 <dd>
658 name (SSID) of the WiFi network
659 </dd>
660 <dt><i>password</i> (str)</dt>
661 <dd>
662 password needed to connect
663 </dd>
664 </dl>
665 <dl>
666 <dt>Return:</dt>
667 <dd>
668 tuple containing the connection status and an error string
669 </dd>
670 </dl>
671 <dl>
672 <dt>Return Type:</dt>
673 <dd>
674 tuple of (bool, str)
675 </dd>
676 </dl>
677 <a NAME="BaseDevice.deactivateInterface" ID="BaseDevice.deactivateInterface"></a>
678 <h4>BaseDevice.deactivateInterface</h4>
679 <b>deactivateInterface</b>(<i>interface</i>)
680
681 <p>
682 Public method to deactivate a given WiFi interface of the connected device.
683 </p>
684 <dl>
685
686 <dt><i>interface</i> (str)</dt>
687 <dd>
688 designation of the interface to be deactivated (one of 'AP'
689 or 'STA')
690 </dd>
691 </dl>
692 <dl>
693 <dt>Return:</dt>
694 <dd>
695 tuple containg a flag indicating success and an error message
696 </dd>
697 </dl>
698 <dl>
699 <dt>Return Type:</dt>
700 <dd>
701 tuple of (bool, str)
702 </dd>
703 </dl>
536 <a NAME="BaseDevice.deviceName" ID="BaseDevice.deviceName"></a> 704 <a NAME="BaseDevice.deviceName" ID="BaseDevice.deviceName"></a>
537 <h4>BaseDevice.deviceName</h4> 705 <h4>BaseDevice.deviceName</h4>
538 <b>deviceName</b>(<i></i>) 706 <b>deviceName</b>(<i></i>)
539 707
540 <p> 708 <p>
550 <dt>Return Type:</dt> 718 <dt>Return Type:</dt>
551 <dd> 719 <dd>
552 str 720 str
553 </dd> 721 </dd>
554 </dl> 722 </dl>
723 <a NAME="BaseDevice.disconnectWifi" ID="BaseDevice.disconnectWifi"></a>
724 <h4>BaseDevice.disconnectWifi</h4>
725 <b>disconnectWifi</b>(<i></i>)
726
727 <p>
728 Public method to disconnect a device from the WiFi network.
729 </p>
730 <dl>
731 <dt>Return:</dt>
732 <dd>
733 tuple containing a flag indicating success and an error string
734 </dd>
735 </dl>
736 <dl>
737 <dt>Return Type:</dt>
738 <dd>
739 tuple of (bool, str)
740 </dd>
741 </dl>
555 <a NAME="BaseDevice.downloadFirmware" ID="BaseDevice.downloadFirmware"></a> 742 <a NAME="BaseDevice.downloadFirmware" ID="BaseDevice.downloadFirmware"></a>
556 <h4>BaseDevice.downloadFirmware</h4> 743 <h4>BaseDevice.downloadFirmware</h4>
557 <b>downloadFirmware</b>(<i></i>) 744 <b>downloadFirmware</b>(<i></i>)
558 745
559 <p> 746 <p>
668 <dt>Raises <b>OSError</b>:</dt> 855 <dt>Raises <b>OSError</b>:</dt>
669 <dd> 856 <dd>
670 raised to indicate an issue with the device 857 raised to indicate an issue with the device
671 </dd> 858 </dd>
672 </dl> 859 </dl>
860 <a NAME="BaseDevice.getConnectedClients" ID="BaseDevice.getConnectedClients"></a>
861 <h4>BaseDevice.getConnectedClients</h4>
862 <b>getConnectedClients</b>(<i></i>)
863
864 <p>
865 Public method to get a list of connected clients.
866 </p>
867 <dl>
868 <dt>Return:</dt>
869 <dd>
870 a tuple containing a list of tuples containing the client MAC-Address
871 and the RSSI (if supported and available) and an error message
872 </dd>
873 </dl>
874 <dl>
875 <dt>Return Type:</dt>
876 <dd>
877 tuple of ([(bytes, int)], str)
878 </dd>
879 </dl>
673 <a NAME="BaseDevice.getData" ID="BaseDevice.getData"></a> 880 <a NAME="BaseDevice.getData" ID="BaseDevice.getData"></a>
674 <h4>BaseDevice.getData</h4> 881 <h4>BaseDevice.getData</h4>
675 <b>getData</b>(<i>deviceFileName</i>) 882 <b>getData</b>(<i>deviceFileName</i>)
676 883
677 <p> 884 <p>
703 raised to indicate an issue with the device 910 raised to indicate an issue with the device
704 </dd> 911 </dd>
705 </dl> 912 </dl>
706 <a NAME="BaseDevice.getDeviceData" ID="BaseDevice.getDeviceData"></a> 913 <a NAME="BaseDevice.getDeviceData" ID="BaseDevice.getDeviceData"></a>
707 <h4>BaseDevice.getDeviceData</h4> 914 <h4>BaseDevice.getDeviceData</h4>
708 <b>getDeviceData</b>(<i></i>) 915 <b>getDeviceData</b>(<i>key=None</i>)
709 916
710 <p> 917 <p>
711 Public method to get a copy of the determined device data. 918 Public method to get a copy of the determined device data.
712 </p> 919 </p>
920 <dl>
921
922 <dt><i>key</i> (str (optional))</dt>
923 <dd>
924 name of the data to get (None to get all data) (defaults to None)
925 </dd>
926 </dl>
713 <dl> 927 <dl>
714 <dt>Return:</dt> 928 <dt>Return:</dt>
715 <dd> 929 <dd>
716 dictionary containing the essential device data 930 dictionary containing the essential device data
717 </dd> 931 </dd>
849 <dt>Raises <b>OSError</b>:</dt> 1063 <dt>Raises <b>OSError</b>:</dt>
850 <dd> 1064 <dd>
851 raised to indicate an issue with the device 1065 raised to indicate an issue with the device
852 </dd> 1066 </dd>
853 </dl> 1067 </dl>
1068 <a NAME="BaseDevice.getWifiData" ID="BaseDevice.getWifiData"></a>
1069 <h4>BaseDevice.getWifiData</h4>
1070 <b>getWifiData</b>(<i></i>)
1071
1072 <p>
1073 Public method to get data related to the current WiFi status.
1074 </p>
1075 <dl>
1076 <dt>Return:</dt>
1077 <dd>
1078 tuple of three dictionaries containing the WiFi status data
1079 for the WiFi client, access point and overall data
1080 </dd>
1081 </dl>
1082 <dl>
1083 <dt>Return Type:</dt>
1084 <dd>
1085 tuple of (dict, dict, dict)
1086 </dd>
1087 </dl>
854 <a NAME="BaseDevice.getWorkspace" ID="BaseDevice.getWorkspace"></a> 1088 <a NAME="BaseDevice.getWorkspace" ID="BaseDevice.getWorkspace"></a>
855 <h4>BaseDevice.getWorkspace</h4> 1089 <h4>BaseDevice.getWorkspace</h4>
856 <b>getWorkspace</b>(<i></i>) 1090 <b>getWorkspace</b>(<i></i>)
857 1091
858 <p> 1092 <p>
875 <b>handleDataFlood</b>(<i></i>) 1109 <b>handleDataFlood</b>(<i></i>)
876 1110
877 <p> 1111 <p>
878 Public slot handling a data floof from the device. 1112 Public slot handling a data floof from the device.
879 </p> 1113 </p>
1114 <a NAME="BaseDevice.hasBluetooth" ID="BaseDevice.hasBluetooth"></a>
1115 <h4>BaseDevice.hasBluetooth</h4>
1116 <b>hasBluetooth</b>(<i></i>)
1117
1118 <p>
1119 Public method to check the availability of Bluetooth.
1120 </p>
1121 <dl>
1122 <dt>Return:</dt>
1123 <dd>
1124 flag indicating the availability of Bluetooth
1125 </dd>
1126 </dl>
1127 <dl>
1128 <dt>Return Type:</dt>
1129 <dd>
1130 bool
1131 </dd>
1132 </dl>
880 <a NAME="BaseDevice.hasCircuitPython" ID="BaseDevice.hasCircuitPython"></a> 1133 <a NAME="BaseDevice.hasCircuitPython" ID="BaseDevice.hasCircuitPython"></a>
881 <h4>BaseDevice.hasCircuitPython</h4> 1134 <h4>BaseDevice.hasCircuitPython</h4>
882 <b>hasCircuitPython</b>(<i></i>) 1135 <b>hasCircuitPython</b>(<i></i>)
883 1136
884 <p> 1137 <p>
914 <dt>Return Type:</dt> 1167 <dt>Return Type:</dt>
915 <dd> 1168 <dd>
916 bool 1169 bool
917 </dd> 1170 </dd>
918 </dl> 1171 </dl>
1172 <a NAME="BaseDevice.hasEthernet" ID="BaseDevice.hasEthernet"></a>
1173 <h4>BaseDevice.hasEthernet</h4>
1174 <b>hasEthernet</b>(<i></i>)
1175
1176 <p>
1177 Public method to check the availability of Ethernet.
1178 </p>
1179 <dl>
1180 <dt>Return:</dt>
1181 <dd>
1182 flag indicating the availability of Ethernet
1183 </dd>
1184 </dl>
1185 <dl>
1186 <dt>Return Type:</dt>
1187 <dd>
1188 bool
1189 </dd>
1190 </dl>
919 <a NAME="BaseDevice.hasFirmwareUrl" ID="BaseDevice.hasFirmwareUrl"></a> 1191 <a NAME="BaseDevice.hasFirmwareUrl" ID="BaseDevice.hasFirmwareUrl"></a>
920 <h4>BaseDevice.hasFirmwareUrl</h4> 1192 <h4>BaseDevice.hasFirmwareUrl</h4>
921 <b>hasFirmwareUrl</b>(<i></i>) 1193 <b>hasFirmwareUrl</b>(<i></i>)
922 1194
923 <p> 1195 <p>
973 </dl> 1245 </dl>
974 <dl> 1246 <dl>
975 <dt>Return Type:</dt> 1247 <dt>Return Type:</dt>
976 <dd> 1248 <dd>
977 bool 1249 bool
1250 </dd>
1251 </dl>
1252 <a NAME="BaseDevice.hasWifi" ID="BaseDevice.hasWifi"></a>
1253 <h4>BaseDevice.hasWifi</h4>
1254 <b>hasWifi</b>(<i></i>)
1255
1256 <p>
1257 Public method to check the availability of WiFi.
1258 </p>
1259 <dl>
1260 <dt>Return:</dt>
1261 <dd>
1262 tuple containing a flag indicating the availability of WiFi
1263 and the WiFi type (picow or pimoroni)
1264 </dd>
1265 </dl>
1266 <dl>
1267 <dt>Return Type:</dt>
1268 <dd>
1269 tuple of (bool, str)
978 </dd> 1270 </dd>
979 </dl> 1271 </dl>
980 <a NAME="BaseDevice.lls" ID="BaseDevice.lls"></a> 1272 <a NAME="BaseDevice.lls" ID="BaseDevice.lls"></a>
981 <h4>BaseDevice.lls</h4> 1273 <h4>BaseDevice.lls</h4>
982 <b>lls</b>(<i>dirname="", fullstat=False, showHidden=False</i>) 1274 <b>lls</b>(<i>dirname="", fullstat=False, showHidden=False</i>)
1174 <dt>Raises <b>OSError</b>:</dt> 1466 <dt>Raises <b>OSError</b>:</dt>
1175 <dd> 1467 <dd>
1176 raised to indicate an issue with the device 1468 raised to indicate an issue with the device
1177 </dd> 1469 </dd>
1178 </dl> 1470 </dl>
1471 <a NAME="BaseDevice.removeCredentials" ID="BaseDevice.removeCredentials"></a>
1472 <h4>BaseDevice.removeCredentials</h4>
1473 <b>removeCredentials</b>(<i></i>)
1474
1475 <p>
1476 Public method to remove the saved credentials from the connected device.
1477 </p>
1478 <dl>
1479 <dt>Return:</dt>
1480 <dd>
1481 tuple containing a flag indicating success and an error message
1482 </dd>
1483 </dl>
1484 <dl>
1485 <dt>Return Type:</dt>
1486 <dd>
1487 tuple of (bool, str)
1488 </dd>
1489 </dl>
1179 <a NAME="BaseDevice.rm" ID="BaseDevice.rm"></a> 1490 <a NAME="BaseDevice.rm" ID="BaseDevice.rm"></a>
1180 <h4>BaseDevice.rm</h4> 1491 <h4>BaseDevice.rm</h4>
1181 <b>rm</b>(<i>filename</i>) 1492 <b>rm</b>(<i>filename</i>)
1182 1493
1183 <p> 1494 <p>
1271 <dt><i>script</i> (str)</dt> 1582 <dt><i>script</i> (str)</dt>
1272 <dd> 1583 <dd>
1273 script to be executed 1584 script to be executed
1274 </dd> 1585 </dd>
1275 </dl> 1586 </dl>
1587 <a NAME="BaseDevice.scanNetworks" ID="BaseDevice.scanNetworks"></a>
1588 <h4>BaseDevice.scanNetworks</h4>
1589 <b>scanNetworks</b>(<i></i>)
1590
1591 <p>
1592 Public method to scan for available WiFi networks.
1593 </p>
1594 <dl>
1595 <dt>Return:</dt>
1596 <dd>
1597 tuple containing the list of available networks as a tuple of 'Name',
1598 'MAC-Address', 'channel', 'RSSI' and 'security' and an error string
1599 </dd>
1600 </dl>
1601 <dl>
1602 <dt>Return Type:</dt>
1603 <dd>
1604 tuple of (list of tuple of (str, str, int, int, str), str)
1605 </dd>
1606 </dl>
1276 <a NAME="BaseDevice.selectDeviceDirectory" ID="BaseDevice.selectDeviceDirectory"></a> 1607 <a NAME="BaseDevice.selectDeviceDirectory" ID="BaseDevice.selectDeviceDirectory"></a>
1277 <h4>BaseDevice.selectDeviceDirectory</h4> 1608 <h4>BaseDevice.selectDeviceDirectory</h4>
1278 <b>selectDeviceDirectory</b>(<i>deviceDirectories</i>) 1609 <b>selectDeviceDirectory</b>(<i>deviceDirectories</i>)
1279 1610
1280 <p> 1611 <p>
1379 <dt><i>on</i> (bool)</dt> 1710 <dt><i>on</i> (bool)</dt>
1380 <dd> 1711 <dd>
1381 flag indicating the active status 1712 flag indicating the active status
1382 </dd> 1713 </dd>
1383 </dl> 1714 </dl>
1715 <a NAME="BaseDevice.startAccessPoint" ID="BaseDevice.startAccessPoint"></a>
1716 <h4>BaseDevice.startAccessPoint</h4>
1717 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, ifconfig=None</i>)
1718
1719 <p>
1720 Public method to start the access point interface.
1721 </p>
1722 <dl>
1723
1724 <dt><i>ssid</i> (str)</dt>
1725 <dd>
1726 SSID of the access point
1727 </dd>
1728 <dt><i>security</i> (int (optional))</dt>
1729 <dd>
1730 security method (defaults to None)
1731 </dd>
1732 <dt><i>password</i> (str (optional))</dt>
1733 <dd>
1734 password (defaults to None)
1735 </dd>
1736 <dt><i>ifconfig</i> (tuple of (str, str, str, str))</dt>
1737 <dd>
1738 IPv4 configuration for the access point if not default
1739 (IPv4 address, netmask, gateway address, DNS server address)
1740 </dd>
1741 </dl>
1742 <dl>
1743 <dt>Return:</dt>
1744 <dd>
1745 tuple containing a flag indicating success and an error message
1746 </dd>
1747 </dl>
1748 <dl>
1749 <dt>Return Type:</dt>
1750 <dd>
1751 tuple of (bool, str)
1752 </dd>
1753 </dl>
1754 <a NAME="BaseDevice.stopAccessPoint" ID="BaseDevice.stopAccessPoint"></a>
1755 <h4>BaseDevice.stopAccessPoint</h4>
1756 <b>stopAccessPoint</b>(<i></i>)
1757
1758 <p>
1759 Public method to stop the access point interface.
1760 </p>
1761 <dl>
1762 <dt>Return:</dt>
1763 <dd>
1764 tuple containg a flag indicating success and an error message
1765 </dd>
1766 </dl>
1767 <dl>
1768 <dt>Return Type:</dt>
1769 <dd>
1770 tuple of (bool, str)
1771 </dd>
1772 </dl>
1384 <a NAME="BaseDevice.supportsLocalFileAccess" ID="BaseDevice.supportsLocalFileAccess"></a> 1773 <a NAME="BaseDevice.supportsLocalFileAccess" ID="BaseDevice.supportsLocalFileAccess"></a>
1385 <h4>BaseDevice.supportsLocalFileAccess</h4> 1774 <h4>BaseDevice.supportsLocalFileAccess</h4>
1386 <b>supportsLocalFileAccess</b>(<i></i>) 1775 <b>supportsLocalFileAccess</b>(<i></i>)
1387 1776
1388 <p> 1777 <p>
1425 <dt>Raises <b>OSError</b>:</dt> 1814 <dt>Raises <b>OSError</b>:</dt>
1426 <dd> 1815 <dd>
1427 raised to indicate an issue with the device 1816 raised to indicate an issue with the device
1428 </dd> 1817 </dd>
1429 </dl> 1818 </dl>
1819 <a NAME="BaseDevice.writeCredentials" ID="BaseDevice.writeCredentials"></a>
1820 <h4>BaseDevice.writeCredentials</h4>
1821 <b>writeCredentials</b>(<i>ssid, password</i>)
1822
1823 <p>
1824 Public method to write the given credentials to the connected device and modify
1825 the start script to connect automatically.
1826 </p>
1827 <dl>
1828
1829 <dt><i>ssid</i> (str)</dt>
1830 <dd>
1831 SSID of the network to connect to
1832 </dd>
1833 <dt><i>password</i> (str)</dt>
1834 <dd>
1835 password needed to authenticate
1836 </dd>
1837 </dl>
1838 <dl>
1839 <dt>Return:</dt>
1840 <dd>
1841 tuple containing a flag indicating success and an error message
1842 </dd>
1843 </dl>
1844 <dl>
1845 <dt>Return Type:</dt>
1846 <dd>
1847 tuple of (bool, str)
1848 </dd>
1849 </dl>
1430 <div align="right"><a href="#top">Up</a></div> 1850 <div align="right"><a href="#top">Up</a></div>
1431 <hr /> 1851 <hr />
1432 </body></html> 1852 </body></html>

eric ide

mercurial