1.4.2 Wi-Fi System Service Configuration
The Wi-Fi System Service library should be configured through MHC(MPLAB Harmony Configurator). The following figure shows the MHC configuration window for configuring the Wi-Fi System Service and a brief description of various configuration options.
When user select the Wi-Fi System Service library, all the required dependencies are added automatically into the MHC configuration. In the Wi-Fi System Service library, user can select the operating device mode as station(STA) or access point(AP) and make a required changes in the selected mode.
Configuration Options:
Using MHC menu,user can select required device mode as a station(STA) or access point(AP).
Device Mode:
Indicates the device operation mode(STA/AP).
STA Mode:
SSID:
Access Point (AP/Router) SSID to connect.
Security type :
Indicates the security being used by the AP with which device should connect - OPEN / WPA2 / WPAWPA2 (Mixed)/ WPA3 / WPAWPA2 Enterprise / WPA2 Enterprise / WPA2WPA3 Enterprise / WPA3 Enterprise.
When User Select Enterprise TLS method, below configuration options are enable:
User Name : User name that has been added in the Radius Server
Username and Domainname : Provide EAP Identity info( username@domainname or domainname/username )
Server Domain Name SAN : Server domain name against which either server certificate's subject alternative name(SAN) or common name(CN) shall be matched for successful enterprise connection
Server Domain Name CN : Server domain name against which either server certificate's subject alternative name(SAN) or common name(CN) shall be matched for successful enterprise connection
Certificate Date : Enter a date between the date of certificate creation and date of expiration of certificate in UTC time format.
CA Certificate Format : Indicates the format of the CA Certificate that is used – PEM / DER
CA Certificate File Name : Indicates the name of the header file that has to be included which contains the CA Certificate in the form of a hex array and the size of the hex array.
CA Certificate Module Name : Indicates the name of the array within the header file.
Private Certificate Format : Indicates the format of the Private Certificate that is used – PEM / DER
Private Certificate File Name : Indicates the name of the header file that has to be included which contains the Private Certificate in the form of a hex array and the size of the hex array.
Private Certificate Module Name : Indicates the name of the array within the header file.
Private Key Format : Indicates the format of the Private Key that is used – PEM / DER
Private Key File Name : Indicates the name of the header file that has to be included which contains the Private Key in the form of a hex array and the size of the hex array.
Private Key Module Name : Indicates the name of the array within the header file.
- Make sure that the date provided is within the validity period of the certificate.
- Make sure that the header files provided are imported into the project to avoid compilation error of missing file.
- More information can be found in "WFI32 Enterprise Security Application Note" Salesforce knowledge base article.
When User Select Enterprise TTLS method, below configuration options are enable:
User Name : User name that has been added in the Radius Server
Username and Domainname : Provide EAP Identity info( username@domainname or domainname/username )
Server Domain Name SAN : Server domain name against which either server certificate's subject alternative name(SAN) or common name(CN) shall be matched for successful enterprise connection
Server Domain Name CN : Server domain name against which either server certificate's subject alternative name(SAN) or common name(CN) shall be matched for successful enterprise connection
Certificate Date : Enter a date between the date of certificate creation and date of expiration of certificate in UTC time format.
CA Certificate Format : Indicates the format of the CA Certificate that is used – PEM / DER
CA Certificate File Name : Indicates the name of the header file that has to be included which contains the CA Certificate in the form of a hex array and the size of the hex array.
CA Certificate Module Name : Indicates the name of the array within the header file.
TTLS Username : Indicates the MSCHAPV2 username
TTLS Password : Indicates the MSCHAPV2 password
Password:
Password to be used while connecting to the AP.
This is mandatory if security mode is set to anything other than OPEN.
It will be ignored if security mode is set to OPEN.
Auto Connect:
Indicate whether to auto connect to AP (enable) or wait for user input (disable).
AP Mode:
SSID:
Indicate AP mode SSID.
Security:
Indicate AP mode security:
- OPEN
- WPA2
- WPAWPA2(Mixed)
- WPA3
Password:
Indicate AP mode password(passphrase).
SSID Visibility:
Indicate AP mode SSID visibility.
Channel:
Indicate operating channel of AP mode.
Advanced configuration:
Country code:
Regulatory domain country code configuration:
- GEN - General
- USA - North America
- EMEA - Europe
- JPN - Japan
Number of Clients:
Indicates the maximum number of clients user can register.
Enable Wi-Fi Provisioning service:
Enables/Disables Wi-Fi Provisioning System Service functionality along with Wi-Fi System Service.
Enable Power Save:
Enables/Disables Power Save functionality.
Set PIC Power Save Mode:
XDS - Extreme Deep Sleep mode
DS - Deep Sleep Mode
SLEEP - Sleep Mode
DREAM - Dream Mode
IDLE - Idle mode
Set PIC Wi-Fi Correlation Mode:
SYNC - Synchronous mode
ASYNC - Asynchronous mode
Set PIC Wi-Fi Power Save Mode:
RUN - Wi-Fi Subsystem in Run Mode
WSM - Wi-Fi Subsystem in Wi-Fi Sleep Mode(WSM)
WDS - Wi-Fi Subsystem in Wi-Fi Deep Sleep Mode(WDS)
WOFF - Wi-Fi Subsystem in Wi-Fi Power off Mode(WOFF)
Set PIC Wi-Fi Power Save Mode:
RUN - Wi-Fi Subsystem in Run Mode
WSM - Wi-Fi Subsystem in Wi-Fi Sleep Mode(WSM)
WDS - Wi-Fi Subsystem in Wi-Fi Deep Sleep Mode(WDS)
WOFF - Wi-Fi Subsystem in Wi-Fi Power off Mode(WOFF)
Set PIC Wi-Fi Wakeup Source:
LISTEN INTERVAL - Wi-Fi Listern interval
Set Wi-Fi Listen Interval:
Set Wi-Fi Listen Interval Value
Set Wi-Fi Sleep Inactivity Threshould/Limit Value:
Set Wi-Fi Sleep Inactivity when Wi-Fi Subsystem should wakeup.It can same as Association timeout.
DTIM - Enable Delivery Traffic Indication Message (DTIM) Wakeup
- More details of the Low Power Mode is available in the Datasheet.
- The Wi-Fi System Service library only generate code, which needed before Wi-Fi connection.Please check low power "Paho MQTT Client Power Save" application for complete implemetation.
- The WSM/WDS is Connected Sleep mode.
Enable Wi-Fi Scanning:
Enables/Disables Wi-Fi Scan functionality of Wi-Fi System Service.
Channel Number:
Values of Scan Channel Number:
0 - scan all the channels
1 to 13 - - scan on specified channel
Scan Mode:
ACTIVE : Requst Active Scan
PASSIVE : Request Passive Scan
SSID List(Active Scan Only):
User preferred SSIDs list for scanning.
Maximum 4 SSIDs of maximum 32 characters allowed.
e.g. DEMO_AP1,DEMO_AP2,DEMO_AP3,DEMO_AP4).
This field is only applicable for Active Scan.
SSID List Delimiter character:
Delimiter used for separating names in the "SSID List(Active Scan Only)" field.
Bitwise Channel Scan Mask:
- 0x3fff : All 2.4GHZ channels
- 0x07ff : 2.4GHz channels 1 through 11 (USA)
- 0x1fff : 2.4GHz channels 1 through 13 (Europe)
- 0x3fff : 2.4GHz channels 1 through 14(Asia)
- 0x0001 : 2.4GHz (2412 MHz) channel 1
- 0x0002 : 2.4GHz (2412 MHz) channel 2
- User can find more details of mask value in the WDRV_PIC32MZW_CHANNEL24_MASK
Number Of Slots:
The number of scan slots per channel.
Active Slot Time:
Time(in milliseconds) spent on each active channel to send the probe requests to find near by BSS's.
Passive Slot Time:
Time(in milliseconds) spent on each passive channel listening for beacons.
Number Of Probes:
Number of probe requests to be sent for each scan slot when "SSID List" field is empty.
Number of probe requests to be sent for each ssid to scan in each scan slot when preferred "SSID List" is configured.
This field is only applicable for Active Scan.
Scan Match Mode:
FIND_ALL: Scan for all matches
STOP_ON_FIRST : Stop scan on first match
IP Type:
IPv4 ONLY : Enable IPv4 support
IPv4 & IPv6 : Enable both IPv4 & IPv6 support
Enable Debug Logs:
Enables/Disables Wi-Fi and Wi-Fi Provisioning System Service flows and levels.
Note: In case the user enables debug logs, user needs to manually add the 'App Debug Service' component from Wireless-> System Service-> App Debug Service.
Enabling Wi-Fi System Service
All of the required files are automatically added into the MPLAB X IDE project by the MHC when the library is selected for use.