2018-12-21 10:30:07

by Kurt Van Dijck

[permalink] [raw]
Subject: question concerning Japan regulation and NO-OUTDOOR

Hey all,

I work on a project for an outdoor device equipped with a Ralink wifi
key. In order to get certified in Japan, we should be able to proof that
the device is not using the 5.2GHz bands since this band is limited to
indoor use only in Japan.
As I understood, 5.4GHz and up are allowed.

My first, rather rough, approach is to specify all 2.4GHz bands in
wpa_supplicant's global 'freq_list' parameter.
We found that our device still connect to 5GHz networks, I believe
because passive scanning allows 5GHz networks to be detected anyway.

2nd attempt, on top of the 1st, is to patch wpa_supplicant with:

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 37d429d..c32aa1a 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1223,6 +1223,13 @@ struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
continue;
}

+ if (!freq_allowed(wpa_s->conf->freq_list, bss->freq)) {
+ wpa_msg(wpa_s, MSG_INFO,
+ "frequency %u excluded", bss->freq);
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " skip - avoid this frequency");
+ continue;
+ }
if (!freq_allowed(ssid->freq_list, bss->freq)) {
if (debug_print)
wpa_dbg(wpa_s, MSG_DEBUG,

In short, this enforces wpa_supplicant to honor the global freq_list
parameter for joining accesspoints, as it does for per-network
freq_lists.

Is this sufficient to avoid our chip to send on 5GHz band?

I also noticed some NO-OUTDOOR specifiers in the wireless regdb,
but not on the 5.2GHz bands for Japan.
I'm in the position to find out those details, and I'm willing to amend
in the upstream repository.
I do not yet see however how I can tell the kernel that it should limit
wifi regulation to outdoor use only. There seems no simple 'iw reg set
outdoor' or similar command. How is this done?

Thanks for your responses in advance,
Kurt


2018-12-21 20:24:16

by Marcin Sielski

[permalink] [raw]
Subject: Re: question concerning Japan regulation and NO-OUTDOOR

Hi,

I think indoor/outdoor hint is currently only set by hostapd (see
phy_info_freq function at driver_nl80211_capa.c).
The entire implementation is based on US FCC regulations which allows
passive scanning.
https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
I am curious how it is defined in EU RED.

Best Regards

Marcin Sielski

pt., 21 gru 2018 o 17:25 Kurt Van Dijck
<[email protected]> napisaƂ(a):
>
> Hey all,
>
> I work on a project for an outdoor device equipped with a Ralink wifi
> key. In order to get certified in Japan, we should be able to proof that
> the device is not using the 5.2GHz bands since this band is limited to
> indoor use only in Japan.
> As I understood, 5.4GHz and up are allowed.
>
> My first, rather rough, approach is to specify all 2.4GHz bands in
> wpa_supplicant's global 'freq_list' parameter.
> We found that our device still connect to 5GHz networks, I believe
> because passive scanning allows 5GHz networks to be detected anyway.
>
> 2nd attempt, on top of the 1st, is to patch wpa_supplicant with:
>
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> index 37d429d..c32aa1a 100644
> --- a/wpa_supplicant/events.c
> +++ b/wpa_supplicant/events.c
> @@ -1223,6 +1223,13 @@ struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
> continue;
> }
>
> + if (!freq_allowed(wpa_s->conf->freq_list, bss->freq)) {
> + wpa_msg(wpa_s, MSG_INFO,
> + "frequency %u excluded", bss->freq);
> + wpa_dbg(wpa_s, MSG_DEBUG,
> + " skip - avoid this frequency");
> + continue;
> + }
> if (!freq_allowed(ssid->freq_list, bss->freq)) {
> if (debug_print)
> wpa_dbg(wpa_s, MSG_DEBUG,
>
> In short, this enforces wpa_supplicant to honor the global freq_list
> parameter for joining accesspoints, as it does for per-network
> freq_lists.
>
> Is this sufficient to avoid our chip to send on 5GHz band?
>
> I also noticed some NO-OUTDOOR specifiers in the wireless regdb,
> but not on the 5.2GHz bands for Japan.
> I'm in the position to find out those details, and I'm willing to amend
> in the upstream repository.
> I do not yet see however how I can tell the kernel that it should limit
> wifi regulation to outdoor use only. There seems no simple 'iw reg set
> outdoor' or similar command. How is this done?
>
> Thanks for your responses in advance,
> Kurt