213 <td><a href="#BaseDevice.checkInternetViaLan">checkInternetViaLan</a></td> |
213 <td><a href="#BaseDevice.checkInternetViaLan">checkInternetViaLan</a></td> |
214 <td>Public method to check, if the internet can be reached (LAN variant).</td> |
214 <td>Public method to check, if the internet can be reached (LAN variant).</td> |
215 </tr> |
215 </tr> |
216 <tr> |
216 <tr> |
217 <td><a href="#BaseDevice.connectToLan">connectToLan</a></td> |
217 <td><a href="#BaseDevice.connectToLan">connectToLan</a></td> |
218 <td></td> |
218 <td>Public method to connect the connected device to the LAN.</td> |
219 </tr> |
219 </tr> |
220 <tr> |
220 <tr> |
221 <td><a href="#BaseDevice.connectWifi">connectWifi</a></td> |
221 <td><a href="#BaseDevice.connectWifi">connectWifi</a></td> |
222 <td></td> |
222 <td>Public method to connect a device to a WiFi network.</td> |
223 </tr> |
223 </tr> |
224 <tr> |
224 <tr> |
225 <td><a href="#BaseDevice.deactivateBluetoothInterface">deactivateBluetoothInterface</a></td> |
225 <td><a href="#BaseDevice.deactivateBluetoothInterface">deactivateBluetoothInterface</a></td> |
226 <td>Public method to deactivate the Bluetooth interface.</td> |
226 <td>Public method to deactivate the Bluetooth interface.</td> |
227 </tr> |
227 </tr> |
229 <td><a href="#BaseDevice.deactivateEthernet">deactivateEthernet</a></td> |
229 <td><a href="#BaseDevice.deactivateEthernet">deactivateEthernet</a></td> |
230 <td>Public method to deactivate the Ethernet interface of the connected device.</td> |
230 <td>Public method to deactivate the Ethernet interface of the connected device.</td> |
231 </tr> |
231 </tr> |
232 <tr> |
232 <tr> |
233 <td><a href="#BaseDevice.deactivateInterface">deactivateInterface</a></td> |
233 <td><a href="#BaseDevice.deactivateInterface">deactivateInterface</a></td> |
234 <td></td> |
234 <td>Public method to deactivate a given WiFi interface of the connected device.</td> |
235 </tr> |
235 </tr> |
236 <tr> |
236 <tr> |
237 <td><a href="#BaseDevice.deviceName">deviceName</a></td> |
237 <td><a href="#BaseDevice.deviceName">deviceName</a></td> |
238 <td>Public method to get the name of the device.</td> |
238 <td>Public method to get the name of the device.</td> |
239 </tr> |
239 </tr> |
253 <td><a href="#BaseDevice.downloadFirmware">downloadFirmware</a></td> |
253 <td><a href="#BaseDevice.downloadFirmware">downloadFirmware</a></td> |
254 <td>Public method to download the device firmware.</td> |
254 <td>Public method to download the device firmware.</td> |
255 </tr> |
255 </tr> |
256 <tr> |
256 <tr> |
257 <td><a href="#BaseDevice.enableWebrepl">enableWebrepl</a></td> |
257 <td><a href="#BaseDevice.enableWebrepl">enableWebrepl</a></td> |
258 <td></td> |
258 <td>Public method to write the given WebREPL password to the connected device and modify the start script to start the WebREPL server.</td> |
259 </tr> |
259 </tr> |
260 <tr> |
260 <tr> |
261 <td><a href="#BaseDevice.ensurePath">ensurePath</a></td> |
261 <td><a href="#BaseDevice.ensurePath">ensurePath</a></td> |
262 <td>Public method to ensure, that the given target path exists.</td> |
262 <td>Public method to ensure, that the given target path exists.</td> |
263 </tr> |
263 </tr> |
301 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td> |
301 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td> |
302 <td>Public method to get a copy of the determined device data or part of them.</td> |
302 <td>Public method to get a copy of the determined device data or part of them.</td> |
303 </tr> |
303 </tr> |
304 <tr> |
304 <tr> |
305 <td><a href="#BaseDevice.getDeviceScan">getDeviceScan</a></td> |
305 <td><a href="#BaseDevice.getDeviceScan">getDeviceScan</a></td> |
306 <td></td> |
306 <td>Public method to perform a Bluetooth device scan.</td> |
307 </tr> |
307 </tr> |
308 <tr> |
308 <tr> |
309 <td><a href="#BaseDevice.getDeviceType">getDeviceType</a></td> |
309 <td><a href="#BaseDevice.getDeviceType">getDeviceType</a></td> |
310 <td>Public method to get the device type.</td> |
310 <td>Public method to get the device type.</td> |
311 </tr> |
311 </tr> |
513 <td><a href="#BaseDevice.supportsLocalFileAccess">supportsLocalFileAccess</a></td> |
513 <td><a href="#BaseDevice.supportsLocalFileAccess">supportsLocalFileAccess</a></td> |
514 <td>Public method to indicate file access via a local directory.</td> |
514 <td>Public method to indicate file access via a local directory.</td> |
515 </tr> |
515 </tr> |
516 <tr> |
516 <tr> |
517 <td><a href="#BaseDevice.syncTime">syncTime</a></td> |
517 <td><a href="#BaseDevice.syncTime">syncTime</a></td> |
518 <td></td> |
518 <td>Public method to set the time of the connected device to the local computer's time.</td> |
519 </tr> |
519 </tr> |
520 <tr> |
520 <tr> |
521 <td><a href="#BaseDevice.upipInstall">upipInstall</a></td> |
521 <td><a href="#BaseDevice.upipInstall">upipInstall</a></td> |
522 <td>Public method to install packages using 'upip'.</td> |
522 <td>Public method to install packages using 'upip'.</td> |
523 </tr> |
523 </tr> |
524 <tr> |
524 <tr> |
525 <td><a href="#BaseDevice.writeCredentials">writeCredentials</a></td> |
525 <td><a href="#BaseDevice.writeCredentials">writeCredentials</a></td> |
526 <td></td> |
526 <td>Public method to write the given credentials to the connected device and modify the start script to connect automatically.</td> |
527 </tr> |
527 </tr> |
528 <tr> |
528 <tr> |
529 <td><a href="#BaseDevice.writeLanAutoConnect">writeLanAutoConnect</a></td> |
529 <td><a href="#BaseDevice.writeLanAutoConnect">writeLanAutoConnect</a></td> |
530 <td></td> |
530 <td>Public method to generate a script and associated configuration to connect the device to the LAN during boot time.</td> |
531 </tr> |
531 </tr> |
532 </table> |
532 </table> |
533 <h3>Static Methods</h3> |
533 <h3>Static Methods</h3> |
534 |
534 |
535 <table> |
535 <table> |
907 </dl> |
907 </dl> |
908 <a NAME="BaseDevice.connectToLan" ID="BaseDevice.connectToLan"></a> |
908 <a NAME="BaseDevice.connectToLan" ID="BaseDevice.connectToLan"></a> |
909 <h4>BaseDevice.connectToLan</h4> |
909 <h4>BaseDevice.connectToLan</h4> |
910 <b>connectToLan</b>(<i>config, hostname</i>) |
910 <b>connectToLan</b>(<i>config, hostname</i>) |
911 |
911 |
|
912 <p> |
|
913 Public method to connect the connected device to the LAN. |
|
914 </p> |
|
915 <dl> |
|
916 |
|
917 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
|
918 <dd> |
|
919 configuration for the connection (either the string 'dhcp' |
|
920 for a dynamic address or a tuple of four strings with the IPv4 parameters. |
|
921 </dd> |
|
922 <dt><i>hostname</i> (str)</dt> |
|
923 <dd> |
|
924 host name of the device |
|
925 </dd> |
|
926 </dl> |
|
927 <dl> |
|
928 <dt>Return:</dt> |
|
929 <dd> |
|
930 tuple containing a flag indicating success and an error message |
|
931 </dd> |
|
932 </dl> |
|
933 <dl> |
|
934 <dt>Return Type:</dt> |
|
935 <dd> |
|
936 tuple of (bool, str) |
|
937 </dd> |
|
938 </dl> |
912 <a NAME="BaseDevice.connectWifi" ID="BaseDevice.connectWifi"></a> |
939 <a NAME="BaseDevice.connectWifi" ID="BaseDevice.connectWifi"></a> |
913 <h4>BaseDevice.connectWifi</h4> |
940 <h4>BaseDevice.connectWifi</h4> |
914 <b>connectWifi</b>(<i>ssid, password, hostname</i>) |
941 <b>connectWifi</b>(<i>ssid, password, hostname</i>) |
915 |
942 |
|
943 <p> |
|
944 Public method to connect a device to a WiFi network. |
|
945 </p> |
|
946 <dl> |
|
947 |
|
948 <dt><i>ssid</i> (str)</dt> |
|
949 <dd> |
|
950 name (SSID) of the WiFi network |
|
951 </dd> |
|
952 <dt><i>password</i> (str)</dt> |
|
953 <dd> |
|
954 password needed to connect |
|
955 </dd> |
|
956 <dt><i>hostname</i> (str)</dt> |
|
957 <dd> |
|
958 host name of the device |
|
959 </dd> |
|
960 </dl> |
|
961 <dl> |
|
962 <dt>Return:</dt> |
|
963 <dd> |
|
964 tuple containing the connection status and an error string |
|
965 </dd> |
|
966 </dl> |
|
967 <dl> |
|
968 <dt>Return Type:</dt> |
|
969 <dd> |
|
970 tuple of (bool, str) |
|
971 </dd> |
|
972 </dl> |
916 <a NAME="BaseDevice.deactivateBluetoothInterface" ID="BaseDevice.deactivateBluetoothInterface"></a> |
973 <a NAME="BaseDevice.deactivateBluetoothInterface" ID="BaseDevice.deactivateBluetoothInterface"></a> |
917 <h4>BaseDevice.deactivateBluetoothInterface</h4> |
974 <h4>BaseDevice.deactivateBluetoothInterface</h4> |
918 <b>deactivateBluetoothInterface</b>(<i></i>) |
975 <b>deactivateBluetoothInterface</b>(<i></i>) |
919 |
976 |
920 <p> |
977 <p> |
953 </dl> |
1010 </dl> |
954 <a NAME="BaseDevice.deactivateInterface" ID="BaseDevice.deactivateInterface"></a> |
1011 <a NAME="BaseDevice.deactivateInterface" ID="BaseDevice.deactivateInterface"></a> |
955 <h4>BaseDevice.deactivateInterface</h4> |
1012 <h4>BaseDevice.deactivateInterface</h4> |
956 <b>deactivateInterface</b>(<i>interface</i>) |
1013 <b>deactivateInterface</b>(<i>interface</i>) |
957 |
1014 |
|
1015 <p> |
|
1016 Public method to deactivate a given WiFi interface of the connected device. |
|
1017 </p> |
|
1018 <dl> |
|
1019 |
|
1020 <dt><i>interface</i> (str)</dt> |
|
1021 <dd> |
|
1022 designation of the interface to be deactivated (one of 'AP' |
|
1023 or 'STA') |
|
1024 </dd> |
|
1025 </dl> |
|
1026 <dl> |
|
1027 <dt>Return:</dt> |
|
1028 <dd> |
|
1029 tuple containg a flag indicating success and an error message |
|
1030 </dd> |
|
1031 </dl> |
|
1032 <dl> |
|
1033 <dt>Return Type:</dt> |
|
1034 <dd> |
|
1035 tuple of (bool, str) |
|
1036 </dd> |
|
1037 </dl> |
958 <a NAME="BaseDevice.deviceName" ID="BaseDevice.deviceName"></a> |
1038 <a NAME="BaseDevice.deviceName" ID="BaseDevice.deviceName"></a> |
959 <h4>BaseDevice.deviceName</h4> |
1039 <h4>BaseDevice.deviceName</h4> |
960 <b>deviceName</b>(<i></i>) |
1040 <b>deviceName</b>(<i></i>) |
961 |
1041 |
962 <p> |
1042 <p> |
1041 </p> |
1121 </p> |
1042 <a NAME="BaseDevice.enableWebrepl" ID="BaseDevice.enableWebrepl"></a> |
1122 <a NAME="BaseDevice.enableWebrepl" ID="BaseDevice.enableWebrepl"></a> |
1043 <h4>BaseDevice.enableWebrepl</h4> |
1123 <h4>BaseDevice.enableWebrepl</h4> |
1044 <b>enableWebrepl</b>(<i>password</i>) |
1124 <b>enableWebrepl</b>(<i>password</i>) |
1045 |
1125 |
|
1126 <p> |
|
1127 Public method to write the given WebREPL password to the connected device and |
|
1128 modify the start script to start the WebREPL server. |
|
1129 </p> |
|
1130 <dl> |
|
1131 |
|
1132 <dt><i>password</i> (str)</dt> |
|
1133 <dd> |
|
1134 password needed to authenticate |
|
1135 </dd> |
|
1136 </dl> |
|
1137 <dl> |
|
1138 <dt>Return:</dt> |
|
1139 <dd> |
|
1140 tuple containing a flag indicating success and an error message |
|
1141 </dd> |
|
1142 </dl> |
|
1143 <dl> |
|
1144 <dt>Return Type:</dt> |
|
1145 <dd> |
|
1146 tuple of (bool, str) |
|
1147 </dd> |
|
1148 </dl> |
1046 <a NAME="BaseDevice.ensurePath" ID="BaseDevice.ensurePath"></a> |
1149 <a NAME="BaseDevice.ensurePath" ID="BaseDevice.ensurePath"></a> |
1047 <h4>BaseDevice.ensurePath</h4> |
1150 <h4>BaseDevice.ensurePath</h4> |
1048 <b>ensurePath</b>(<i>target</i>) |
1151 <b>ensurePath</b>(<i>target</i>) |
1049 |
1152 |
1050 <p> |
1153 <p> |
1343 </dl> |
1446 </dl> |
1344 <a NAME="BaseDevice.getDeviceScan" ID="BaseDevice.getDeviceScan"></a> |
1447 <a NAME="BaseDevice.getDeviceScan" ID="BaseDevice.getDeviceScan"></a> |
1345 <h4>BaseDevice.getDeviceScan</h4> |
1448 <h4>BaseDevice.getDeviceScan</h4> |
1346 <b>getDeviceScan</b>(<i>timeout=10</i>) |
1449 <b>getDeviceScan</b>(<i>timeout=10</i>) |
1347 |
1450 |
|
1451 <p> |
|
1452 Public method to perform a Bluetooth device scan. |
|
1453 </p> |
|
1454 <dl> |
|
1455 |
|
1456 <dt><i>timeout</i> (int (optional))</dt> |
|
1457 <dd> |
|
1458 duration of the device scan in seconds (defaults |
|
1459 to 10) |
|
1460 </dd> |
|
1461 </dl> |
|
1462 <dl> |
|
1463 <dt>Return:</dt> |
|
1464 <dd> |
|
1465 tuple containing a dictionary with the scan results and |
|
1466 an error string |
|
1467 </dd> |
|
1468 </dl> |
|
1469 <dl> |
|
1470 <dt>Return Type:</dt> |
|
1471 <dd> |
|
1472 tuple of (dict, str) |
|
1473 </dd> |
|
1474 </dl> |
1348 <a NAME="BaseDevice.getDeviceType" ID="BaseDevice.getDeviceType"></a> |
1475 <a NAME="BaseDevice.getDeviceType" ID="BaseDevice.getDeviceType"></a> |
1349 <h4>BaseDevice.getDeviceType</h4> |
1476 <h4>BaseDevice.getDeviceType</h4> |
1350 <b>getDeviceType</b>(<i></i>) |
1477 <b>getDeviceType</b>(<i></i>) |
1351 |
1478 |
1352 <p> |
1479 <p> |
2495 </dl> |
2622 </dl> |
2496 <a NAME="BaseDevice.syncTime" ID="BaseDevice.syncTime"></a> |
2623 <a NAME="BaseDevice.syncTime" ID="BaseDevice.syncTime"></a> |
2497 <h4>BaseDevice.syncTime</h4> |
2624 <h4>BaseDevice.syncTime</h4> |
2498 <b>syncTime</b>(<i>deviceType, hasCPy=False</i>) |
2625 <b>syncTime</b>(<i>deviceType, hasCPy=False</i>) |
2499 |
2626 |
|
2627 <p> |
|
2628 Public method to set the time of the connected device to the local |
|
2629 computer's time. |
|
2630 </p> |
|
2631 <dl> |
|
2632 |
|
2633 <dt><i>deviceType</i> (str)</dt> |
|
2634 <dd> |
|
2635 type of board to sync time to |
|
2636 </dd> |
|
2637 <dt><i>hasCPy</i> (bool)</dt> |
|
2638 <dd> |
|
2639 flag indicating that the device has CircuitPython loadede |
|
2640 (defaults to False) |
|
2641 </dd> |
|
2642 </dl> |
|
2643 <dl> |
|
2644 |
|
2645 <dt>Raises <b>OSError</b>:</dt> |
|
2646 <dd> |
|
2647 raised to indicate an issue with the device |
|
2648 </dd> |
|
2649 </dl> |
2500 <a NAME="BaseDevice.upipInstall" ID="BaseDevice.upipInstall"></a> |
2650 <a NAME="BaseDevice.upipInstall" ID="BaseDevice.upipInstall"></a> |
2501 <h4>BaseDevice.upipInstall</h4> |
2651 <h4>BaseDevice.upipInstall</h4> |
2502 <b>upipInstall</b>(<i>packages</i>) |
2652 <b>upipInstall</b>(<i>packages</i>) |
2503 |
2653 |
2504 <p> |
2654 <p> |
2519 </dl> |
2669 </dl> |
2520 <a NAME="BaseDevice.writeCredentials" ID="BaseDevice.writeCredentials"></a> |
2670 <a NAME="BaseDevice.writeCredentials" ID="BaseDevice.writeCredentials"></a> |
2521 <h4>BaseDevice.writeCredentials</h4> |
2671 <h4>BaseDevice.writeCredentials</h4> |
2522 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) |
2672 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) |
2523 |
2673 |
|
2674 <p> |
|
2675 Public method to write the given credentials to the connected device and modify |
|
2676 the start script to connect automatically. |
|
2677 </p> |
|
2678 <dl> |
|
2679 |
|
2680 <dt><i>ssid</i> (str)</dt> |
|
2681 <dd> |
|
2682 SSID of the network to connect to |
|
2683 </dd> |
|
2684 <dt><i>password</i> (str)</dt> |
|
2685 <dd> |
|
2686 password needed to authenticate |
|
2687 </dd> |
|
2688 <dt><i>hostname</i> (str)</dt> |
|
2689 <dd> |
|
2690 host name of the device |
|
2691 </dd> |
|
2692 <dt><i>country</i> (str)</dt> |
|
2693 <dd> |
|
2694 WiFi country code |
|
2695 </dd> |
|
2696 </dl> |
|
2697 <dl> |
|
2698 <dt>Return:</dt> |
|
2699 <dd> |
|
2700 tuple containing a flag indicating success and an error message |
|
2701 </dd> |
|
2702 </dl> |
|
2703 <dl> |
|
2704 <dt>Return Type:</dt> |
|
2705 <dd> |
|
2706 tuple of (bool, str) |
|
2707 </dd> |
|
2708 </dl> |
2524 <a NAME="BaseDevice.writeLanAutoConnect" ID="BaseDevice.writeLanAutoConnect"></a> |
2709 <a NAME="BaseDevice.writeLanAutoConnect" ID="BaseDevice.writeLanAutoConnect"></a> |
2525 <h4>BaseDevice.writeLanAutoConnect</h4> |
2710 <h4>BaseDevice.writeLanAutoConnect</h4> |
2526 <b>writeLanAutoConnect</b>(<i>config, hostname</i>) |
2711 <b>writeLanAutoConnect</b>(<i>config, hostname</i>) |
2527 |
2712 |
|
2713 <p> |
|
2714 Public method to generate a script and associated configuration to connect the |
|
2715 device to the LAN during boot time. |
|
2716 </p> |
|
2717 <dl> |
|
2718 |
|
2719 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
|
2720 <dd> |
|
2721 configuration for the connection (either the string 'dhcp' |
|
2722 for a dynamic address or a tuple of four strings with the IPv4 parameters. |
|
2723 </dd> |
|
2724 <dt><i>hostname</i> (str)</dt> |
|
2725 <dd> |
|
2726 host name of the device |
|
2727 </dd> |
|
2728 </dl> |
|
2729 <dl> |
|
2730 <dt>Return:</dt> |
|
2731 <dd> |
|
2732 tuple containing a flag indicating success and an error message |
|
2733 </dd> |
|
2734 </dl> |
|
2735 <dl> |
|
2736 <dt>Return Type:</dt> |
|
2737 <dd> |
|
2738 tuple of (bool, str) |
|
2739 </dd> |
|
2740 </dl> |
2528 <div align="right"><a href="#top">Up</a></div> |
2741 <div align="right"><a href="#top">Up</a></div> |
2529 <hr /> |
2742 <hr /> |
2530 </body></html> |
2743 </body></html> |