openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

system/ui: fix authentication callback and connection tracking

Open deanlee opened this issue 6 months ago • 0 comments
trafficstars

Fixes critical bugs in the WiFi manager that were causing connection failures and missing password prompts:

  1. Fixed authentication callback issues: incorrectly using non-existent variables causing runtime exceptions:

    def _on_need_auth(self):
      match self.state:
        case StateConnecting(network):  # This throws NameError: name 'network' is not defined
          self.state = StateNeedsAuth(network)
    
  2. Improved connection state tracking:

    • Added _current_connection_ssid to track active connection attempts
    • Implemented proper cleanup when connections succeed or fail
  3. Enhanced error handling:

    • Added fallback methods to identify networks needing authentication

These changes ensure authentication prompts appear reliably and WiFi connections establish correctly.

deanlee avatar May 10 '25 13:05 deanlee