I have a HTTP Web Server that handles the WiFi Provisioning among some other system setups. It works in both the AP Mode and Station Mode. To activate the AP Mode, I do:
strcpy((char *)apConfig.au8SSID, SSID); apConfig.u8SsidHide = SSID_MODE_VISIBLE; apConfig.u8ListenChannel = M2M_WIFI_CH_1; apConfig.u8SecType = M2M_WIFI_SEC_OPEN; apConfig.au8DHCPServerIP = 192; apConfig.au8DHCPServerIP = 168; apConfig.au8DHCPServerIP = 1; apConfig.au8DHCPServerIP = 3; /* Start AP Mode */ ret = m2m_wifi_enable_ap(&apConfig);
So everything is good. Out of curiosity, I change the m2m_wifi_enable_ap() call to:
ret = m2m_wifi_start_provision_mode(&apConfig, "wificonfig.net", true);
which, according to the API, should activate the internal WiFi HTTP Provision Web Server with HTTP Redirection. However, what I am experiencing is that once "wificonfig.net" is typed into a browser, my own web server's home page pops up. This HTTP redirect is a very nice feature that I was looking for. On the other hand, I am concerned because this seems to suggest I have two competing web servers running, one is my own and one is the internal WINC version. Would this become a problem? I know what I really need is to enable the HTTP Redirect without enabling the internal HTTP Web Server. What the HTTP Redirect does, I think, is to run a DNS server inside the WINC, that answers every DNS query with 192.168.13. I haven't seen any problem yet but I am afraid I may have created one. Any thoughts?