diff -r 66a6d3f131cc -r e58c3fadcacc src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html --- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html Tue Mar 14 13:19:33 2023 +0100 +++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html Tue Mar 14 13:23:13 2023 +0100 @@ -111,6 +111,10 @@ <td>Private slot to install Python files into the onboard library.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.__modifySettings">__modifySettings</a></td> +<td>Private method to modify the 'settings.toml' file as of CircuitPython 8.0.0.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.__resetDevice">__resetDevice</a></td> <td>Private slot to reset the connected device.</td> </tr> @@ -151,6 +155,14 @@ <td>Public method to check, if the internet can be reached.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.checkInternetViaLan">checkInternetViaLan</a></td> +<td>Public method to check, if the internet can be reached (LAN variant).</td> +</tr> +<tr> +<td><a href="#CircuitPythonDevice.connectToLan">connectToLan</a></td> +<td>Public method to connect the connected device to the LAN.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.connectWifi">connectWifi</a></td> <td>Public method to connect a device to a WiFi network.</td> </tr> @@ -159,6 +171,10 @@ <td>Public method to deactivate the Bluetooth interface.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.deactivateEthernet">deactivateEthernet</a></td> +<td>Public method to deactivate the Ethernet interface of the connected device.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.deactivateInterface">deactivateInterface</a></td> <td>Public method to deactivate a given WiFi interface of the connected device.</td> </tr> @@ -167,6 +183,10 @@ <td>Public method to get the name of the device.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.disconnectFromLan">disconnectFromLan</a></td> +<td>Public method to disconnect from the LAN.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.disconnectWifi">disconnectWifi</a></td> <td>Public method to disconnect a device from the WiFi network.</td> </tr> @@ -195,6 +215,10 @@ <td>Public method to retrieve the entries for the downloads menu.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.getEthernetStatus">getEthernetStatus</a></td> +<td>Public method to get Ethernet status data of the connected board.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.getWifiData">getWifiData</a></td> <td>Public method to get data related to the current WiFi status.</td> </tr> @@ -207,6 +231,10 @@ <td>Public method to check the availability of Bluetooth.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.hasEthernet">hasEthernet</a></td> +<td>Public method to check the availability of Ethernet.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.hasFlashMenuEntry">hasFlashMenuEntry</a></td> <td>Public method to check, if the device has its own flash menu entry.</td> </tr> @@ -223,6 +251,10 @@ <td>Public method to remove the saved credentials from the connected device.</td> </tr> <tr> +<td><a href="#CircuitPythonDevice.removeLanAutoConnect">removeLanAutoConnect</a></td> +<td>Public method to remove the saved IPv4 parameters from the connected device.</td> +</tr> +<tr> <td><a href="#CircuitPythonDevice.runScript">runScript</a></td> <td>Public method to run the given Python script.</td> </tr> @@ -262,6 +294,10 @@ <td><a href="#CircuitPythonDevice.writeCredentials">writeCredentials</a></td> <td>Public method to write the given credentials to the connected device and modify the start script to connect automatically.</td> </tr> +<tr> +<td><a href="#CircuitPythonDevice.writeLanAutoConnect">writeLanAutoConnect</a></td> +<td>Public method to generate a script and associated configuration to connect the device to the LAN during boot time.</td> +</tr> </table> <h3>Static Methods</h3> @@ -271,7 +307,7 @@ <a NAME="CircuitPythonDevice.__init__" ID="CircuitPythonDevice.__init__"></a> <h4>CircuitPythonDevice (Constructor)</h4> -<b>CircuitPythonDevice</b>(<i>microPythonWidget, deviceType, boardName, hasWorkspace=True, parent=None</i>) +<b>CircuitPythonDevice</b>(<i>microPythonWidget, deviceType, boardName, vid=0, pid=0, hasWorkspace=True, parent=None, </i>) <p> Constructor @@ -290,6 +326,14 @@ <dd> name of the board </dd> +<dt><i>vid</i> (int (optional))</dt> +<dd> +vendor ID (defaults to 0) +</dd> +<dt><i>pid</i> (int (optional))</dt> +<dd> +product ID (defaults to 0) +</dd> <dt><i>hasWorkspace</i> (bool (optional))</dt> <dd> flag indicating that the devices supports access via @@ -463,6 +507,32 @@ (defaults to False) </dd> </dl> +<a NAME="CircuitPythonDevice.__modifySettings" ID="CircuitPythonDevice.__modifySettings"></a> +<h4>CircuitPythonDevice.__modifySettings</h4> +<b>__modifySettings</b>(<i>changedEntries</i>) + +<p> + Private method to modify the 'settings.toml' file as of CircuitPython 8.0.0. +</p> +<dl> + +<dt><i>changedEntries</i> (dict of {str: str})</dt> +<dd> +dictionary containing the TOML entries to be changed +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a success flag and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <a NAME="CircuitPythonDevice.__resetDevice" ID="CircuitPythonDevice.__resetDevice"></a> <h4>CircuitPythonDevice.__resetDevice</h4> <b>__resetDevice</b>(<i></i>) @@ -627,6 +697,55 @@ tuple of (bool, str) </dd> </dl> +<a NAME="CircuitPythonDevice.checkInternetViaLan" ID="CircuitPythonDevice.checkInternetViaLan"></a> +<h4>CircuitPythonDevice.checkInternetViaLan</h4> +<b>checkInternetViaLan</b>(<i></i>) + +<p> + Public method to check, if the internet can be reached (LAN variant). +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating reachability and an error string +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> +<a NAME="CircuitPythonDevice.connectToLan" ID="CircuitPythonDevice.connectToLan"></a> +<h4>CircuitPythonDevice.connectToLan</h4> +<b>connectToLan</b>(<i>config</i>) + +<p> + Public method to connect the connected device to the LAN. +</p> +<p> + Note: The MAC address of the interface is configured with the WIZ +</p> +<dl> + +<dt><i>config</i> (str or tuple of (str, str, str, str))</dt> +<dd> +configuration for the connection (either the string 'dhcp' + for a dynamic address or a tuple of four strings with the IPv4 parameters. +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating success and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <a NAME="CircuitPythonDevice.connectWifi" ID="CircuitPythonDevice.connectWifi"></a> <h4>CircuitPythonDevice.connectWifi</h4> <b>connectWifi</b>(<i>ssid, password</i>) @@ -683,6 +802,25 @@ raised to indicate an issue with the device </dd> </dl> +<a NAME="CircuitPythonDevice.deactivateEthernet" ID="CircuitPythonDevice.deactivateEthernet"></a> +<h4>CircuitPythonDevice.deactivateEthernet</h4> +<b>deactivateEthernet</b>(<i></i>) + +<p> + Public method to deactivate the Ethernet interface of the connected device. +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containg a flag indicating success and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <a NAME="CircuitPythonDevice.deactivateInterface" ID="CircuitPythonDevice.deactivateInterface"></a> <h4>CircuitPythonDevice.deactivateInterface</h4> <b>deactivateInterface</b>(<i>interface</i>) @@ -740,6 +878,25 @@ str </dd> </dl> +<a NAME="CircuitPythonDevice.disconnectFromLan" ID="CircuitPythonDevice.disconnectFromLan"></a> +<h4>CircuitPythonDevice.disconnectFromLan</h4> +<b>disconnectFromLan</b>(<i></i>) + +<p> + Public method to disconnect from the LAN. +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating success and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <a NAME="CircuitPythonDevice.disconnectWifi" ID="CircuitPythonDevice.disconnectWifi"></a> <h4>CircuitPythonDevice.disconnectWifi</h4> <b>disconnectWifi</b>(<i></i>) @@ -893,6 +1050,33 @@ list of tuple of (str, str) </dd> </dl> +<a NAME="CircuitPythonDevice.getEthernetStatus" ID="CircuitPythonDevice.getEthernetStatus"></a> +<h4>CircuitPythonDevice.getEthernetStatus</h4> +<b>getEthernetStatus</b>(<i></i>) + +<p> + Public method to get Ethernet status data of the connected board. +</p> +<dl> +<dt>Return:</dt> +<dd> +list of tuples containing the translated status data label and + the associated value +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of tuples of (str, str) +</dd> +</dl> +<dl> + +<dt>Raises <b>OSError</b>:</dt> +<dd> +raised to indicate an issue with the device +</dd> +</dl> <a NAME="CircuitPythonDevice.getWifiData" ID="CircuitPythonDevice.getWifiData"></a> <h4>CircuitPythonDevice.getWifiData</h4> <b>getWifiData</b>(<i></i>) @@ -972,6 +1156,33 @@ raised to indicate an issue with the device </dd> </dl> +<a NAME="CircuitPythonDevice.hasEthernet" ID="CircuitPythonDevice.hasEthernet"></a> +<h4>CircuitPythonDevice.hasEthernet</h4> +<b>hasEthernet</b>(<i></i>) + +<p> + Public method to check the availability of Ethernet. +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating the availability of Ethernet + and the Ethernet type +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> +<dl> + +<dt>Raises <b>OSError</b>:</dt> +<dd> +raised to indicate an issue with the device +</dd> +</dl> <a NAME="CircuitPythonDevice.hasFlashMenuEntry" ID="CircuitPythonDevice.hasFlashMenuEntry"></a> <h4>CircuitPythonDevice.hasFlashMenuEntry</h4> <b>hasFlashMenuEntry</b>(<i></i>) @@ -1063,6 +1274,28 @@ tuple of (bool, str) </dd> </dl> +<a NAME="CircuitPythonDevice.removeLanAutoConnect" ID="CircuitPythonDevice.removeLanAutoConnect"></a> +<h4>CircuitPythonDevice.removeLanAutoConnect</h4> +<b>removeLanAutoConnect</b>(<i></i>) + +<p> + Public method to remove the saved IPv4 parameters from the connected device. +</p> +<p> + Note: This disables the LAN auto-connect feature. +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating success and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <a NAME="CircuitPythonDevice.runScript" ID="CircuitPythonDevice.runScript"></a> <h4>CircuitPythonDevice.runScript</h4> <b>runScript</b>(<i>script</i>) @@ -1271,6 +1504,34 @@ tuple of (bool, str) </dd> </dl> +<a NAME="CircuitPythonDevice.writeLanAutoConnect" ID="CircuitPythonDevice.writeLanAutoConnect"></a> +<h4>CircuitPythonDevice.writeLanAutoConnect</h4> +<b>writeLanAutoConnect</b>(<i>config</i>) + +<p> + Public method to generate a script and associated configuration to connect the + device to the LAN during boot time. +</p> +<dl> + +<dt><i>config</i> (str or tuple of (str, str, str, str))</dt> +<dd> +configuration for the connection (either the string 'dhcp' + for a dynamic address or a tuple of four strings with the IPv4 parameters. +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +tuple containing a flag indicating success and an error message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (bool, str) +</dd> +</dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr />