MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _cleanup_ap_mode

Method _cleanup_ap_mode

wifi_manager.py:2854–2869  ·  view source on GitHub ↗

Full cleanup of AP mode

(self)

Source from the content-addressed store, hash-verified

2852 if not captive:
2853 config_type = "accessory AP (no gateway/DNS — clients keep their own internet)"
2854 else:
2855 config_type = "with captive portal DNS" if dns_enabled else "DHCP-only (no DNS conflicts)"
2856 self.logger.info(f"Created dnsmasq configuration {config_type}")
2857 self.ap_logger.info(f"Created dnsmasq configuration at /tmp/ragnar/dnsmasq.conf ({config_type})")
2858 self.ap_logger.debug(f"Dnsmasq config content:\n{config_content}")
2859 return True
2860
2861 except Exception as e:
2862 self.logger.error(f"Error creating dnsmasq config: {e}")
2863 self.ap_logger.error(f"Error creating dnsmasq config: {e}")
2864 return False
2865
2866 def _configure_ap_interface(self):
2867 """Configure network interface for AP mode"""
2868 try:
2869 self.ap_logger.info(f"Configuring interface {self.ap_interface} for AP mode")
2870
2871 # Stop NetworkManager from managing the interface
2872 self.ap_logger.debug("Setting NetworkManager to not manage interface")

Callers 1

start_ap_modeMethod · 0.95

Calls 3

_stop_ap_servicesMethod · 0.95
_cleanup_ap_interfaceMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected