Panasonic PAN9520 Integration Manual page 19

Embedded wi-fi module
Hide thumbs Also See for PAN9520:
Table of Contents

Advertisement

PAN9520 Wi-Fi Module
Example 1 (US, Manual Policy)
If the module shall be e.g. only operated in the USA, the country code could be set accordingly
and the policy setting can be set to
cannot operate on prohibited channels in any case. A related application could be a product that
operates as AP and is sold in the US. Related example C code is given below.
#include
"exmpl_error_check.h"
#include
"esp_wifi.h"
esp_err_t error_code;
wifi_country_t
cc_us_manual
wifi_country_t* cc_us_manual_pt = &cc_us_manual;
error_code = wifi_set_country(cc_us_manual_pt);
check_error_code(error_code);
Example 2 (EU, Automatic Policy)
In this example, the country code is set to EU and channels "1" to "13" are enabled. The
maximum output power is limited to 16 dBm
is set to
WIFI_COUNTRY_POLICY_AUTO
and is sold in the EU. If the device is operated in a non-EU region, the country code will be
adapted to the one of local APs. If the device is not connected to any AP, active scans will be
only performed on channels "1" to "11". Channels "12" to "14" are scanned passively.
#include
"exmpl_error_check.h"
#include
"esp_wifi.h"
esp_err_t error_code;
wifi_country_t
cc_eu_auto
wifi_country_t* cc_eu_auto_pt
error_code = wifi_set_country(cc_eu_auto_pt);
check_error_code(error_code);
Further Readings
"Wi-Fi Country Code" general description:
jects/esp-idf/en/v4.2/esp32/api-guides/wifi.html#wi-fi-country-code
Function "esp_wifi_set_country":
idf/en/v4.2/esp32/api-reference/net-
work/esp_wifi.html#_CPPv420esp_wifi_set_countryPK14wifi_country_t
Data type "wifi_country_t":
idf/en/v4.2/esp32/api-reference/network/esp_wifi.html#_CPPv414wifi_coun-
try_t
Module Integration Guide Rev. 1.1
6 Regulatory and Certification Information
WIFI_COUNTRY_POLICY_MANUAL
= {{'U', 'S',
'
'}, 1, 11, 78, WIFI_COUNTRY_POLICY_MANUAL};
( 6.1.2 Limiting the Output
. This could be applicable for a product that acts as station
= {{'E', 'U',
'
'}, 1, 13, 64, WIFI_COUNTRY_POLICY_AUTO};
= &cc_eu_auto;
https://docs.espressif.com/projects/esp-
https://docs.espressif.com/projects/esp-
for ensuring that the device
Power) and the policy
https://docs.espressif.com/pro-
Page 19 of 44

Advertisement

Table of Contents
loading

Table of Contents