--- a/src/eric7/MicroPython/Devices/DeviceBase.py Sat Mar 11 15:28:47 2023 +0100 +++ b/src/eric7/MicroPython/Devices/DeviceBase.py Sun Mar 12 14:56:04 2023 +0100 @@ -122,7 +122,10 @@ self._deviceData = self.__getDeviceData() self._deviceData["wifi"], self._deviceData["wifi_type"] = self.hasWifi() self._deviceData["bluetooth"] = self.hasBluetooth() - self._deviceData["ethernet"] = self.hasEthernet() + ( + self._deviceData["ethernet"], + self._deviceData["ethernet_type"], + ) = self.hasEthernet() self._deviceData["ntp"] = self.hasNetworkTime() def getDeviceType(self): @@ -1461,6 +1464,88 @@ """ return False + def addDeviceEthernetEntries(self, menu): + """ + Public method to add device specific entries to the given menu. + + @param menu reference to the context menu + @type QMenu + """ + pass + + def getEthernetStatus(self): + """ + Public method to get Ethernet status data of the connected board. + + @return list of tuples containing the translated status data label and + the associated value + @rtype list of tuples of (str, str) + """ + return [] + + def connectToLan(self, config): + """ + Public method to connect the connected device to the LAN. + + @param config configuration for the connection (either the string 'dhcp' + for a dynamic address or a tuple of four strings with the IPv4 parameters. + @type str or tuple of (str, str, str, str) + @return tuple containing a flag indicating success and an error message + @rtype tuple of (bool, str) + """ + return False, "" + + def disconnectFromLan(self): + """ + Public method to disconnect from the LAN. + + @return tuple containing a flag indicating success and an error message + @rtype tuple of (bool, str) + """ + return True, "" + + def checkInternetViaLan(self): + """ + Public method to check, if the internet can be reached (LAN variant). + + @return tuple containing a flag indicating reachability and an error string + @rtype tuple of (bool, str) + """ + return False, "" + + def deactivateEthernet(self): + """ + Public method to deactivate the Ethernet interface of the connected device. + + @return tuple containg a flag indicating success and an error message + @rtype tuple of (bool, str) + """ + return True, "" + + def writeLanAutoConnect(self, config): + """ + Public method to generate a script and associated configuration to connect the + device to the LAN during boot time. + + @param config configuration for the connection (either the string 'dhcp' + for a dynamic address or a tuple of four strings with the IPv4 parameters. + @type str or tuple of (str, str, str, str) + @return tuple containing a flag indicating success and an error message + @rtype tuple of (bool, str) + """ + return False, "" + + def removeLanAutoConnect(self): + """ + Public method to remove the saved IPv4 parameters from the connected device. + + Note: This disables the LAN auto-connect feature. + + @return tuple containing a flag indicating success and an error message + @rtype tuple of (bool, str) + """ + return False, "" + ################################################################## ## Methods below implement Bluetooth related methods ##################################################################