blob: 52f4eddf87d027f074422dee0f7f083da03d1b1f [file] [log] [blame]
<html devsite><head>
<meta name="book_path" value="/_book.yaml"/>
<meta name="project_path" value="/_project.yaml"/>
</head>
<body>
<!--
Copyright 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<h1 id="carrier_wi_fi" class="page-title">运营商 WLAN</h1>
<p>运营商 WLAN 是 Android 9 中引入的一项功能,该功能可让设备自动连接到运营商实现的 WLAN 网络。在高度拥塞或信号覆盖范围较小的区域(如体育场或地铁站),运营商 WLAN 可用于改善用户的连接体验和分载流量。</p>
<h2 id="implementation">实现</h2>
<p>要实现运营商 WLAN,设备制造商和运营商必须执行以下操作。</p>
<h3 id="manufacturers">制造商</h3>
<p>在运营商配置管理器中,为每个运营商配置以下参数:</p>
<ul>
<li><a href="https://android.googlesource.com/platform/frameworks/base/+/master/telephony/java/android/telephony/CarrierConfigManager.java#1542">KEY_CARRIER_WIFI_STRING_ARRAY</a>:以 Base64 编码的 WLAN SSID。</li>
<li><a href="https://android.googlesource.com/platform/frameworks/base/+/master/telephony/java/android/telephony/CarrierConfigManager.java#1746">IMSI_KEY_AVAILABILITY_INT</a>:标识用于 IMSI 加密的密钥适用于 WLAN 还是 EPDG,或两者都适用。</li>
<li><a href="https://android.googlesource.com/platform/frameworks/base/+/master/telephony/java/android/telephony/CarrierConfigManager.java#1739">IMSI_KEY_DOWNLOAD_URL_STRING</a>:从中下载 proto(包含用于 IMSI 加密的运营商公钥)的网址。</li>
</ul>
<h3 id="carriers">运营商</h3>
<p>要实现运营商 WLAN,运营商必须支持加密的 IMSI 并提供一个公钥。</p>
<h4 id="support_encrypted_imsi">支持加密的 IMSI</h4>
<p>更改 WLAN 网络配置以确保可处理加密的 IMSI。EAP-SIM 中使用的身份格式为:</p>
<p><code>Prefix | [IMSI || Encrypted IMSI] | @realm | {, Key Identifier AVP}</code></p>
<p>其中“|”(单竖线)表示串联,“||”(双竖线)表示专有值,“{}”(大括号)表示可选值,领域是根据 3GGP 规范 (TS23.003) 从指定 MNC/MCC 派生的 3GPP 网络域名。</p>
<p><code>Prefix</code> 值包括:</p>
<ul>
<li><code>\0</code>”:加密身份</li>
<li><code>0</code>”:EAP-AKA 身份</li>
<li><code>1</code>”:EAP-SIM 身份</li>
<li><code>6</code>”:EAP-AKA' 身份</li>
</ul>
<p><code>Encrypted IMSI</code> 的格式为:</p>
<p><code>Base64{RSA_Public_Key_Encryption{eapPrefix | IMSI}}</code></p>
<p>其中“|”表示串联。</p>
<p><code>eapPrefix</code> 值包括:</p>
<ul>
<li><code>0</code>”- EAP-AKA 身份</li>
<li><code>1</code>”- EAP-SIM 身份</li>
<li><code>6</code>”- EAP-AKA' 身份</li>
</ul>
<h4 id="provide_public_key">提供公钥</h4>
<p>提供托管运营商证书的公开网址,其中:</p>
<ol>
<li>公钥(和到期日期)可从证书中提取</li>
<li>信息采用如下所示的 JSON 格式:</li>
</ol>
<pre class="prettyprint"><code>{
"carrier-keys" : [ {
"key-identifier" : "CertificateSerialNumber=5xxe06d4",
"certificate" : "-----BEGIN CERTIFICATE-----\r\nTIIDRTCCAi2gAwIBAgIEVR4G1DANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJVUzELMAkGA1UE\r\nCBMCTkExCzAJBgNVBAcTAk5BMQswCQYDVQQKEwJOQTELMAkGA1UECxMCTkExEDAOBgNVBAMTB1Rl\r\nc3RiT6N1/w==\r\n-----END CERTIFICATE-----",
"key-type" : "WLAN"
} ]
}
</code></pre>
<h2 id="customization">自定义</h2>
<p>运营商 WLAN 默认处于关闭状态(除非在运营商配置管理器中针对每个运营商对其进行配置)。如果该功能处于开启状态,则设备会自动尝试连接到网络。在初次尝试时,系统会发送一条通知。</p>
</body></html>