<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DiggLife &#187; 无线网络</title>
	<atom:link href="http://www.digglife.cn/articles/tag/%e6%97%a0%e7%ba%bf%e7%bd%91%e7%bb%9c/feed" rel="self" type="application/rss+xml" />
	<link>http://www.digglife.cn</link>
	<description>有关网络和软件技巧</description>
	<lastBuildDate>Thu, 17 May 2012 12:28:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Android手机连接到LEAP企业无线网络</title>
		<link>http://www.digglife.cn/articles/android-leap.html</link>
		<comments>http://www.digglife.cn/articles/android-leap.html#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:11:40 +0000</pubDate>
		<dc:creator>摩摩诘</dc:creator>
				<category><![CDATA[掌上设备]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[LEAP]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[手机]]></category>
		<category><![CDATA[无线网络]]></category>

		<guid isPermaLink="false">http://www.digglife.cn/?p=3055</guid>
		<description><![CDATA[很多公司内部的无线网络会用到LEAP认证机制，需要通过输入用户名和密码来登陆到无线网络。Android虽然支持LEAP，但没有在图形界面中加入这一选项。要在Android设备上使用LEAP无线网络，有两种解决方案：手动修改无线配置文件；安装支持LEAP WiFi的第三方APP。]]></description>
			<content:encoded><![CDATA[<p>很多公司内部的无线网络会用到<a href="http://zh.wikipedia.org/zh/EAP">LEAP认证机制</a>，需要通过输入用户名和密码来登陆到无线网络。如果你使用的是iOS设备，系统只会会提示你输入用户名和密码，你完全可以不必理会和无限网络技术相关的任何东西，而很遗憾的是，如果你手头上是一个Android设备，当你选择公司WiFi的时候系统弹出框会有几个项目需要自行选择，其中并没有出现LEAP字样（会有PEAP，EAP-TLS等），所以即便输入了用户名和密码也无法登陆。</p>
<p>事实上，Android本身是支持LEAP的，只是没有在图形界面中加入这一选项。这个问题早在2009年初就有人<a href="http://code.google.com/p/android/issues/detail?id=1871">在Android的Google Project讨论区提出</a>，跟帖很多，但是似乎并没有引起Android团队足够的重视，据我所知，直到Android 2.3 LEAP依然没有加入到WiFi的设定选项里，原因不明。</p>
<p>解决方案有两个：</p>
<ol>
<li>手动修改wpa_supplicant配置文件，加入LEAP无线网络配置信息</li>
<li>安装第三方APP</li>
</ol>
<h4>方案一：手动修改wpa_supplicant配置文件，要 Root 权限</h4>
<p>Android将所有连接过的WiFi热点信息都保存在/data/misc/wifi/wpa_supplicant.conf这个配置文件下，包括SSID，加密方式，WiFi密码等等，所以我们只要手动加入LEAP无线网络的完整信息，然后重启WiFi，系统就会重新获取配置文件中的信息，我们就能够登入新加入的LEAP无线网络了。</p>
<p>网上有<a href="http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=wpa_supplicant/wpa_supplicant.conf">wpa_supplicant.conf的完整说明文件和范例</a>，大家可以参考。关于LEAP无线网络的范例如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">network</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #007800;">ssid</span>=“无限网络名称“
	<span style="color: #007800;">key_mgmt</span>=你的无线网络使用的加密方式
	<span style="color: #007800;">eap</span>=LEAP
	<span style="color: #007800;">identity</span>=“用户名“
	<span style="color: #007800;">password</span>=“密码“
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>关于key_mgmt，如果不设置，默认为最常见的WPA-PSK WPA-EAP。具体列表如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># key_mgmt: list of accepted authenticated key management protocols</span>
<span style="color: #666666; font-style: italic;"># WPA-PSK = WPA pre-shared key (this requires 'psk' field)</span>
<span style="color: #666666; font-style: italic;"># WPA-EAP = WPA using EAP authentication</span>
<span style="color: #666666; font-style: italic;"># IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically</span>
<span style="color: #666666; font-style: italic;">#	generated WEP keys</span>
<span style="color: #666666; font-style: italic;"># NONE = WPA is not used; plaintext or static WEP could be used</span>
<span style="color: #666666; font-style: italic;"># WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms</span>
<span style="color: #666666; font-style: italic;"># WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms</span>
<span style="color: #666666; font-style: italic;"># If not set, this defaults to: WPA-PSK WPA-EAP</span></pre></td></tr></table></div>

<p>所以，对于一个SSID为digglife，使用WPA-EAP加密的LEAP无线网络，我们以用户名momojie和密码123456登陆，可以写成下面这样：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">network</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #007800;">ssid</span>=“digglife“
	<span style="color: #007800;">key_mgmt</span>=WPA-EAP
	<span style="color: #007800;">eap</span>=LEAP
	<span style="color: #007800;">identity</span>=“momojie“
	<span style="color: #007800;">password</span>=“<span style="color: #000000;">123456</span>“
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>将以上几行添加到wpa_supplicant.conf文件中即可。至于修改方法，我想就不必赘述了，用惯终端（或命令提示符）+ADB interface的朋友应该很熟悉。不习惯命令行的利用Root Explorer修改也可以。</p>
<p>注意，如果你在本地修改后上传到手机端，注意最后修改一下文件的权限、文件Owner和Group，否则在机器重启之后，系统可能无法读写这个配置文件，导致WiFi会提示错误。原始文件的权限设定如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-rw-rw----</span>    <span style="color: #000000;">1</span> system   wifi           <span style="color: #000000;">444</span> Apr  <span style="color: #000000;">7</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">49</span> wpa_supplicant.conf</pre></td></tr></table></div>

<h4>方案二，安装第三方WiFi配置APP</h4>
<p>下面介绍的这些APP只是将以上步骤UI化了而已，原理都是一致的，另外也不需要Root权限。</p>
<ol>
<li><a href="https://market.android.com/details?id=com.sharkmob.FullWifi">Full WiFi</a></li>
<p>支持LEAP WiFi, PEAP, TKIP, CCMP等等，设定选项也很全面。</p>
<p><img title="full-wifi" src="http://www.digglife.cn/wp-content/uploads/2011/04/full-wifi.png" alt="支持配置 LEAP 无线网络的 Android 应用 Full WiFi" width="320" height="480" /></p>
<li><a href="https://market.android.com/details?id=com.oneguyinabasement.leapwifi">LEAP WiFi Free</a></li>
<p>只针对LEAP WiFi的Android App，设定简单，输入SSID、用户名和密码，保存之后就可以在系统的WiFi设置里连接了。</p>
<p><img title="leap-wifi-free" src="http://www.digglife.cn/wp-content/uploads/2011/04/leap-wifi-free.png" alt="支持 LEAP 无线网络的 Android 应用 LEAP WiFi Free" width="320" height="480" /></ol>
<p>如果你手机已经获得Root权限，我还是建议使用第一种方法，不安装APP就能解决，何乐而不为？</p>
Copyright &copy; 2007-2012<br /> <a href="http://www.digglife.cn" target="_blank">DiggLife</a> 有关网络和软件技巧 </small><h2  class="related_post_title">了解更多相关信息</h2><ul class="related_post"><li><a href="http://www.digglife.cn/articles/google-android-sdk.html" title="[视频+截图]Google发布Android SDK">[视频+截图]Google发布Android SDK</a></li><li><a href="http://www.digglife.cn/articles/mircosoft-patents-that-android-infrages.html" title="Android设备到底侵犯了微软的什么专利">Android设备到底侵犯了微软的什么专利</a></li><li><a href="http://www.digglife.cn/articles/google-search-engine-for-ringtones.html" title="Google将发布手机铃声搜索">Google将发布手机铃声搜索</a></li><li><a href="http://www.digglife.cn/articles/google-phone-come-to-europe.html" title="Google Phone终于降临欧洲">Google Phone终于降临欧洲</a></li><li><a href="http://www.digglife.cn/articles/enhance-mobile-phone-pics.html" title="如何提高手机照片的质量">如何提高手机照片的质量</a></li><li><a href="http://www.digglife.cn/articles/google-docs-templates.html" title="使用开放的模板创建Google文件">使用开放的模板创建Google文件</a></li><li><a href="http://www.digglife.cn/articles/adsense-referrals-retired.html" title="Adsense推介计划将在8月底暂停">Adsense推介计划将在8月底暂停</a></li><li><a href="http://www.digglife.cn/articles/add-google-toolbar-functions-firefox3.html" title="给Firefox 3添加Google Toolbar的功能">给Firefox 3添加Google Toolbar的功能</a></li><li><a href="http://www.digglife.cn/articles/you-are-not-japanese.html" title="Google翻译:你不是日本人">Google翻译:你不是日本人</a></li><li><a href="http://www.digglife.cn/articles/google-health-live.html" title="Google Health正式发布">Google Health正式发布</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.digglife.cn/articles/android-leap.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

