--- a/src/eric7/MicroPython/Devices/EspDevices.py Mon Nov 04 11:39:18 2024 +0100 +++ b/src/eric7/MicroPython/Devices/EspDevices.py Mon Nov 04 17:03:29 2024 +0100 @@ -59,6 +59,9 @@ 202: self.tr("authentication failed"), 203: self.tr("association failed"), 204: self.tr("handshake timeout"), + 210: self.tr("no access point with compatible security found"), + 211: self.tr("no access point with suitable authentication mode found"), + 212: self.tr("no access point with sufficient RSSI found"), 1000: self.tr("idle"), 1001: self.tr("connecting"), 1010: self.tr("connected"), @@ -220,6 +223,9 @@ self.__macAddressAct = self.__espMenu.addAction( self.tr("Show MAC Address"), self.__showMACAddress ) + self.__securityInfoAct = self.__espMenu.addAction( + self.tr("Show Security Information"), self.__showSecurityInfo + ) self.__espMenu.addSeparator() self.__resetAct = self.__espMenu.addAction( self.tr("Reset Device"), self.__resetDevice @@ -246,6 +252,7 @@ self.__chipIdAct.setEnabled(not linkConnected) self.__flashIdAct.setEnabled(not linkConnected) self.__macAddressAct.setEnabled(not linkConnected) + self.__securityInfoAct.setEnabled(not linkConnected) self.__resetAct.setEnabled(connected or not linkConnected) menu.addMenu(self.__espMenu) @@ -522,6 +529,30 @@ dlg.exec() @pyqtSlot() + def __showSecurityInfo(self): + """ + Private slot to show some security related information of the ESP chip. + """ + args = [ + "-u", + "-m", + "esptool", + "--port", + self.microPython.getCurrentPort(), + "get_security_info", + ] + dlg = EricProcessDialog( + self.tr("'esptool get_security_info' Output"), + self.tr("Show Security Information"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), + parent=self.microPython, + ) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) + if res: + dlg.exec() + + @pyqtSlot() def __resetDevice(self): """ Private slot to reset the connected device.