If you look into that github source code, you can see startAP
function and mainly rows with strM2MAPConfig.au8DHCPServerIP
:
uint8_t WiFiClass::startAP(const char *ssid, uint8_t u8SecType, const void *pvAuthInfo, uint8_t channel)
{
tstrM2MAPConfig strM2MAPConfig;
if (!_init) {
init();
}
if (channel == 0) {
channel = 1; // channel 1 is the minium channel
}
// Enter Access Point mode:
memset(&strM2MAPConfig, 0x00, sizeof(tstrM2MAPConfig));
strcpy((char *)&strM2MAPConfig.au8SSID, ssid);
strM2MAPConfig.u8ListenChannel = channel - 1;
strM2MAPConfig.u8SecType = u8SecType;
strM2MAPConfig.au8DHCPServerIP[0] = 0xC0; /* 192 */
strM2MAPConfig.au8DHCPServerIP[1] = 0xA8; /* 168 */
strM2MAPConfig.au8DHCPServerIP[2] = 0x01; /* 1 */
strM2MAPConfig.au8DHCPServerIP[3] = 0x01; /* 1 */
if (u8SecType == M2M_WIFI_SEC_WEP) {
tstrM2mWifiWepParams* wep_params = (tstrM2mWifiWepParams*)pvAuthInfo;
strM2MAPConfig.u8KeyIndx = wep_params->u8KeyIndx;
strM2MAPConfig.u8KeySz = wep_params->u8KeySz;
strcpy((char*)strM2MAPConfig.au8WepKey, (char *)wep_params->au8WepKey);
}
if (m2m_wifi_enable_ap(&strM2MAPConfig) < 0) {
_status = WL_CONNECT_FAILED;
return _status;
}
_status = WL_AP_LISTENING;
_mode = WL_AP_MODE;
memset(_ssid, 0, M2M_MAX_SSID_LEN);
memcpy(_ssid, ssid, strlen(ssid));
m2m_memcpy((uint8 *)&_localip, (uint8 *)&strM2MAPConfig.au8DHCPServerIP[0], 4);
_submask = 0x00FFFFFF;
_gateway = _localip;
// WiFi led ON (rev A then rev B).
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO15, 0);
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO4, 0);
return _status;
}