Get all WiFi connection profiles from NetworkManager (system-wide)
(self)
| 1089 | self.logger.critical("FAILSAFE: Executing reboot command") |
| 1090 | subprocess.run(['sudo', 'reboot'], timeout=5) |
| 1091 | |
| 1092 | except Exception as e: |
| 1093 | self.logger.error(f"Error during failsafe reboot: {e}") |
| 1094 | # Try alternative reboot method |
| 1095 | try: |
| 1096 | subprocess.run(['sudo', 'systemctl', 'reboot'], timeout=5) |
| 1097 | except: |
| 1098 | pass |
| 1099 | |
| 1100 | |
| 1101 | def _handle_ap_mode_monitoring(self, current_time): |
| 1102 | """Handle AP mode monitoring for endless loop with improved recovery""" |
| 1103 | if not self.ap_mode_active or not self.ap_mode_start_time: |
| 1104 | return |
| 1105 | # The wardriving phone-access AP (KEY1) is user-controlled and must not |
| 1106 | # be torn down by the endless loop's timeout / known-network recovery — |
| 1107 | # it stays up until the user presses KEY1 again. |
| 1108 | if getattr(self.shared_data, 'wardrive_ap_active', False): |
| 1109 | return |
| 1110 | |
| 1111 | ap_uptime = current_time - self.ap_mode_start_time |
| 1112 | |
| 1113 | # Check for client connections |
no test coverage detected