qwf_wifi_SetHostapdOptions()

Set optional hostapd parameters for a Wi-Fi access point

Synopsis:

#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_SetHostapdOptions(qwf_Context_t *pCtx,
                             int channelNum,
                             qwf_wifi_VhtOperChanWidth_e vhtOperChWidth,
                             uint8_t vhtOperCenterFreqSeg0,
                             uint8_t vhtOperCenterFreqSeg1,
                             char *pCountryCode,
                             char *pHtCapabilities,
                             char *pVhtCapabilities);

Arguments:

pCtx
A pointer to the QWF service context created by qwf_Init()
channelNum
The channel number to use for this access point. The maximum value is 200. Set this value to QWF_WIFI_AUTO_AP_CHANNEL to let the Wi-Fi Manager service assign the channel number.
vhtOperChWidth
A qwf_wifi_VhtOperChanWidth_e constant indicating the VHT operating channel width
vhtOperCenterFreqSeg0
For a 20, 40, 80, or 160 MHz channel width, this value specifies the index of the channel center frequency. For an 80+80 MHz width, it specifies the center frequency index of segment 0, which is the segment that contains the primary channel. The valid range is 1 to 200. See the hostapd.conf file for a calculation of the center frequency using this index.
vhtOperCenterFreqSeg1
For a 20, 40, 80, or 160 MHz channel width, set this value to 0. For an 80+80 MHz width, this value specifies the center frequency index of segment 1, which is the segment that does not contain the primary channel. The valid range is 1 to 200. See the hostapd.conf file for a calculation of the center frequency using this index.
pCountryCode
A two-character string specifying the short country code. This can be NULL.
pHtCapabilities
A string specifying the HT capabilities. This string has a maximum length of 256 characters, and is formatted as specified in the hostapd.conf file (e.g., [HT40-][SHORT-GI-20][SHORT-GI-40]). This parameter can be NULL if HT capabilities aren't used.
pVhtCapabilities
A string specifying the VHT capabilities. This string has a maximum length of 256 characters, and is formatted as specified in the hostapd.conf file (e.g., [SHORT-GI-80][HTC-VHT]). This parameter can be NULL if VHT capabilities aren't used.

Library:

qwf_interface

Description:

This function sets optional parameters used by hostapd when the device is acting as an access point. This function may be called before starting or updating an access point with qwf_wifi_StartAccessPoint() or qwf_wifi_UpdateAccessPoint().

Note:

The hostapd parameter settings provided in the input arguments should be based on the sample hostapd.conf configuration file included in the wireless software package. You may refer to this sample file for further descriptions of these optional parameters.

Returns:

WIFI_OK Successful result

WIFI_ERR_PARAM pCtx is NULL, channelNum, vhtOperCenterFreqSeg0, or vhtOperCenterFreqSeg1 is greater than the maximum channel number, or pCountryCode, pHtCapabilities, or pVhtCapabilities is too long a string