57 200: self.tr("beacon timeout"), |
57 200: self.tr("beacon timeout"), |
58 201: self.tr("no matching access point found"), |
58 201: self.tr("no matching access point found"), |
59 202: self.tr("authentication failed"), |
59 202: self.tr("authentication failed"), |
60 203: self.tr("association failed"), |
60 203: self.tr("association failed"), |
61 204: self.tr("handshake timeout"), |
61 204: self.tr("handshake timeout"), |
|
62 210: self.tr("no access point with compatible security found"), |
|
63 211: self.tr("no access point with suitable authentication mode found"), |
|
64 212: self.tr("no access point with sufficient RSSI found"), |
62 1000: self.tr("idle"), |
65 1000: self.tr("idle"), |
63 1001: self.tr("connecting"), |
66 1001: self.tr("connecting"), |
64 1010: self.tr("connected"), |
67 1010: self.tr("connected"), |
65 } |
68 } |
66 self.__securityTranslations = { |
69 self.__securityTranslations = { |
218 self.tr("Show Flash ID"), self.__showFlashID |
221 self.tr("Show Flash ID"), self.__showFlashID |
219 ) |
222 ) |
220 self.__macAddressAct = self.__espMenu.addAction( |
223 self.__macAddressAct = self.__espMenu.addAction( |
221 self.tr("Show MAC Address"), self.__showMACAddress |
224 self.tr("Show MAC Address"), self.__showMACAddress |
222 ) |
225 ) |
|
226 self.__securityInfoAct = self.__espMenu.addAction( |
|
227 self.tr("Show Security Information"), self.__showSecurityInfo |
|
228 ) |
223 self.__espMenu.addSeparator() |
229 self.__espMenu.addSeparator() |
224 self.__resetAct = self.__espMenu.addAction( |
230 self.__resetAct = self.__espMenu.addAction( |
225 self.tr("Reset Device"), self.__resetDevice |
231 self.tr("Reset Device"), self.__resetDevice |
226 ) |
232 ) |
227 self.__espMenu.addSeparator() |
233 self.__espMenu.addSeparator() |
244 self.__backupAct.setEnabled(not linkConnected) |
250 self.__backupAct.setEnabled(not linkConnected) |
245 self.__restoreAct.setEnabled(not linkConnected) |
251 self.__restoreAct.setEnabled(not linkConnected) |
246 self.__chipIdAct.setEnabled(not linkConnected) |
252 self.__chipIdAct.setEnabled(not linkConnected) |
247 self.__flashIdAct.setEnabled(not linkConnected) |
253 self.__flashIdAct.setEnabled(not linkConnected) |
248 self.__macAddressAct.setEnabled(not linkConnected) |
254 self.__macAddressAct.setEnabled(not linkConnected) |
|
255 self.__securityInfoAct.setEnabled(not linkConnected) |
249 self.__resetAct.setEnabled(connected or not linkConnected) |
256 self.__resetAct.setEnabled(connected or not linkConnected) |
250 |
257 |
251 menu.addMenu(self.__espMenu) |
258 menu.addMenu(self.__espMenu) |
252 |
259 |
253 def hasFlashMenuEntry(self): |
260 def hasFlashMenuEntry(self): |
520 res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) |
527 res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) |
521 if res: |
528 if res: |
522 dlg.exec() |
529 dlg.exec() |
523 |
530 |
524 @pyqtSlot() |
531 @pyqtSlot() |
|
532 def __showSecurityInfo(self): |
|
533 """ |
|
534 Private slot to show some security related information of the ESP chip. |
|
535 """ |
|
536 args = [ |
|
537 "-u", |
|
538 "-m", |
|
539 "esptool", |
|
540 "--port", |
|
541 self.microPython.getCurrentPort(), |
|
542 "get_security_info", |
|
543 ] |
|
544 dlg = EricProcessDialog( |
|
545 self.tr("'esptool get_security_info' Output"), |
|
546 self.tr("Show Security Information"), |
|
547 monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), |
|
548 encoding=Preferences.getSystem("IOEncoding"), |
|
549 parent=self.microPython, |
|
550 ) |
|
551 res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) |
|
552 if res: |
|
553 dlg.exec() |
|
554 |
|
555 @pyqtSlot() |
525 def __resetDevice(self): |
556 def __resetDevice(self): |
526 """ |
557 """ |
527 Private slot to reset the connected device. |
558 Private slot to reset the connected device. |
528 """ |
559 """ |
529 if self.microPython.isConnected() and not self.hasCircuitPython(): |
560 if self.microPython.isConnected() and not self.hasCircuitPython(): |