Start the Wi-Fi management system with endless loop behavior
(self)
| 463 | self.shared_data.config['wifi_known_networks'] = self.known_networks |
| 464 | self.shared_data.config['wifi_ap_ssid'] = self.ap_ssid |
| 465 | self.shared_data.config['wifi_ap_password'] = self.ap_password |
| 466 | self.shared_data.config['wifi_connection_timeout'] = self.connection_timeout |
| 467 | self.shared_data.config['wifi_max_attempts'] = self.max_connection_attempts |
| 468 | |
| 469 | self.shared_data.save_config() |
| 470 | self.logger.info("Wi-Fi configuration saved") |
| 471 | |
| 472 | except Exception as e: |
| 473 | self.logger.error(f"Error saving Wi-Fi config: {e}") |
| 474 | |
| 475 | def setup_ap_logger(self): |
| 476 | """Setup dedicated logger for AP mode operations""" |
| 477 | try: |
| 478 | # Create a dedicated logger for AP mode |
| 479 | self.ap_logger = logging.getLogger('WiFiManager_AP') |
| 480 | self.ap_logger.setLevel(logging.DEBUG) |
| 481 | |
| 482 | # Remove existing handlers to avoid duplication |
| 483 | for handler in self.ap_logger.handlers[:]: |
| 484 | self.ap_logger.removeHandler(handler) |
| 485 | |
| 486 | # Create file handler for /var/log/ap.log |
| 487 | try: |
no test coverage detected