前言
路由器,认证服务器,手持无线终端。当通过手持无线设备连接到需要认证的WiFi上,会自动弹出窗口,何解?为什么有的时候就不弹出窗口呢?怎么给商家一个合理的解释呢?
验证问题
通过在路由器上抓包来看弹出窗口的时候都发生了什么? 抓包方法如下http://blog.csdn.net/qianguozheng/article/details/32108093
当弹出认证窗口的时候都发生了什么?
当没有弹出认证窗口的时候,没有弹出认证窗口。
原理剖析
- Register for Captive Network Support
- A captive network is a Wi-Fi network that doesn’t provide Internet access until the user performs some
- action, such as logging in, specifying payment, or agreeing to terms and conditions. Captive networks
- common in public areas, such as airports and hotels.
- When a user joins a captive network, Captive Network Support typically provides a web sheet that allows
- the user to authenticate with the network. If your application registers the SSID of the captive network,
- however, the web sheet is suppressed, and the user can complete authentication in your application.
- For more information, read CaptiveNetwork Reference
- Overview
- The CaptiveNetwork programming interface allows an application to interact with Captive Network Support,
- the system component responsible for detecting networks that require user interaction before providing
- internet access. These networks are most commonly WiFi hotspots in public locations such as airports
- and hotels.
- By calling the CNSetSupportedSSIDs function, an application can register a list of wireless network
- SSIDs with Captive Network Support, thereby assuming responsibility for authenticating with those
- networks. Typically when a user joins a captive network, Captive Network Support provides a web
- sheet that allows the user to authenticate with the network. If an application has registered the
- SSID of the captive network, however, the web sheet is suppressed, and the user can complete
- authentication in the appropriate application.
- After a user performs authentication in the application that registered the SSID, the application
- should inform Captive Network Support of the result of the authentication with either the
- CNMarkPortalOnline function or the CNMarkPortalOffline function