give me detailed overview how a single wifi scan is done in a selected point.
- User
give me detailed overview how a single wifi scan is done in a selected point.
- Assistant
The python-wifi-survey-heatmap repository allows users to perform Wi-Fi surveys by measuring network performance at specific points on a floorplan. Here's a detailed overview of how a single Wi-Fi scan is done at a selected point, based on the provided code.
1. User Interaction: Selecting a Point
-
Background UI Setup:
- The survey begins when the user clicks on a specific point on the floorplan using the graphical interface provided by the
FloorplanPanelclass inui.py. - The
onLeftUpevent handler gets triggered when the user clicks on the floorplan.
- The survey begins when the user clicks on a specific point on the floorplan using the graphical interface provided by the
-
Adding a Survey Point:
- The clicked point's (x, y) coordinates are calculated using the
get_xymethod, which scales the click position to match the resolution of the floorplan image. - A new
SurveyPointobject is created for this position and added to thesurvey_pointslist.
- The clicked point's (x, y) coordinates are calculated using the
-
Survey Point Validation:
- Before proceeding with the scan, the code validates the following:
- Connected to an Access Point (AP): The
Collector.check_associated()method verifies if the wireless interface is associated with an AP. If not, the scan is aborted. - Correct BSSID: If a BSSID is specified by the user, the
Collector.scanner.get_current_bssid()method is used to ensure the interface is connected to the expected AP.
- Connected to an Access Point (AP): The
- Before proceeding with the scan, the code validates the following:
2. Background Thread: Performing the Scan
Once validation is successful, the scan is performed in a background thread using the
WorkerThreadclass. This ensures the GUI remains responsive during the operation.Steps in the Wi-Fi Scan
-
Initialize Scan Progress:
- The newly created
SurveyPointobject’sprogressis updated to indicate the scan is in progress.
- The newly created
-
Run Performance Tests Using iPerf3:
- If an iPerf3 server is specified, the
Collector.run_iperf()method is used to run network performance tests:- Protocols: Both TCP and UDP are tested.
- If an iPerf3 server is specified, the
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.