diff --git a/docs/API_reference/en/gnsslib/cellLocator.md b/docs/API_reference/en/gnsslib/cellLocator.md
index ab6deebde2b7964629488a851fbd39dc386b1ec0..348da3d778dd731afdd4113fb093bffbf777bccc 100644
--- a/docs/API_reference/en/gnsslib/cellLocator.md
+++ b/docs/API_reference/en/gnsslib/cellLocator.md
@@ -20,8 +20,8 @@ This method gets the module's latitude and longitude coordinate information.
**Parameter:**
-* `serverAddr` - String type. Server domain name with a length less than 255 bytes. Currently only “[www.queclocator.com”](http://www.queclocator.xn--com-9o0a/) is supported.
-* `port` - Integer type. Server port. Currently only port 80 is supported.
+* `serverAddr` - String type. Server domain name with a length less than 255 bytes. For domain name, please contact Quectel technical support.
+* `port` - Integer type. Server port. Currently only port 80 is supported.
* `token` - String type. A 16-character key, and application is required.
* `timeout` - Integer type. Timeout. Range: 1–300. Unit: s. Default value: 300.
* `profileIdx` - Integer type. PDP context ID. Range: 1–3. It is an optional parameter and the default is the one that has been successfully dialed. Setting other values may require a dedicated APN and password.
@@ -54,7 +54,8 @@ The error codes are described as follows:
```python
>>> import cellLocator
->>> cellLocator.getLocation("www.queclocator.com", 80, "xxxxxxxxxxxxxxxx", 8, 1)
+>>> cellLocator.getLocation("www.xxxxx.com", 80, "xxxxxxxxxxxxxxxx", 8, 1)
(117.1138, 31.82279, 550)
+# The "www.xxxxx.com" refers to the domain name, please contact Quectel technical support
# The key "xxxxxxxxxxxxxxxx" indicates token. Contact Quectel Technical Support to apply it.
```
diff --git a/docs/API_reference/zh/gnsslib/cellLocator.md b/docs/API_reference/zh/gnsslib/cellLocator.md
index 783deaf402efa092a285d1ab1b0630c3bfaa11bb..7dde2283f46e23aaaf92e6c1d4cb7a141f7b95d0 100644
--- a/docs/API_reference/zh/gnsslib/cellLocator.md
+++ b/docs/API_reference/zh/gnsslib/cellLocator.md
@@ -20,7 +20,7 @@ cellLocator.getLocation(serverAddr, port, token, timeout [, profileIdx])
**参数描述:**
-* `serverAddr` - 服务器域名,字符串类型,长度必须小于255 bytes,目前仅支持 “[www.queclocator.com”](http://www.queclocator.xn--com-9o0a/)。
+* `serverAddr` - 服务器域名,字符串类型,长度必须小于255 bytes,域名请联系移远技术支持。
* `port` - 服务器端口,整型值,目前仅支持 80 端口。
* `token` - 密钥,字符串类型,16位字符组成,需要申请。
* `timeout` -设置超时时间,整型值,范围1-300s,默认300s。
@@ -54,7 +54,8 @@ cellLocator.getLocation(serverAddr, port, token, timeout [, profileIdx])
```python
>>> import cellLocator
->>> cellLocator.getLocation("www.queclocator.com", 80, "xxxxxxxxxxxxxxxx", 8, 1)
+>>> cellLocator.getLocation("www.xxxxx.com", 80, "xxxxxxxxxxxxxxxx", 8, 1)
(117.1138, 31.82279, 550)
+# 上面"www.xxxxx.com" 是指域名,请联系移远技术支持
# 上面使用的密钥"xxxxxxxxxxxxxxxx"指代token,具体需要向移远申请
```
diff --git a/docs/API_reference/zh/iotlib/dataCall.md b/docs/API_reference/zh/iotlib/dataCall.md
index 65ac73dba7f97e4d834e3237de868652e1c3f26d..d6177a4754920929a3d3be2339985f1736e36f83 100644
--- a/docs/API_reference/zh/iotlib/dataCall.md
+++ b/docs/API_reference/zh/iotlib/dataCall.md
@@ -28,7 +28,7 @@ if pdpCtx != -1:
if ret == 0:
print('APN 配置成功。')
# 重启后按照配置的信息进行拨号
- Power.powerRestart()
+ Power.powerRestart()
else:
print('APN 配置失败。')
else:
@@ -306,7 +306,7 @@ def netCallback(args):
print('### network {} disconnected.'.format(pdp))
elif datacallState == 1:
print('### network {} connected.'.format(pdp))
-
+
dataCall.setCallback(netCallback)
```
diff --git a/docs/Application_guide/en/dev-tools/DTU-Tool/README.md b/docs/Application_guide/en/dev-tools/DTU-Tool/README.md
index 0d5c899257c13c7fd198b8a0776fad7a16af05e6..b909c63a4593950c0b4d7f9a7bbeb1d70a314751 100644
--- a/docs/Application_guide/en/dev-tools/DTU-Tool/README.md
+++ b/docs/Application_guide/en/dev-tools/DTU-Tool/README.md
@@ -21,7 +21,7 @@ DTU Tool has two main functions:
| Restart Device | Restart the DTU device |
| Get Current Parameter Settings | Get the current parameter settings of the DTU device and redirect to the parameter setting and display page |
| Restore Factory Settings | Restore the factory settings and restart the DTU device |
-| Save Parameter Settings | System configuration parameters: cloud platform type, firmware upgrade, script upgrade, historical data storage
Serial port configuration parameters: serial port number, baud rate, data bits, parity, stop bits, flow control, R485
Cloud configuration parameters: Huawei Cloud, Alibaba Cloud, Tencent Cloud, MQTT private cloud, Socket private cloud |
+| Save Parameter Settings | System configuration parameters: cloud platform type, firmware upgrade, script upgrade, historical data storage
Serial port configuration parameters: serial port number, baud rate, data bits, parity, stop bits, flow control, R485
Cloud configuration parameters: Alibaba Cloud, MQTT private cloud, Socket private cloud |
### Query IMEI Number
@@ -63,7 +63,7 @@ Click **`restore factory setting`** to restore the factory settings.

-#### System Configuration Parameter
+#### System Configuration Parameter

@@ -71,7 +71,7 @@ The basic configuration parameters are shown in the above figure.
| **Parameter** | **Description** |
| ------------------ | ------------------------------------------------------------ |
-| cloud type | `Alibaba Cloud`
`Tencent Cloud`
`Huawei Cloud`
`QuecCloud`
`TCP Private Cloud`
`MQTT Private Cloud` |
+| cloud type | `Alibaba Cloud`
`TCP Private Cloud`
`MQTT Private Cloud` |
| fota | Whether to enable firmware OTA upgrade |
| sota | Whether to enable project script OTA upgrade |
| history | When communication is abnormal and the DTU cannot send data to the cloud, the data will be saved and sent again when communication is restored |
@@ -83,7 +83,7 @@ The basic configuration parameters are shown in the above figure.
| flowctrl | Hardware control flow. Option: `FC_NONE` and `FC_HW`. |
| control rs485 pin | Pull up and pull down the specified GPIO before and after sending data through the serial port to indicate the direction of 485 communication. For example, `1 ` represents `UART.GPIO1` and `2` represents `UART.GPIO2`. |
-#### Cloud Configuration Parameter
+#### Cloud Configuration Parameter
The cloud configuration parameters vary with the selected `cloud type`. When the `cloud type` is MQTT, the cloud configuration parameters are as follows:
diff --git a/docs/Application_guide/en/network-comm/net-protocols/tcp-udp.md b/docs/Application_guide/en/network-comm/net-protocols/tcp-udp.md
index 3933857465bdb6982396ad6092866f18970d36c6..678b0c8857ac9cf80a1d1ff0f4b0fb22720a714c 100644
--- a/docs/Application_guide/en/network-comm/net-protocols/tcp-udp.md
+++ b/docs/Application_guide/en/network-comm/net-protocols/tcp-udp.md
@@ -128,34 +128,34 @@ Before getting started, let's understand the usage of the 5 interfaces related t
- `usocket.socket(af=AF_INET, type=SOCK_STREAM, proto=IPPROTO_TCP)`: Create a socket object.
- `af`: Address family.
-
+
`usocket.AF_INET`: IPv4 addresses
-
+
`usocket.AF_INET6`: IPv6 addresses
-
+
- `type`: Socket type.
-
+
`usocket.SOCK_STREAM`: Stream sockets
-
+
`usocket.SOCK_DGRAM`: Datagram sockets
-
+
`usocket.SOCK_RAW`: Raw sockets
-
+
- `proto`: Protocol type.
-
+
`usocket.IPPROTO_TCP`: TCP protocol
-
+
`usocket.IPPROTO_UDP`: UDP protocol
-
+
`IPPROTO_TCP_SER`: TCP server
- `sock.connect(address)`: Connect to the server.
-
+
- `address`: A tuple or list containing the IP address string and port number.
- `sock.send(data)`: Send data to the server. The actual length of the sent data is returned.
-
+
- `data`: Data of bytes type.
- `sock.recv(size)`: Receive data sent by the server. The received data of bytes type is returned.
-
+
- `size`: The length of data to be read.
- `sock.close()`: Close the socket.
@@ -172,23 +172,23 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Connect to the TCP server
sock.connect((address, port))
print('tcp link established: %s, %s' % (address, port))
-
+
# Package user data
data = 'GET / HTTP/1.1\r\n'
data += 'Host: ' + address + ':' + str(port) + '\r\n'
data += 'Connection: close\r\n'
data += '\r\n'
data = data.encode()
-
+
# Send the data
sock.send(data)
print('<-- send data:')
print(data)
-
+
# Receive the data
print('--> recv data:')
while True:
@@ -202,7 +202,7 @@ def tcp_client(address, port):
break
```
-The HTTP request packet constructed in the above sample code is:
+The HTTP request packet constructed in the above sample code is:
```http
GET / HTTP/1.1
@@ -270,7 +270,7 @@ The function prototype for domain name resolution is `usocket.getaddrinfo(host,
- Return Value
`[(family, type, proto, canonname, sockaddr)]`
-
+
- `family`: Address family.
- `type`: Socket type.
- `proto`: Protocol type.
@@ -289,27 +289,27 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Domain name resolution
sockaddr = usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('tcp link established.')
-
+
# Package user data
data = 'GET / HTTP/1.1\r\n'
data += 'Host: ' + address + ':' + str(port) + '\r\n'
data += 'Connection: close\r\n'
data += '\r\n'
data = data.encode()
-
+
# Send the data
sock.send(data)
print('<-- send data:')
print(data)
-
+
# Receive the data
print('--> recv data:')
while True:
@@ -349,7 +349,7 @@ tcp disconnected.
For cellular communication modules, the IP address assigned by the base station is usually a LAN address, and external network devices cannot directly access the module. In this case, the significance of the module as a TCP server is not very high.
-However, for private NICs, the base station assigns them private network addresses and allows network devices in the private network to access the module. In this case, the module can act as a TCP server, which is common in products like electric meters.
+However, for private NICs, the base station assigns them private network addresses and allows network devices in the private network to access the module. In this case, the module can act as a TCP server, which is common in products like electric meters.
Moreover, devices in the LAN are allowed to access the host in Wi-Fi and Ethernet networks.
@@ -388,7 +388,7 @@ def _client_conn_proc(conn, ip_addr, port):
# Receive data sent by the client
data = conn.recv(1024)
print('[server] [client addr: %s, %s] recv data:' % (ip_addr, port), data)
-
+
# Send data back to the client
conn.send(data)
except:
@@ -401,20 +401,20 @@ def tcp_server(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP_SER)
print('[server] socket object created.')
-
+
# Bind the server IP address and port
sock.bind((address, port))
print('[server] bind address: %s, %s' % (address, port))
-
+
# Listen for client connection requests
sock.listen(10)
print('[server] started, listening ...')
-
+
while True:
# Accept a client connection request
cli_conn, cli_ip_addr, cli_port = sock.accept()
print('[server] accept a client: %s, %s' % (cli_ip_addr, cli_port))
-
+
# Create a new thread for each client connection for concurrent processing
_thread.start_new_thread(_client_conn_proc, (cli_conn, cli_ip_addr, cli_port))
```
@@ -431,24 +431,24 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('[client] socket object created.')
-
+
# Connect to the TCP server
print('[client] connecting: %s, %s' % (address, port))
sock.connect((address, port))
print('[client] connected.')
-
+
data = b'1234567890'
while True:
try:
# Send data to the server
sock.send(data)
print('[client] send data:', data)
-
+
# Read the data sent back by the server
data = sock.recv(1024)
print('[client] recv data:', data)
print('[client] -------------------------')
-
+
# Delay for 1 second
utime.sleep(1)
except:
@@ -469,18 +469,18 @@ if __name__ == '__main__':
stage, state = checkNet.waitNetworkReady(30)
if stage == 3 and state == 1: # Network connection is normal
print('[net] Network connection successful.')
-
+
# Get the IP address of the module
server_addr = dataCall.getInfo(1, 0)[2][2]
server_port = 80
-
+
# Start the server thread to listen for client connection requests
_thread.start_new_thread(udp_server, (server_addr, server_port))
-
+
# Delay for a while to ensure that the server starts successfully
print('sleep 3s to ensure that the server starts successfully.')
utime.sleep(3)
-
+
# Start the client
udp_client(server_addr, server_port)
else:
@@ -491,15 +491,15 @@ The above code calls `dataCall.getInfo()` to get the IP address of the module.
- `profileID`: PDP context ID. This term is obscure, and a simple understanding is that the cellular communication module can establish multiple connections with the base station, and each connection corresponds to a different IP address. In general, one connection is sufficient to meet the requirements. If you want to get the IP address of a specific connection, fill in the corresponding ID for this parameter.
-- `ipType`: IP protocol type.
+- `ipType`: IP protocol type.
0: IPv4 (recommended for beginners)
- 1: IPv6
+ 1: IPv6
2: IPv4 and IPv6
-- `state`: Network connection status with the base station.
+- `state`: Network connection status with the base station.
0: Not connected
@@ -576,16 +576,16 @@ def udp_server(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM, usocket.IPPROTO_UDP)
print('[server] socket object created.')
-
+
# Bind server IP address and port
sock.bind((address, port))
print('[server] bind address: %s, %s' % (address, port))
-
+
while True:
# Read client data
data, sockaddr = sock.recvfrom(1024)
print('[server] [client addr: %s] recv data: %s' % (sockaddr, data))
-
+
# Send data back to the client
sock.sendto(data, sockaddr)
@@ -593,37 +593,37 @@ def udp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM, usocket.IPPROTO_UDP)
print('[client] socket object created.')
-
+
data = b'1234567890'
while True:
# Send data to the server
sock.sendto(data, (address, port))
print('[client] send data:', data)
-
+
# Read data sent back from the server
data, sockaddr = sock.recvfrom(1024)
print('[client] [server addr: %s] recv data: %s' % (sockaddr, data))
print('[client] -------------------------')
-
+
# Delay for 1 second
utime.sleep(1)
-
+
if __name__ == '__main__':
stage, state = checkNet.waitNetworkReady(30)
if stage == 3 and state == 1: # Network connection is normal
print('[net] Network connection successful.')
-
+
# Get the IP address of the module
server_addr = dataCall.getInfo(1, 0)[2][2]
server_port = 80
-
+
# Start the server thread
_thread.start_new_thread(udp_server, (server_addr, server_port))
-
+
# Delay for a while to ensure that the server starts successfully
print('sleep 3s to ensure that the server starts successfully.')
utime.sleep(3)
-
+
# Start the client
udp_client(server_addr, server_port)
else:
@@ -679,7 +679,7 @@ The Ethernet NIC provides `ipconfig()` to obtain the NIC properties, including t
- `hostname`: NIC name.
-- `iptype`: IP protocol type.
+- `iptype`: IP protocol type.
4: IPv4
@@ -721,20 +721,20 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Bind the Ethernet NIC IP address after creating the socket object and before connecting to the server
local_address = ip_conf[1][1]
sock.bind((local_address, 0))
print('bind ethernet address: %s', local_address)
-
+
# Resolve the domain name
sockaddr=usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('tcp link established.')
-
+
# More code in TCP client samples above
```
@@ -773,7 +773,7 @@ print('Ethernet nic enabled.')
#### Wi-Fi NIC
-##### Binding IP Address through `socket.bind()`
+##### Binding IP Address through `socket.bind()`
The Wi-Fi NIC also provides an `ipconfig()` method, but the return value is slightly different from Ethernet. The format is `(ip, subnet, gateway, mtu, primary_dns, secondary_dns)`.
@@ -815,20 +815,20 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('Socket object created.')
-
+
# Before connecting to the server, bind the Wi-Fi NIC IP address
local_address = ip_conf[0]
sock.bind((local_address, 0))
print('Bind ethernet address: %s', local_address)
-
+
# Resolve the domain name
sockaddr=usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('TCP link established.')
-
+
# More code in TCP client samples above
```
diff --git a/docs/Application_guide/en/network-comm/nic/cellular/application.md b/docs/Application_guide/en/network-comm/nic/cellular/application.md
index d271ff569a8f85a515c498bf5f34a4e3befa5ff5..28b85911e1081febe2063fbe16a40d49346a79dd 100644
--- a/docs/Application_guide/en/network-comm/nic/cellular/application.md
+++ b/docs/Application_guide/en/network-comm/nic/cellular/application.md
@@ -176,7 +176,7 @@ The above sample code download link:[Download](https://github.com/QuecPython/exa
-## Automatically Activate Multiple NICs at Startup and Configure APN
+## Automatically Activate Multiple NICs at Startup and Configure APN
This scenario refers to a situation where you need the module to automatically activate multiple cellular NICs at startup. The application program can access different networks using different NICs, for example, one NIC for public network access and another for private network access.
@@ -318,7 +318,7 @@ def main():
sock2.bind((ip_nic2, 0))
sock2.settimeout(10)
# Configure server IP address and port number. The IP address and port number below are for example only
- server_addr = ('220.180.239.212', 8305)
+ server_addr = ('192.0.2.2', 8305)
# Connect to the server
sock2.connect(server_addr)
# Send data to the server
@@ -397,7 +397,7 @@ def cfgEnv(usrCfg):
# It is recommended to enable the automatic reconnection for the cellular NIC
dataCall.setAutoConnect(usrCfg['profileID'], 1)
need_reboot1 = True
-
+
print('Check the APN configuration.')
# Get the APN information of the cellular NICs and check if the current one is the one you specified
pdpCtx = dataCall.getPDPContext(usrCfg['profileID'])
@@ -637,7 +637,7 @@ def main():
sock2.bind((ip_nic2, 0))
sock2.settimeout(10)
# Configure server IP address and port number. The IP address and port number below are for example only
- server_addr = ('220.180.239.212', 8305)
+ server_addr = ('192.0.2.2', 8305)
# Connect to the server
sock2.connect(server_addr)
# Send data to the server
@@ -678,7 +678,7 @@ You can call the following function to configure the server address of the speci
dataCall.setDNSServer(profileID, simID, priDNS, secDNS)
```
-Please refer to [DNS Configuration](https://python.quectel.com/doc/API_reference/en/iotlib/dataCall.html#DNS-Configuration) in the wiki on the QuecPython official website for details.
+Please refer to [DNS Configuration](https://python.quectel.com/doc/API_reference/en/iotlib/dataCall.html#DNS-Configuration) in the wiki on the QuecPython official website for details.
Parameter description:
diff --git a/docs/Application_guide/en/solutions/DTU/README.md b/docs/Application_guide/en/solutions/DTU/README.md
index fb95e70b17797b87a8dcbc80c43f937735f2d959..02e97f53d6079400e08b422a79cedc489e782eee 100644
--- a/docs/Application_guide/en/solutions/DTU/README.md
+++ b/docs/Application_guide/en/solutions/DTU/README.md
@@ -1,12 +1,12 @@
# DTU Introduction
-## Solution Overview
+## Solution Overview
### DTU Introduction
DTU (Data Transfer Unit) is a **wireless terminal device** specially used to **convert** serial port **data** into network data or convert network data into serial port data for wireless **communication** through **networks**. It has many advantages such as flexible networking, wide network coverage, short construction cycle, and low cost. It is widely used in meteorology, hydrology, geology and other industries.
-### Basic Principles
+### Basic Principles
The main function of DTU is to transmit the device data wirelessly back to the cloud (backend service), as shown in `Figure 1: DTU Introduction`. To complete the data transmission, a complete data transmission system needs to be established. This system includes: DTU device, customer device (MCU), mobile network, backend center (cloud). Insert a SIM card into the DTU device. After the device is powered on, it will first **dial and register the network**; then **establish a connection** with the cloud center service through the network; After that, the DTU device can **communicate bidirectionally** with the cloud backend service —— receive MCU data through the serial port, process it and report it to the cloud (**uplink data**), and process the data received from the cloud and send it to the MCU through the serial port (**downlink data**).
@@ -72,7 +72,7 @@ Product Features:
- NANO SIM card slot
- RS485 interface for easy integration
-Device Debugging:
+Device Debugging:
- Insert the SIM card into the NANO SIM card slot
- Connect the antenna
@@ -81,11 +81,11 @@ Device Debugging:

Figure 5: DP-DTU-Q600 Hardware Interface
-Connect the device to the development machine (this article uses `CP2102 USB to TTL module` for connection and debugging).
+Connect the device to the development machine (this article uses `CP2102 USB to TTL module` for connection and debugging).
Use 2 DuPont lines to connect the `485A` and `485B` pins, and connect the `CP2102` to the `USB` port of the development machine (as shown in Figure 6).
-
+
Figure 6: Connect DP600R to development machine
> After successful connection, when the device is powered on and connected to the network, the `power` and `net` indicator lights will light up.
@@ -98,14 +98,14 @@ Refer to the document for installing QPYCom and building the QuecPython developm

-Figure 7: QPYCom open repl serial port
+Figure 7: QPYCom open repl serial port
##### Download Script
-Create download project - Switch to the Download tab, click Create Project, and enter any project name.
+Create download project - Switch to the Download tab, click Create Project, and enter any project name.
> Here we create a project named `dtu`.
-
+
Figure 8: QPYCom create new project
Select import file - Right-click the `usr` directory, click **Import All** in the pop-up dialog box, and then select the **code** folder in our DTU code repository - import all code in code into the module in one click. As shown below:
@@ -115,11 +115,11 @@ Select import file - Right-click the `usr` directory, click **Import All** in th
Figure 9: QPYCom one-click import script
Import script - Click the `Download Script` button in the lower right corner to start importing the script.
-##### Run DTU Application
+##### Run DTU Application
-Switch to the "Files" tab, select "dtu.py" on the right, and click the Run button to start dtu debugging and running. To run automatically after power-on, just rename "dtu.py" to "main.py".
+Switch to the "Files" tab, select "dtu.py" on the right, and click the Run button to start dtu debugging and running. To run automatically after power-on, just rename "dtu.py" to "main.py".
-
+
Figure 10: QPYCom run script
DTU runs successfully. In the "REPL" window of QPYcom, you can observe the following printout.
@@ -133,14 +133,14 @@ DTU runs successfully. In the "REPL" window of QPYcom, you can observe the follo
### System Diagram
-
+
Figure 12: DTU Solution System Diagram
Component Description:
- Various cloud objects: Inherit `modules.CloudObservable` and override corresponding methods, mainly to implement cloud initialization, connection and data sending and receiving functions.
- Subscriber: Inherit `modules.CloudObserver` and override corresponding methods, mainly to subscribe and receive message notifications from cloud objects, and call different executors according to message types for processing.
-- Executor: Mainly used for specific business processing, called by the subscriber. The default includes downlink executor (processing downlink data forwarding serial port), OTA upgrade executor (processing upgrade messages and triggering upgrades), and uplink executor (mainly used to process uplink data).
+- Executor: Mainly used for specific business processing, called by the subscriber. The default includes downlink executor (processing downlink data forwarding serial port), OTA upgrade executor (processing upgrade messages and triggering upgrades), and uplink executor (mainly used to process uplink data).
- Publisher: Mainly associated with cloud objects, used to publish data to the cloud.
Component Collaboration Process:
@@ -150,7 +150,7 @@ Component Collaboration Process:
- The downlink data executor needs to add a serial port object to process downlink messages - forwarded through the serial port.
- OTA upgrade executor needs to implement specific upgrade business process.
- Create cloud object - Support Alibaba Cloud, Tencent Cloud, MQTT, etc., import and use according to actual business needs.
-- Create subscriber.
+- Create subscriber.
- The cloud object adds the subscriber as its observer.
- Subscribers can have multiple, corresponding to multi-channel downlink message processing.
- Create publisher.
@@ -177,7 +177,7 @@ Component Collaboration Process:
In the design of the DTU solution, a cloud class object (`Socket` and `MqttIot`) is an **observable**, which will **notify** `RemoteSubscribe` (subscriber, **an observer**) when there is downlink data. , and `RemoteSubscribe` will call different **executors** for processing according to different businesses.
-### Component Class Design and Interaction
+### Component Class Design and Interaction
#### Class Inheritance
@@ -188,7 +188,6 @@ graph TD;
CloudObservable[CloudObservable]
CloudObservable --> MqttIot[MqttIot]
CloudObservable --> AliYunIot[AliYunIot]
-CloudObservable --> HuaweiIot[HuaweiIot]
CloudObservable --> Socket[Socket]
CloudObservable --> TXYunIot[TXYunIot]
```
@@ -198,9 +197,9 @@ CloudObservable --> TXYunIot[TXYunIot]
- init: cloud initialization
- addObserver: Add an observer object
-- delObserver: Remove an observer object
+- delObserver: Remove an observer object
- notifyObservers: Notify all observers
-- through_post_data: transparent data publishing
+- through_post_data: transparent data publishing
- post_data: cloud message publishing
- ota_request: publish OTA upgrade request on cloud
- ota_action: execute upgrade action
@@ -208,7 +207,7 @@ CloudObservable --> TXYunIot[TXYunIot]
##### Subscriber Class Inheritance Diagram
```mermaid
-graph TD;
+graph TD;
CloudObserver[CloudObserver] --> RemoteSubscribe[RemoteSubscribe]
```
@@ -221,7 +220,7 @@ CloudObserver[CloudObserver] --> RemoteSubscribe[RemoteSubscribe]
- `execute`: When notified, this method is called to perform specific business processing procedures. (Use different executors to handle different businesses, define 2 types of executors in this class object: `__executor` (ordinary executor), `__ota_executor` (dedicated to executing OTA upgrade executor))
- `add_executor`: Add executor.
-#### Downlink Data Processing
+#### Downlink Data Processing
Downlink data processing sequence diagram:
@@ -229,7 +228,7 @@ Downlink data processing sequence diagram:
sequenceDiagram
Title: Device downlink data processing timing
-participant cloud as Cloud[mqtt]
+participant cloud as Cloud[mqtt]
participant mqtt as MqttIot
participant rs as RemoteSubscribe
participant executor as Executor
@@ -240,7 +239,7 @@ mqtt -->> rs: add observer
rs -->> rs: Waiting for notification
cloud ->> mqtt: downlink data
-mqtt ->> rs: notify observer(carrying downlink data)
+mqtt ->> rs: notify observer(carrying downlink data)
rs ->> executor: call executor
```
@@ -253,7 +252,7 @@ For example, when there is downlink data, if it is transparent data, the `Downli
#### Uplink Data Processing
-Uplink data processing sequence diagram:
+Uplink data processing sequence diagram:
```mermaid
sequenceDiagram
@@ -261,13 +260,13 @@ Title: Device uplink data processing timing
participant cloud as Cloud[mqtt]
-participant mqtt as MqttIot
+participant mqtt as MqttIot
participant rp as RemotePublish
participant executor as UplinkTransaction
mqtt -->> cloud: connect cloud & subscribe
-rp -->> mqtt: add cloud
+rp -->> mqtt: add cloud
executor -->> rp: add publisher
executor -->> executor: read serial data
@@ -282,7 +281,7 @@ mqtt ->> cloud: uplink data
This solution defines one type of uplink data executor:
-- `UplinkTransaction`: Uplink data executor, used to receive serial port data and upload it to the cloud.
+- `UplinkTransaction`: Uplink data executor, used to receive serial port data and upload it to the cloud.
- Main attributes:
- `__remote_pub`: Remote publisher, used to upload data to the cloud. It is an object of class `modules.remote.RemotePublish`.
- `__serial`: Serial port object, used for serial port data sending and receiving. Defined in `modules.serial.Serial`.
@@ -291,7 +290,7 @@ This solution defines one type of uplink data executor:
## User Guide
-### Write Configuration File
+### Write Configuration File
DTU configuration file path: `code/dtu_config.json`.
@@ -301,7 +300,7 @@ Make the following configurations based on private mqtt cloud:

-- Private mqtt cloud configuration
+- Private mqtt cloud configuration

@@ -325,40 +324,40 @@ The following methods are defined in the `Dtu` class, as described below (see co
```python
class Dtu(Singleton):
-
+
def __init__(self):
# Define a timer to periodically check OTA upgrade plan
- self.__ota_timer = osTimer()
+ self.__ota_timer = osTimer()
# OTA upgrade executor, used to perform OTA upgrade related operations
self.__ota_transaction = None
-
+
def __cloud_init(self, protocol):
# Initialize cloud object and connect to cloud according to protocol
# This parameter corresponds to config item `system_config.cloud`
pass
-
+
def __periodic_ota_check(self, args):
# Periodically check OTA upgrade plan
pass
-
+
def start(self):
# Initialize DTU and start services
pass
```
-#### Application Service Initialization Process Description
+#### Application Service Initialization Process Description
After the `start` function is called, the DTU application service is initialized and various services are started.
Initialization process:
- Load system configuration
-- Create serial communication object (`usr.modules.serial.Serial`)
+- Create serial communication object (`usr.modules.serial.Serial`)
- Create cloud object (`usr.modules.mqttIot.MqttIot` or other cloud objects)
- Create GUI tool communication object (`usr.modules.dtu_transaction.GuiToolsInteraction`)
- Create uplink data executor (`usr.modules.dtu_transaction.UplinkTransaction`)
-- Create downlink data executor (`usr.modules.dtu_transaction.DownlinkTransaction`)
+- Create downlink data executor (`usr.modules.dtu_transaction.DownlinkTransaction`)
- Create OTA upgrade executor (`usr.modules.dtu_transaction.OtaTransaction`)
- Create subscriber (`usr.modules.remote.RemoteSubscribe`)
- Create publisher (`usr.modules.remote.RemotePublish`)
@@ -373,12 +372,12 @@ Detailed description of process steps:
from usr.settings import settings
```
-`settings` is a global configuration file (`Settings`) object, corresponding to the `/usr/dtu_config.json` configuration file parameters, persisted in json format.
+`settings` is a global configuration file (`Settings`) object, corresponding to the `/usr/dtu_config.json` configuration file parameters, persisted in json format.
Methods:
- `get`: Get all current configuration parameters (i.e. dict type data imported from json file)
-- `set(opt, val)`: Set configuration item `opt` to parameter `val`.
+- `set(opt, val)`: Set configuration item `opt` to parameter `val`.
- `save`: Persistently save configuration.
- `remove`: Delete configuration file.
- `reset`: Restore default configuration.
@@ -401,9 +400,9 @@ serial = Serial(int(uart_setting.get("port")),
`serial` is a serial communication object (`Serial`).
-Methods:
+Methods:
-- `write(data)`: Pass in written data bytes.
+- `write(data)`: Pass in written data bytes.
- `read(n, timeout)`: Read n bytes from serial port, timeout is timeout.
(3) Create cloud object
@@ -412,7 +411,7 @@ The `Dtu.__init_cloud` method is used to create a cloud object (create different
```python
class Dtu(object):
-
+
def __init_cloud(self, protocol):
if protocol == 'mqtt':
cloud_config = settings.current_settings.get("mqtt_private_cloud_config")
@@ -433,7 +432,7 @@ class Dtu(object):
else:
# Omitted, refer to `code/dtu.py` for other cloud object initialization
pass
-
+
def start(self):
# ...
cloud = self.__cloud_init(settings.current_settings["system_config"]["cloud"])
@@ -447,9 +446,9 @@ Methods:
- `addObserver`: Add observer object, used by the cloud to handle it after receiving downlink data.
- Subscriber: When receiving cloud notification (carrying downlink data), call executor to process.
-(4) Create GUI tool communication object
+(4) Create GUI tool communication object
-```python
+```python
gui_tool_inter = GuiToolsInteraction()
```
@@ -464,7 +463,7 @@ Methods:
```python
up_transaction = UplinkTransaction()
up_transaction.add_module(serial)
-up_transaction.add_module(gui_tool_inter)
+up_transaction.add_module(gui_tool_inter)
```
Methods:
@@ -475,14 +474,14 @@ Methods:
- Publisher object, publish data to cloud through this object.
- `uplink_main`: Read serial port data, and use GUI object to parse (if it is instruction data, process instruction operation, if it is uplink data, forward it to cloud).
-(6) Create downlink data executor
+(6) Create downlink data executor
```python
down_transaction = DownlinkTransaction()
down_transaction.add_module(serial)
```
-Methods:
+Methods:
- `add_module`: Add module object
- Serial port object: Downlink executor forwards downlink data through serial port object.
@@ -491,17 +490,17 @@ Methods:
(7) Create OTA upgrade executor
```python
-ota_transaction = OtaTransaction()
+ota_transaction = OtaTransaction()
```
Methods:
- `ota_check`: Check OTA upgrade plan
-- `event_ota_plain`: Respond to upgrade plan (verify parameters and start upgrade process after receiving issued upgrade plan)
+- `event_ota_plain`: Respond to upgrade plan (verify parameters and start upgrade process after receiving issued upgrade plan)
- `add_module`: Add module object
- Publisher object: Report upgrade status or actively request upgrade plan through the publisher object.
-(8) Create subscriber
+(8) Create subscriber
```python
remote_sub = RemoteSubscribe()
@@ -515,7 +514,7 @@ Methods:
- `add_executor`: Add executor.
- Downlink executor: Forward data through serial port.
- OTA upgrade executor: Parse downlink upgrade message and process upgrade request.
-
+
(9) Create publisher
@@ -523,23 +522,23 @@ Methods:
remote_pub = RemotePublish()
remote_pub.add_cloud(cloud)
up_transaction.add_module(remote_pub)
-ota_transaction.add_module(remote_pub)
+ota_transaction.add_module(remote_pub)
```
Methods:
- `add_cloud`: Add cloud object, use this cloud object to publish messages.
-(10) Start timer to periodically check OTA upgrade plan
+(10) Start timer to periodically check OTA upgrade plan
```python
# Check upgrade plan every 600 seconds
-self.__ota_timer.start(1000 * 600, 1, self.__periodic_ota_check)
+self.__ota_timer.start(1000 * 600, 1, self.__periodic_ota_check)
```
(11) Create service thread to continuously read serial port data, parse and upload to cloud
-```python
+```python
# Start uplink transaction
_thread.start_new_thread(up_transaction.uplink_main, ())
```
diff --git a/docs/Application_guide/en/system/memory-device.md b/docs/Application_guide/en/system/memory-device.md
index e814e27a8170a00386a889570051f23df1b5c605..79bcd785deaf1d18e78299a26ee63ba8b9ca14e0 100644
--- a/docs/Application_guide/en/system/memory-device.md
+++ b/docs/Application_guide/en/system/memory-device.md
@@ -205,7 +205,7 @@ When the firmware is flashing, different partition processing methods are used f
#### Mass Production Firmware
-The reason for generating mass production firmware is that the official firmware released by QuecPython only includes the programs of the platform layer and the QuecPython adaptation layer. Users need to use the QuecPython Modules API and write programs in Python to implement the complete functionality of the application. These Python programs need to be stored in the user file system partition and user file backup system partition in the form of files. During the debugging phase, flash the user files to the device's user file system partition through QPYcom download script function. However, during mass production, to improve efficiency, the debugged files need to be packaged into the QuecPython official firmware in advance, so that the QuecPython official firmware and user files can be flashed into the device together. The general steps are as follows. When the device leaves the factory, it has the default firmware that does not include QuecPython related features. Users need to flash the firmware officially released by QuecPython, and after developing and debugging the user application functions based on the QuecPython module, package the user's script files and QuecPython firmware into one firmware. This firmware is then flashed into all devices as the final mass production firmware. For details on generating the mass production firmware, see [Combination of Firmware and Script](https://my.qpy.wiki/doc/Application_guide/en/dev-tools/QPYcom/qpycom-merge.html#Combine-Firmware-and-Script).
+The reason for generating mass production firmware is that the official firmware released by QuecPython only includes the programs of the platform layer and the QuecPython adaptation layer. Users need to use the QuecPython Modules API and write programs in Python to implement the complete functionality of the application. These Python programs need to be stored in the user file system partition and user file backup system partition in the form of files. During the debugging phase, flash the user files to the device's user file system partition through QPYcom download script function. However, during mass production, to improve efficiency, the debugged files need to be packaged into the QuecPython official firmware in advance, so that the QuecPython official firmware and user files can be flashed into the device together. The general steps are as follows. When the device leaves the factory, it has the default firmware that does not include QuecPython related features. Users need to flash the firmware officially released by QuecPython, and after developing and debugging the user application functions based on the QuecPython module, package the user's script files and QuecPython firmware into one firmware. This firmware is then flashed into all devices as the final mass production firmware. For details on generating the mass production firmware, see [Combination of Firmware and Script](../dev-tools/QPYcom/qpycom-merge.md).
### Common Applications of Internal Storage
diff --git a/docs/Application_guide/zh/dev-tools/DTU-Tool/README.md b/docs/Application_guide/zh/dev-tools/DTU-Tool/README.md
index 3d968ab61a0eacd57764d557f1837c6cdb41e16e..65d9b4a840365ff4fb2c5735252807da7656f3b0 100644
--- a/docs/Application_guide/zh/dev-tools/DTU-Tool/README.md
+++ b/docs/Application_guide/zh/dev-tools/DTU-Tool/README.md
@@ -21,7 +21,7 @@ DTU工具的功能有两大类:
| 设备重启 | 重启DTU设备 |
| 获取当前参数 | 获取DTU设备当前的配置参数,并跳转到参数配置和展示界面 |
| 恢复出厂参数 | 恢复出厂参数并重启DTU设备 |
-| 保存所有设置参数 | 系统配置参数:云平台类型、固件升级、脚本升级、历史数据存储
串口参数配置:串口号、波特率、数据位、校验位、停止位、流控、R485
云参数配置:华为云、阿里云、腾讯云、Mqtt私有云、Socket私有云 |
+| 保存所有设置参数 | 系统配置参数:云平台类型、固件升级、脚本升级、历史数据存储
串口参数配置:串口号、波特率、数据位、校验位、停止位、流控、R485
云参数配置:阿里云、Mqtt私有云、Socket私有云 |
### 查询IMEI号
@@ -71,7 +71,7 @@ DTU工具的功能有两大类:
| **参数名** | **含义** |
| ------------------ | ------------------------------------------------------------ |
-| 云平台通道类型 | 云平台选择,可选项:`阿里云`、`腾讯云`、`华为云`、`移远云`、`TCP私有云`、`MQTT私有云` |
+| 云平台通道类型 | 云平台选择,可选项:`阿里云`、`TCP私有云`、`MQTT私有云` |
| 固件升级 | 是否开启固件OTA升级 |
| 脚本升级 | 是否开启项目脚本OTA升级 |
| 历史数据存储 | 当通信异常,DTU无法向云端发送数据时,将发送数据保存,待通信恢复正常后重新发送 |
diff --git a/docs/Application_guide/zh/network-comm/net-protocols/tcp-udp.md b/docs/Application_guide/zh/network-comm/net-protocols/tcp-udp.md
index 5fd09d33f0afa581f254831c5801b29f82508d62..2d22b75a70cdcb0be769ba63edafccb2ca7fcf08 100644
--- a/docs/Application_guide/zh/network-comm/net-protocols/tcp-udp.md
+++ b/docs/Application_guide/zh/network-comm/net-protocols/tcp-udp.md
@@ -151,23 +151,23 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Connect to the TCP server
sock.connect((address, port))
print('tcp link established: %s, %s' % (address, port))
-
+
# Package user data
data = 'GET / HTTP/1.1\r\n'
data += 'Host: ' + address + ':' + str(port) + '\r\n'
data += 'Connection: close\r\n'
data += '\r\n'
data = data.encode()
-
+
# Send the data
sock.send(data)
print('<-- send data:')
print(data)
-
+
# Receive the data
print('--> recv data:')
while True:
@@ -269,27 +269,27 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Domain name resolution
sockaddr = usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('tcp link established.')
-
+
# Package user data
data = 'GET / HTTP/1.1\r\n'
data += 'Host: ' + address + ':' + str(port) + '\r\n'
data += 'Connection: close\r\n'
data += '\r\n'
data = data.encode()
-
+
# Send the data
sock.send(data)
print('<-- send data:')
print(data)
-
+
# Receive the data
print('--> recv data:')
while True:
@@ -371,7 +371,7 @@ def _client_conn_proc(conn, ip_addr, port):
# Receive data sent by the client
data = conn.recv(1024)
print('[server] [client addr: %s, %s] recv data:' % (ip_addr, port), data)
-
+
# Send data back to the client
conn.send(data)
except:
@@ -384,20 +384,20 @@ def tcp_server(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP_SER)
print('[server] socket object created.')
-
+
# Bind the server IP address and port
sock.bind((address, port))
print('[server] bind address: %s, %s' % (address, port))
-
+
# Listen for client connection requests
sock.listen(10)
print('[server] started, listening ...')
-
+
while True:
# Accept a client connection request
cli_conn, cli_ip_addr, cli_port = sock.accept()
print('[server] accept a client: %s, %s' % (cli_ip_addr, cli_port))
-
+
# Create a new thread for each client connection for concurrent processing
_thread.start_new_thread(_client_conn_proc, (cli_conn, cli_ip_addr, cli_port))
```
@@ -414,24 +414,24 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('[client] socket object created.')
-
+
# Connect to the TCP server
print('[client] connecting: %s, %s' % (address, port))
sock.connect((address, port))
print('[client] connected.')
-
+
data = b'1234567890'
while True:
try:
# Send data to the server
sock.send(data)
print('[client] send data:', data)
-
+
# Read the data sent back by the server
data = sock.recv(1024)
print('[client] recv data:', data)
print('[client] -------------------------')
-
+
# Delay for 1 second
utime.sleep(1)
except:
@@ -453,18 +453,18 @@ if __name__ == '__main__':
stage, state = checkNet.waitNetworkReady(30)
if stage == 3 and state == 1: # Network connection is normal
print('[net] Network connection successful.')
-
+
# Get the IP address of the module
server_addr = dataCall.getInfo(1, 0)[2][2]
server_port = 80
-
+
# Start the server thread to listen for client connection requests
_thread.start_new_thread(udp_server, (server_addr, server_port))
-
+
# Delay for a while to ensure that the server starts successfully
print('sleep 3s to ensure that the server starts successfully.')
utime.sleep(3)
-
+
# Start the client
udp_client(server_addr, server_port)
else:
@@ -544,16 +544,16 @@ def udp_server(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM, usocket.IPPROTO_UDP)
print('[server] socket object created.')
-
+
# Bind server IP address and port
sock.bind((address, port))
print('[server] bind address: %s, %s' % (address, port))
-
+
while True:
# Read client data
data, sockaddr = sock.recvfrom(1024)
print('[server] [client addr: %s] recv data: %s' % (sockaddr, data))
-
+
# Send data back to the client
sock.sendto(data, sockaddr)
@@ -561,37 +561,37 @@ def udp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM, usocket.IPPROTO_UDP)
print('[client] socket object created.')
-
+
data = b'1234567890'
while True:
# Send data to the server
sock.sendto(data, (address, port))
print('[client] send data:', data)
-
+
# Read data sent back from the server
data, sockaddr = sock.recvfrom(1024)
print('[client] [server addr: %s] recv data: %s' % (sockaddr, data))
print('[client] -------------------------')
-
+
# Delay for 1 second
utime.sleep(1)
-
+
if __name__ == '__main__':
stage, state = checkNet.waitNetworkReady(30)
if stage == 3 and state == 1: # Network connection is normal
print('[net] Network connection successful.')
-
+
# Get the IP address of the module
server_addr = dataCall.getInfo(1, 0)[2][2]
server_port = 80
-
+
# Start the server thread
_thread.start_new_thread(udp_server, (server_addr, server_port))
-
+
# Delay for a while to ensure that the server starts successfully
print('sleep 3s to ensure that the server starts successfully.')
utime.sleep(3)
-
+
# Start the client
udp_client(server_addr, server_port)
else:
@@ -678,20 +678,20 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('socket object created.')
-
+
# Bind the Ethernet NIC IP address after creating the socket object and before connecting to the server
local_address = ip_conf[1][1]
sock.bind((local_address, 0))
print('bind ethernet address: %s', local_address)
-
+
# Resolve the domain name
sockaddr=usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('tcp link established.')
-
+
# More code in TCP client samples above
```
@@ -772,20 +772,20 @@ def tcp_client(address, port):
# Create a socket object
sock = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM, usocket.IPPROTO_TCP)
print('Socket object created.')
-
+
# Before connecting to the server, bind the Wi-Fi NIC IP address
local_address = ip_conf[0]
sock.bind((local_address, 0))
print('Bind ethernet address: %s', local_address)
-
+
# Resolve the domain name
sockaddr=usocket.getaddrinfo(address, port)[0][-1]
print('DNS for %s: %s' % (address, sockaddr[0]))
-
+
# Connect to the TCP server
sock.connect(sockaddr)
print('TCP link established.')
-
+
# More code in TCP client samples above
```
diff --git a/docs/Application_guide/zh/network-comm/nic/cellular/application.md b/docs/Application_guide/zh/network-comm/nic/cellular/application.md
index 89dc5d75d166d83845b04d4602332a83f5a3d2db..cb8b2f6e7ff59efa6d3e6fb1675a1aa4dd3bdcf9 100644
--- a/docs/Application_guide/zh/network-comm/nic/cellular/application.md
+++ b/docs/Application_guide/zh/network-comm/nic/cellular/application.md
@@ -320,7 +320,7 @@ def main():
sock2.bind((ip_nic2, 0))
sock2.settimeout(10)
# 配置服务器IP和端口,下面的IP和端口仅作示例参考
- server_addr = ('220.180.239.212', 8305)
+ server_addr = ('192.0.2.2', 8305)
# 建立连接
sock2.connect(server_addr)
# 向服务器发送消息
@@ -641,7 +641,7 @@ def main():
sock2.bind((ip_nic2, 0))
sock2.settimeout(10)
# 服务器IP和端口,下面的IP和端口仅作示例参考
- server_addr = ('220.180.239.212', 8305)
+ server_addr = ('192.0.2.2', 8305)
# 建立连接
sock2.connect(server_addr)
# 向服务器发送消息
diff --git a/docs/Application_guide/zh/solutions/tracker/README.md b/docs/Application_guide/zh/solutions/tracker/README.md
index a12333d7b126bbad73873680c4727e5d4a19f3eb..cc23b17cd4798118f2f4cc14454c3cd6681adbb3 100644
--- a/docs/Application_guide/zh/solutions/tracker/README.md
+++ b/docs/Application_guide/zh/solutions/tracker/README.md
@@ -256,7 +256,7 @@ gps_cfg = {
}
cell_cfg = {
- "serverAddr": "www.queclocator.com",
+ "serverAddr": "www.xxxxx.com",
"port": 80,
"token": "xxxxxxxxxx",
"timeout": 3,
diff --git a/docs/FAQ/zh/hardware/cellLocator.md b/docs/FAQ/zh/hardware/cellLocator.md
index c7f5cc8f05848eb6de66e1f9be32680d909df26b..601c99c82645c7a94c6be6d026e4663050011584 100644
--- a/docs/FAQ/zh/hardware/cellLocator.md
+++ b/docs/FAQ/zh/hardware/cellLocator.md
@@ -2,7 +2,7 @@
### **如何使用基站定位**
-需要申请Token,[QuecLocator基站定位Token申请指南](https://mp.weixin.qq.com/s/JZF3vURe61_kZDZGKBzxXw ),然后调用[cellLocation](https://python.quectel.com/doc/API_reference/zh/gnsslib/cellLocator.html)实现基站定位。
+需要申请Token,[基站定位Token申请指南](https://mp.weixin.qq.com/s/JZF3vURe61_kZDZGKBzxXw ),然后调用[cellLocation](https://python.quectel.com/doc/API_reference/zh/gnsslib/cellLocator.html)实现基站定位。
### **基站定位原理**
@@ -21,7 +21,7 @@
- 3- 密钥长度错误,必须为16字节
- 4-超时时长超出范围,支持的范围(1 ~ 300)s
- 5-指定的PDP网络未连接,请确认PDP是否正确
-- 6-获取坐标出错。
+- 6-获取坐标出错。
### **移远官方的基站定位能在国外使用吗**
diff --git a/docs/Getting_started/en/wifi-dev.md b/docs/Getting_started/en/wifi-dev.md
index 4a541c1864f902ca22254deedce003a15919fe76..8cc14c5f09b57ef4851eae3f1625610a33cb3fb2 100644
--- a/docs/Getting_started/en/wifi-dev.md
+++ b/docs/Getting_started/en/wifi-dev.md
@@ -332,8 +332,8 @@ while True:
elif event['id'] == 3305: # When an IP address is obtained, print IP address information and start the TCP client
print("- Got IP:", nic.ifconfig())
print("- Start TCP client.")
- # The address and port of the TCP server are '112.31.84.164' and '8305' respectively
- tcp_echo_client('112.31.84.164', 8305)
+ # The address and port of the TCP server are '192.0.2.2' and '8305' respectively
+ tcp_echo_client('192.0.2.2', 8305)
```
#### TCP Client Code Implementation
diff --git a/docs/Getting_started/zh/wifi-dev.md b/docs/Getting_started/zh/wifi-dev.md
index 995222829b7e705c01fc5564bc2bbf1aa7795e8d..7d81074096ddb83c9812fc88e15f6fcb1f307834 100644
--- a/docs/Getting_started/zh/wifi-dev.md
+++ b/docs/Getting_started/zh/wifi-dev.md
@@ -332,8 +332,8 @@ while True:
elif event['id'] == 3305: # 当获取到 IP 地址时,打印 IP 地址相关信息,并启动 TCP 客户端
print("- Got IP:", nic.ifconfig())
print("- Start TCP client.")
- # TCP 服务器的地址和端口分别为 `112.31.84.164` 和 `8305`
- tcp_echo_client('112.31.84.164', 8305)
+ # TCP 服务器的地址和端口分别为 `192.0.2.2` 和 `8305`
+ tcp_echo_client('192.0.2.2', 8305)
```
#### TCP 客户端代码编写