Skip to content

103 optimize channel and bandwidth of wireless network#104

Merged
cbicari merged 7 commits into
mainfrom
103-optimize-channel-and-bandwidth-of-wireless-network
Mar 9, 2026
Merged

103 optimize channel and bandwidth of wireless network#104
cbicari merged 7 commits into
mainfrom
103-optimize-channel-and-bandwidth-of-wireless-network

Conversation

@cbicari

@cbicari cbicari commented Mar 9, 2026

Copy link
Copy Markdown
Member

modded Puara so Default mode is now 20MHz.

Added API to set power threshold for broadcast, set and get wifi channels.
must be tested -- will most probably update the basic template to reflect these possibilities rather than random values in settings.json.

@cbicari cbicari linked an issue Mar 9, 2026 that may be closed by this pull request

@edumeneses edumeneses left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@cbicari

cbicari commented Mar 9, 2026

Copy link
Copy Markdown
Member Author

ok so all functions are good and tested with following approaches :

Can be done anytime during runtime :
get_wifi_channels()
std::cout << "WiFi channel: " << static_cast(puara.get_wifi_channels()) << std::endl;

set_wifi_tx_power(wifi_power_threshold)
void onSettingsChanged() {
wifi_power_threshold = static_cast<int8_t>(puara.getVarNumber("WiFi_power_threshold"));
puara.set_wifi_tx_power(wifi_power_threshold);
}


Can only be done during setup as in [SAT mode cant do during connecting/scanning] and [softAP mode can't change if some STAs are connected] so setup triggered function won't work. ::
set_wifi_channels(wifi_channel_primary)

wifi_channel_primary = static_cast<int8_t>(puara.getVarNumber("Wifi_Channel_primary"));
puara.set_wifi_channels(wifi_channel_primary);

@cbicari

cbicari commented Mar 9, 2026

Copy link
Copy Markdown
Member Author

We can now set/get channel and Tx power.
However channel can only be done during setup() routine and not in STA mode, and in AP mode only when no one else is connected..

@cbicari
cbicari merged commit 8e03aae into main Mar 9, 2026
66 checks passed
@cbicari
cbicari deleted the 103-optimize-channel-and-bandwidth-of-wireless-network branch March 9, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize channel and bandwidth of wireless network.

2 participants