- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I would like to choose the best WiFi (2.4GHz) channel for my application, which acts as AP.
Unfortunately I'm getting an error when calling wiced_wifi_find_best_channel():
wiced_res = wiced_wifi_find_best_channel(WICED_802_11_BAND_2_4GHZ,
&channel,
&cca_score);
wwd_wifi_get_cca_for_channel: send_iovar req_buf FAIL 2023 chan 1
2023 is standing for Unsupported functionality, I guess.
I've tried also get channel number in STA, and WiFi disabled state -> but the result was exactly the same.
Questions:
1. Any additional steps should be taken to find suitable for communication channel?
2. Is there any possibility of enabling Autochannel Selection in SDK for 43903 chip?
3. Is there any other way to retrieve WiFi channel quality on this chip?
I would be grateful if somebody could help me to deal with this matter.
Solved! Go to Solution.
- Labels:
-
softAP
-
Wifi+Bluetooth
-
Wireless MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This particular API was intended for Apollo specific use-case and valid only for 90x based platform with APOLLO firmware. Hence, this API will be deprecated from WICED Studio 6.2 to avoid further confusion. To check the best channel, wl cca_get_stats can still be used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use wl cca_get_stats command to check the current channel information (wl cca_get_stats -c 0 -s 60 -i). Meanwhile, I am looking into the fact why this API is not working as expected (basically the IOVAR call in this case) or is there any other way to make the channel selection automatic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your message...
wl cca_get_stats works for me (I've already checked it) - here's an example output:
> wl cca_get_stats -c 0
Summaries:
chan dur ibss obss interf num seconds
1 40 5% Low 12% Medium 0% Low 1
2 40 5% Low 5% Low 0% Low 1
3 40 5% Low 0% Low 0% Low 1
4 41 4% Low 0% Low 2% Low 1
5 43 2% Low 44% High 13% High 1
6 44 4% Low 34% High 29% High 1
7 40 0% Low 17% Medium 52% High 1
8 39 5% Low 7% Low 5% Medium 1
9 41 4% Low 0% Low 4% Low 1
10 41 4% Low 0% Low 0% Low 1
11 40 5% Low 20% Medium 0% Low 1
12 41 4% Low 9% Low 0% Low 1
13 41 4% Low 0% Low 2% Low 1
Recommended channel: 3
I think that API's wiced_wifi_find_best_channel() relates to whole set of radio measurement (Basic, CCA and RPI), which maybe aren't completely supported by platform.
I'm wondering how to get CCA measurement (let's say manually), because fragment of my code returns an error on iovar sending... Structures format got from wltool's source code.
typedef struct {
uint32_t duration; /* millisecs spent sampling this channel */
uint32_t congest_ibss; /* millisecs in our bss (presumably this traffic will */
/* move if cur bss moves channels) */
uint32_t congest_obss; /* traffic not in our bss */
uint32_t interference; /* millisecs detecting a non 802.11 interferer. */
uint32_t timestamp; /* second timestamp */
} cca_congest_t;
typedef struct {
chanspec_t chanspec; /* Which channel? */
uint8_t num_secs; /* How many secs worth of data */
cca_congest_t secs[1]; /* Data */
} cca_congest_channel_req_t;
static int get_cca_cmd(int argc, char *argv[])
{
wiced_result_t wiced_res;
wiced_buffer_t buffer;
wiced_buffer_t response;
cca_congest_channel_req_t* data = (cca_congest_channel_req_t*)
wwd_sdpcm_get_iovar_buffer(&buffer,
sizeof(cca_congest_channel_req_t),
"cca_get_stats");
if (!data) {
return -1;
}
wiced_res = wwd_sdpcm_send_iovar(SDPCM_GET, buffer, &response, WWD_STA_INTERFACE);
if (wiced_res != WICED_SUCCESS) {
return -2;
}
data = (cca_congest_channel_req_t*)host_buffer_get_current_piece_data_pointer(response);
printf("Channel number: %d\n", (*data).chanspec);
printf("Sampling duration: %"PRIu32"\n", (*data).secs[0].duration);
host_buffer_release(response, WWD_NETWORK_RX);
return 0;
}
rroy - just one more idea came to my mind:
In wwd_wifi.c I saw a comment:
"Some firmware, e.g. for 4390, does not support the join IOVAR, so use the older IOCTL call instead"
Do you think that could be a similar case with channel measurement and 43903 chip?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have mentioned cca_get_stats as an IOVAR which is not the case (Check 43xxx_Wi-Fi/WICED/WWD/include/wwd_wlioctl.h), hence you are getting that error. Meanwhile, I have asked internally if there is any other way to measure the cca score through APIs (as the wl counter-part works properly) because of the IOVAR (rm_req) call failure in wiced_wifi_find_best_channel() for 43903.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not 43903 specific problem.
You can try calling wiced_wifi_find_best_channel() on other platforms. The same 2023 error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This particular API was intended for Apollo specific use-case and valid only for 90x based platform with APOLLO firmware. Hence, this API will be deprecated from WICED Studio 6.2 to avoid further confusion. To check the best channel, wl cca_get_stats can still be used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raktim Roy wrote:
This particular API was intended for Apollo specific use-case and valid only for 90x based platform with APOLLO firmware. Hence, this API will be deprecated from WICED Studio 6.2 to avoid further confusion. To check the best channel, wl cca_get_stats can still be used
I have no idea why this is for Apollo specific use-case.
All wifi platforms can get benefit by this API to choose the best WIFI channel.
Don't force people to use "wl cca_get_stats". Not everyone uses wl commands.