From 4c81a12492956a515435b06bb7435aa305c729a8 Mon Sep 17 00:00:00 2001 From: "jayceon.fu" Date: Wed, 21 Aug 2024 14:13:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20(network-comm/nic/cellular/FAQ):?= =?UTF-8?q?=20=E5=AE=8C=E5=96=84=E4=BF=AE=E6=94=B9FAQ=E9=83=A8=E5=88=86?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=9B=B4=E5=A4=9AFAQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 固件版本: N/A 与固件版本无关 是否需要文案翻译: 否 --- .../en/network-comm/nic/cellular/FAQ.md | 91 ++++++++++++++++--- .../zh/network-comm/nic/cellular/FAQ.md | 90 +++++++++++++++--- 2 files changed, 156 insertions(+), 25 deletions(-) diff --git a/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md b/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md index a47be200..c0ea8eb5 100644 --- a/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md +++ b/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md @@ -1,32 +1,87 @@ # FAQ -**Question 1: Why should I configure APN?** +**1. What are Network Attach and PDN Connection Establishment?** -APN is a required parameter when a terminal device connects to the network. The APN determines which method the terminal device uses to access the network. Each operator has its specific APNs. Usually, the base stations of operators have the APN automatic correction feature. When a terminal device connects to the network without APN configuration or with an incorrect APN, the base station will automatically correct it and send the correct APN to the device. The device will accept and use the corrected APN to continue connecting to the network. However, there are some special cases where you must manually configure APN for the device to connect to the network, as listed below. +In cellular wireless communication, for a device to access the internet, it needs to complete two critical steps: Network Attach and PDN (Packet Data Network) Connection Establishment. The term "network attach" refers to the process of the device initiating the network attach procedure, while "dialing" refers to the process of establishing a PDN connection, which is also known as setting up a bearer. During the "dialing" process, in addition to establishing a PDN connection and obtaining an IP address assigned by the core network, the device also completes the binding of this IP address with the LWIP network protocol stack, essentially equipping the device with a "network card." -- Some base stations in certain areas do not have the APN automatic correction feature. In this case, if the terminal device does not configure APN or configures incorrect APN, the device will fail to connect to the network. You are recommended not to rely on the APN automatic correction feature of base stations because it is hard to know whether a base station has the APN automatic correction feature in advance. -- For some special SIM cards, such as dedicated network cards, if the APN is not configured, the terminal device will fail to connect to the network and will be rejected when initiating an attach request in the cell. These special SIM cards must be configured with APN first. -- There is another type of special SIM card that can connect to both public networks (such as the Internet) and dedicated networks. The connection to different networks is achieved by configuring different APNs. +The purpose of the device initiating the network attach is to inform the network of its identity, allowing the network to verify the legitimacy of the device's identity. If the verification is successful, the device's registration on the network is completed. However, at this point, the device is not yet capable of performing network services. -In summary, you are recommended to manually configure APN regardless of the type of SIM card you are using. +As we know, both mobile phones and computers must have a unique IP address to access the internet. This is because the IP address uniquely identifies each device, much like every household has a unique house number or address. Without an IP address, the network cannot determine where the device is, and thus cannot accurately deliver information to it. For the module to obtain an IP address, it must first complete identity verification and registration on the network side and then request the establishment of a PDN connection with the network, which is referred to as "dialing." Once the module completes the PDN connection establishment, the network side assigns an IP address to the device, effectively establishing an internet access channel. At this point, the module can use this IP address to access the internet. -**Question 2: How can I find out the APN information for the SIM card I am using?** +**2. Are the Network Attach and PDN Connection Establishment the Same in 2G/3G and 4G Networks? If Not, What Are the Differences?** -You can get the information from your operator. +The processes of network attach and PDN connection establishment in 2G and 3G networks are quite similar, with almost identical procedures. However, significant differences arise when it comes to 4G networks. Aside from the considerable differences in signaling, the primary differences from a user’s perspective are as follows: +In 2G/3G networks, network attach and PDN connection establishment are two separate processes. The device must first complete network registration before initiating PDN connection establishment. However, in LTE (4G) networks, the network attach process actually includes the PDN connection establishment, known as establishing a "default bearer." This means that when a device successfully attaches to the LTE network, it has already established a PDN connection and received an IP address assigned by the core network. +Does this imply that a device can directly access the internet once it successfully attaches to the LTE network? Actually, no. Even though the device registers successfully on the LTE network and establishes a default bearer to obtain an IP address from the core network, this IP address is not yet bound to the "network card," meaning the TCP/IP protocol stack cannot use this IP address to perform network operations. Therefore, a "dialing" operation is still necessary. -**Question 3: Why can the NIC be activated successfully even without APN configuration or with an incorrect APN?** -Because the base stations of some operators have the APN automatic correction feature. When a terminal device connects to the network without APN configuration or with an incorrect APN, the base station will automatically correct it and send the correct APN to the device. The device will accept and use the corrected APN to continue connecting to the network. -Currently, in most areas within China, most base stations have the APN automatic correction feature, but some do not. You are recommended not to rely on the APN automatic correction feature of base stations and manually configure the correct APN because it is hard to know whether a base station has the APN automatic correction feature in advance. +**3. What is APN?** +APN (Access Point Name) is a crucial concept in mobile networks. It defines how a device accesses external networks (usually the internet) through the carrier's network and specifies what type of network resources the device can access. -**Question 4: Why can the SIM card be recognized but fail to register on the network?** + +**4. Why is it Necessary to Configure an APN?** + +APN is a parameter that must be configured when the device joins the network because it determines how the device accesses external networks through the carrier's network and specifies what type of network resources it can access. If the APN is not configured or is configured incorrectly, it may result in the device failing to successfully attach to the network or establish a PDN connection. + + + +**5. Why Can Some SIM Cards Still Successfully Attach to the Network and Establish a PDN Connection Without Configuring an APN or Even with an Incorrect APN?** + +This is because the local carrier's base station has an APN auto-correction feature. When the device attempts to register on the network, if the APN is not configured or is configured incorrectly, the carrier's base station automatically corrects it during the network attachment process and sends the correct APN to the device. The device then accepts and uses this APN to continue the attachment process. This functionality depends on whether the carrier's base station supports it, and not all carriers provide this feature. + +Currently, most base stations across China have this functionality, though some do not. Since it is impossible to determine in advance which base stations have this feature, we do not recommend relying on the carrier's APN auto-correction function. It is best to proactively configure the correct APN during use. + + + +**6. In What Situations Must a User Configure an APN?** + +Here are some situations where configuring an APN is necessary: + +- **Lack of APN Auto-Correction by Carrier:** In some regions, the base stations of certain carriers do not have the APN auto-correction feature. In such cases, if the device does not have an APN configured or if the APN is configured incorrectly, the device will fail to attach to the network. +- **Special SIM Cards (e.g., Private Network SIMs):** For certain specialized SIM cards, such as those used for private networks, if the APN is not configured, the device will fail to attach to the network and will be rejected when attempting to initiate an Attach Request within the cell. These types of SIM cards require an APN configuration. +- **Multi-Network SIM Cards:** Some SIM cards can connect to both public networks (e.g., the internet) and private networks. The method for connecting to different networks is by configuring different APNs. + +We recommend that users proactively configure the correct APN, regardless of the type of SIM card being used. + + + +**7. How to Confirm the APN Information of a SIM Card?** + +You can confirm the APN information by contacting your carrier. + + + +**8. How to Configure the Network Attach APN? Is a Reboot Required? Is the Configuration Saved After Power Loss? Does It Need to Be Configured Every Time the Device Is Powered On?** + +- **How to Configure the Network Attach APN** + + The APN can be configured using the `dataCall.setPDPContext` interface, with the `profileID` parameter set to 1. For detailed instructions on using this interface, please refer to the [APN Configuration and Retrieval Functionality](https://python.quectel.com/doc/API_reference/en/iotlib/dataCall.html#APN-Configuration-and-Retrieval) section of the QuecPython official WIKI. + +- **Is a Reboot Required After Configuration?** + + There are two ways to make the configuration take effect: + + - Method 1: Reboot the device. + - Method 2: Perform a CFUN0/1 switch. + +- **Is the Configured APN Saved After Power Loss?** + + Yes, the configuration is saved, meaning the parameters set via software will not be lost due to power loss or device restart. + +- **Does It Need to Be Configured Every Time the Device Is Powered On?** + + No, it does not need to be configured every time. For the same single-carrier SIM card, you only need to configure it once. + + + +**9. Why can the SIM card be recognized but fail to register on the network?** This situation is relatively complex. Please refer to [Module Network Registration Failure](./exception-handling.html#Module Network Registration Failure) in the *Handle Network Exceptions* chapter for details. Here are some common reasons: @@ -40,7 +95,17 @@ This situation is relatively complex. Please refer to [Module Network Registrati -**Question 5: Why cannot the NIC perform network services after being activated successfully?** +**10. What Is a Multi-Carrier SIM Card, and What Are the Usage Considerations?** + +Typically, the SIM cards we use contain configuration information for only one carrier. For example, a China Mobile SIM card contains only China Mobile's carrier configuration information, which we refer to as a profile. However, some SIM cards have multiple carrier profiles built-in, meaning they can support networks from multiple carriers. These SIM cards are known as multi-carrier SIM cards. + +A multi-carrier SIM card usually starts by using one of the carrier profiles by default when the device is powered on, searching for and attaching to the network. If the network attachment is not successful within a certain period, the SIM card will automatically switch to another carrier profile and attempt to search for and attach to the network again using the newly switched profile. Additionally, in some cases, even after the device has successfully attached and established a PDN connection using the current profile, the SIM card may still switch profiles. The specific conditions under which this profile switching occurs should be confirmed with the carrier that provides the multi-carrier SIM card. + +It is important to note that each profile within such a SIM card corresponds to a unique IMSI (International Mobile Subscriber Identity). When the SIM card switches profiles, the IMSI associated with the SIM card also changes. Every time a profile switch occurs, if the device is connected to the network, this will result in a temporary disconnection from the network until the device successfully attaches and establishes a PDN connection using the new carrier profile. + + + +**11. Why cannot the NIC perform network services after being activated successfully?** - Your SIM card is in arrears. The module can register on the network and activate the NIC successfully even when the SIM card inserted is in arrears, but the operator will restrict the module from network communication. diff --git a/docs/Application_guide/zh/network-comm/nic/cellular/FAQ.md b/docs/Application_guide/zh/network-comm/nic/cellular/FAQ.md index ededcf3d..61b69dba 100644 --- a/docs/Application_guide/zh/network-comm/nic/cellular/FAQ.md +++ b/docs/Application_guide/zh/network-comm/nic/cellular/FAQ.md @@ -1,32 +1,88 @@ # 常见问题解答 -**问题1:为什么要配置APN?** +**1、什么是注网和拨号?** -APN是终端入网时必须配置的一个参数,它决定了终端通过哪种接入方式来访问网络。所有运营商都有其特定的APN,通常运营商的基站都有APN自动纠错功能,即终端在入网时,如果没有配置APN或者配置了错误的APN,运营商的基站会自动纠正并下发一个正确的APN给终端,此时终端会选择接受并使用该APN继续入网。但是有些特殊情况,用户是必须主动配置APN,终端才能正常入网。下面列出了几种必须配置APN的情况。 +在蜂窝无线通信中,设备想要上网,需要完成两个重要的步骤:网络附着(Attach)和PDN连接建立。而我们常说的“注网”其实就是指设备发起网络附着的过程,“拨号”则指的是PDN连接建立的过程,也叫建立一路承载。“拨号”过程,除了建立PDN连接,拿到核心网的分配的IP,其实还完成了这个IP地址与LWIP网络协议栈的绑定,相当于让设备有了一张“网卡”。 -* 有的运营商在一些区域的基站没有APN自动纠错功能,此时如果终端设备没有配置APN或者配置了错误的APN,会导致终端设备入网失败。我们没法提前知道某个基站是否具有APN自动纠错功能,因此建议用户不要依赖基站的APN自动纠错功能。 -* 对于一些特殊的SIM卡,比如专网卡,如果没有配置APN,会导致终端设备入网失败,在小区上发起附着请求(Attach Request)时就会被拒绝。这种特殊的SIM卡,必须要先配置APN。 +设备发起网络附着的目的,其实是告知网络自己的身份,同时由网络来验证设备身份的合法性,如果验证通过,则完成设备在网络上的登记过程。此时设备还无法进行网络业务。 + +我们知道,手机和电脑想要上网,都必须有一个属于自己的IP地址才行,这是因为IP地址唯一标识每个设备,就像每个家庭都有一个唯一的门牌号或者地址。没有IP地址,网络就无法知道设备在哪里,自然也无法将信息准确地传送给你。而模组想要获取IP地址,就需要在网络侧完成身份验证登记后,向网络请求建立PDN连接,即所谓的“拨号”。当模组完成PDN连接建立后,网络侧会分配一个IP地址给设备,相当于建立了一条上网通道,此时模组就可以使用这个IP来上网了。 + + + +**2、设备在2G/3G和4G网络下的注网和拨号是否一样,如果不一样,有什么区别?** + +设备在2G和3G网络下的注网和拨号过程差异不大,流程上基本是一致的。但是到4G网络时,注网拨号和2G/3G下差异就很大了。除了信令本身差异较大之外,对用户来说,主要差异如下: + +2G/3G网络下,设备的注网和拨号是两个独立的过程,设备必须先完成网络注册,然后再发起PDN连接建立。而到LTE网络中,设备的注网过程,其实包含了PDN连接建立,注网过程中建立一路PDN连接的过程,我们称之为“建立默认承载”。也就是说,设备在LTE网络中,注网成功时其实就已经建立了一路PDN连接,并拿到了核心网分配的IP地址。 + +按照上述说明,是不是意味着LTE网络下,设备注网成功,就可以直接上网了呢?其实是不行的。这是因为设备在LTE网络上注册成功后,虽然已经建立了一路默认承载,拿到了核心网下发的IP,但是这个IP地址没有绑定到“网卡”,TCP/IP协议栈拿不到这个IP,无法进行网络业务。所以必须进行“拨号”操作。 + + + +**3、什么是APN?** + +APN(Access Point Name,接入点名称)是移动网络中非常重要的概念,它定义了设备如何通过运营商的网络访问外部网络(通常是互联网),以及访问什么样的网络资源。 + + + +**4、为什么要配置APN?** + +APN是终端入网时必须配置的一个参数,因为他决定了设备如何通过运营商的网络访问外部网络,以及访问什么样的网络资源。如果没有配置APN或者配置了错误的APN,可能导致设备注网失败或者拨号失败。 + + + +**5、为什么有的卡不配置APN甚至配置错误的APN,设备也能正常注网和拨号?** + +这是因为当地的运营商基站有APN自动纠错功能,即终端在进行网络注册时,如果没有配置APN或者配置了错误的APN,运营商的基站会在注网过程中自动纠正并下发一个正确的APN给终端,此时终端会选择接受并使用该APN继续入网。该功能依赖于运营商的基站是否支持,并不是所有运营商都支持。 + +目前在中国境内,大部分地区的基站都有此功能,也有一些没有。由于我们无法提前确认哪些基站有这个功能,因此我们不建议用户依赖运营商基站的APN自动纠错功能,最好在使用时,主动配置正确的APN。 + + + +**6、哪些情况下,用户必须配置APN?** + +下面列出了几种必须配置APN的情况: + +* 有的运营商在一些区域的基站没有APN自动纠错功能,此时如果终端设备没有配置APN或者配置了错误的APN,会导致终端设备注网失败。 +* 对于一些特殊的SIM卡,比如专网卡,如果没有配置APN,会导致终端设备注网失败,在小区上发起附着请求(Attach Request)时就会被拒绝。这种特殊的SIM卡,必须要配置APN。 * 还有一类特殊的SIM卡,既可以连接公共网络(比如互联网),也可以连接专网。其连接不同网络的方式就是通过配置不同的APN来实现。 -综上所述,我们建议用户,无论使用的是什么SIM卡,都主动去配置APN。 +我们建议用户,无论使用的是什么SIM卡,都主动去配置正确的APN。 -**问题2:如何知道使用的SIM卡的APN信息?** +**7、如何确认SIM卡的APN信息?** 可以和运营商进行确认。 -**问题3:为什么没有配置APN或者配置错误的APN也能激活成功?** +**8、如何配置注网APN,是否需要重启,是否掉电保存,是否每次开机都要配置?** + +* 如何配置注网APN + + 通过`dataCall.setPDPContext`接口配置,并且`profileID`参数必须为1。具体的接口使用说明请参考QuecPython官网WIKI说明部分的[APN配置与获取功能](https://python.quectel.com/doc/API_reference/zh/iotlib/dataCall.html#APN%E9%85%8D%E7%BD%AE%E4%B8%8E%E8%8E%B7%E5%8F%96%E5%8A%9F%E8%83%BD)。 + +* 配置后是否需要重启 + + 有两种方式可以使配置生效: + + 方式1:重启设备。 -因为有的运营商的基站有APN自动纠错功能,即终端在入网时,如果没有配置APN或者配置了错误的APN,运营商的基站会自动纠正并下发一个正确的APN给终端,此时终端会选择接受并使用该APN继续入网。 + 方式2:进行一次CFUN0/1切换。 -目前在中国境内,大部分地区的基站应该都有此功能,也有一些没有。由于我们无法提前确认哪些基站有这个功能,因此我们不建议用户依赖运营商基站的APN自动纠错功能,最好在使用时,主动配置正确的APN。 +* 配置的APN等参数是否支持掉电保存 + 支持。 +* 是否每次开机都要配置 -**问题4:SIM卡可以识别,但是无法注网是什么原因?** + 不需要。针对同一张单运营商的卡,只需要配置一次即可。 + + + +**9、SIM卡可以识别,但是无法注网是什么原因?** 这种情况相对比较复杂,参考前面一个章节《网络异常处理》中的[模组网络注册失败](https://python.quectel.com/doc/Application_guide/zh/network-comm/nic/cellular/exception-handling.html#%E6%A8%A1%E7%BB%84%E7%BD%91%E7%BB%9C%E6%B3%A8%E5%86%8C%E5%A4%B1%E8%B4%A5)部分,这里仅列出比较常见的几种原因: @@ -40,7 +96,17 @@ APN是终端入网时必须配置的一个参数,它决定了终端通过哪 -**问题5:无线网卡激活成功,但是无法进行网络业务可能是什么原因?** +**10、什么是多运营商SIM卡,有什么使用注意事项?** + +我们正常使用的SIM卡里面一般都只有一家运营商的配置信息,比如中国移动的SIM卡,那卡里面就只有中国移动运营商配置信息,我们将这些信息的集合称之为一个profile。而有的SIM卡,内置了多家运营商的profile文件,即这种SIM卡可以支持多家运营商网络,这种SIM卡就是多运营商卡。 + +这种多运营商卡一般都是开机时先默认使用其中一个运营商的profile信息去搜网并注网。如果一定时间内没有注网成功,这种SIM卡就会自动进行运营商profile的切换,然后尝试使用新切换的这个profile去搜网并注网。当然,有的SIM卡,在使用当前profile已经注网拨号成功的情况下,也有可能发生profile的切换,具体还是要和这种SIM卡的运营商去确认哪些情况下会发生切换卡内运营商的行为。 + +需要说明的是,这种SIM卡中,每一个profile都对应一个唯一的IMSI。当SIM卡切换profile时,SIM的IMSI也是随之改变的。每次profile切换时,设备如果是处于联网状态,都会导致设备与网络连接暂时断开,直到使用新的运营商profile注网拨号成功。 + + + +**11、无线网卡激活成功,但是无法进行网络业务可能是什么原因?** 一般有下面两种情况可能会导致这种问题: @@ -50,7 +116,7 @@ APN是终端入网时必须配置的一个参数,它决定了终端通过哪 -**问题6:使用蜂窝无线网卡的自动重连功能,模组正常运行过程中因为一些原因导致网络连接断开,后面自动重连成功后,Socket、HTTP和MQTT这些功能需要重新初始化吗?** +**12、使用蜂窝无线网卡的自动重连功能,模组正常运行过程中因为一些原因导致网络连接断开,后面自动重连成功后,Socket、HTTP和MQTT这些功能需要重新初始化吗?** 首先我们需要知道,模组因为网络异常导致连接断开后,如果自动重连成功,那蜂窝无线网卡的IP地址已经发生了变化。此时Socket、HTTP和MQTT这些功能处理情况如下: -- Gitee From 3308ad9a31accb6ecb25cefe37a8a49336384544 Mon Sep 17 00:00:00 2001 From: "jayceon.fu" Date: Mon, 2 Sep 2024 10:14:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs=20(network-comm/nic/cellular/FAQ):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9FAQ=E8=8B=B1=E6=96=87=E7=89=88=E4=B8=AD?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=B8=8A=E6=AC=A1=E6=BC=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 固件版本: N/A 是否需要文案翻译: 否 --- docs/Application_guide/en/network-comm/nic/cellular/FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md b/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md index c0ea8eb5..bcc2c1e9 100644 --- a/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md +++ b/docs/Application_guide/en/network-comm/nic/cellular/FAQ.md @@ -113,7 +113,7 @@ It is important to note that each profile within such a SIM card corresponds to -**Question 6: When the automatic reconnection of the NIC is enabled, do Socket, HTTP, and MQTT need to be reinitialized after the NIC is re-connected to the network if the network connection is disconnected due to some reasons during the normal operation of the module?** +**12. When the automatic reconnection of the NIC is enabled, do Socket, HTTP, and MQTT need to be reinitialized after the NIC is re-connected to the network if the network connection is disconnected due to some reasons during the normal operation of the module?** You should know that the IP address of the NIC will be changed as long as the NIC is automatically re-connected to the network after disconnecting from the network due to network exceptions. In this case, you need to perform the following steps for Socket, HTTP, and MQTT features. -- Gitee