Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: wifi: shell: only process scan events during requested scan #84546

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EricNRS
Copy link
Contributor

@EricNRS EricNRS commented Jan 25, 2025

The scan events are always enabled which means if another software component requests a scan, then the WiFi shell scan printouts will also be sent to the shell. This change only enables the network management scan events when a user has requested a scan.

Without the change when my application does a scan to find the best channel:

uart> config wifi_channel
Scanning for best channels
SSID IoT, Channel 11, RSSI -46 dBm
SSID IoT, Channel 11, RSSI -63 dBm
SSID IoT, Channel 6, RSSI -77 dBm
SSID IoT, Channel 1, RSSI -81 dBm
Scan completed
Best Channel: 11, Max RSSI: -46 dBm

# These are printed from the WiFi Shell even though it wasn't requested:
Num  | SSID                             (len) | Chan (Band)   | RSSI | Security        | BSSID             | MFP     
1    | IoT                              3     | 11   (2.4GHz) | -46  | WPA2-PSK        | -------------------- | Disable 
2    | IoT                              3     | 11   (2.4GHz) | -63  | WPA2-PSK        | --------------------  | Disable 
3    | IoT                              3     | 6    (2.4GHz) | -77  | WPA2-PSK        | --------------------  | Disable 
4    | IoT                              3     | 1    (2.4GHz) | -81  | WPA2-PSK        | --------------------  | Disable 
Scan request done

The scan events are always enabled which means if another software
component requests a scan, then the WiFi shell scan printouts will
also be sent to the shell.

Only enable the network management scan events when a user has
requested a scan.

Signed-off-by: Eric Holmberg <[email protected]>
@EricNRS
Copy link
Contributor Author

EricNRS commented Jan 25, 2025

The change is ready to merge, but marking as a draft since I have not discussed it with anyone yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants