Skip to content

Commit

Permalink
Implement the missing profiles
Browse files Browse the repository at this point in the history
Mainly for scan_type and dwell times.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Dec 13, 2024
1 parent 4d68b1c commit 3b7c749
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions samples/scan_bm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ config WIFI_SCAN_DWELL_TIME_PASSIVE
help
Passive scan dwell time (in ms) per channel.

config WIFI_SCAN_TYPE_ACTIVE
bool "Active scan"
help
Enable this profile to do active scan where allowed.

config WIFI_SCAN_TYPE_PASSIVE
bool "Passive scan"
help
Enable this profile to do passive scan on all channels.

choice
prompt "Choose a WiFi Scan Profile"

Expand All @@ -76,31 +86,37 @@ config WIFI_SCAN_PROFILE_DEFAULT

config WIFI_SCAN_PROFILE_ACTIVE
bool "Active scan"
select WIFI_SCAN_TYPE_ACTIVE
help
Enable this profile to do active scan where allowed.

config WIFI_SCAN_PROFILE_PASSIVE
bool "Passive scan"
select WIFI_SCAN_TYPE_PASSIVE
help
Enable this profile to do passive scan on all channels.

config WIFI_SCAN_PROFILE_2_4GHz_ACTIVE
bool "Scan in the 2.4 GHz band using active scan"
select WIFI_SCAN_TYPE_ACTIVE
help
Enable this profile to scan in the 2.4 GHz band using active scanning where allowed.

config WIFI_SCAN_PROFILE_2_4GHz_PASSIVE
bool "Scan in the 2.4 GHz band using passive scan"
select WIFI_SCAN_TYPE_PASSIVE
help
Enable this profile to scan in the 2.4 GHz band using passive scanning on all channels.

config WIFI_SCAN_PROFILE_5GHz_ACTIVE
bool "Scan in the 5 GHz band using active scan"
select WIFI_SCAN_TYPE_ACTIVE
help
Enable this profile to scan in the 5 GHz band using active scanning where allowed.

config WIFI_SCAN_PROFILE_5GHz_PASSIVE
bool "Scan in the 5 GHz band using passive scan"
select WIFI_SCAN_TYPE_PASSIVE
help
Enable this profile to scan in the 5 GHz band using passive scanning on all channels.

Expand Down
9 changes: 9 additions & 0 deletions samples/scan_bm/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ static int prepare_scan_params(struct nrf70_scan_params *params)
}
}

params->dwell_time_passive = CONFIG_WIFI_SCAN_DWELL_TIME_PASSIVE;
params->dwell_time_active = CONFIG_WIFI_SCAN_DWELL_TIME_ACTIVE;

if (IS_ENABLED(CONFIG_WIFI_SCAN_TYPE_PASSIVE)) {
params->scan_type = NRF70_SCAN_TYPE_PASSIVE;
} else{
params->scan_type = NRF70_SCAN_TYPE_ACTIVE;
}

return 0;
}

Expand Down

0 comments on commit 3b7c749

Please sign in to comment.