1. Test circuit
CM3 16 1 provides totally isolated RS232, RS485 and TTL serial interfaces. Users can choose the appropriate interface to configure the equipment according to the actual situation. This demonstration uses RS-485 interface for debugging and data transceiver.
When we do dynamic domain name resolution, we need a domain name service. At present, many service providers provide this service. We suggest that customers purchase the domain name service of peanut shell enterprises, and a domain name account will be allocated after purchase.
CM3 16 1 You need to use DTU configuration tool (which can be downloaded directly from Zhiyuan official website) to configure corresponding parameters, mainly including SIM card number, working mode, number of data centers, domain name of main station, port number, etc. The specific parameters are shown in Figure 2 below. The peanut shell domain name purchased before the domain name is used is randomly written as 4 123.
After the configuration is completed, pay attention to submitting changes and exit the configuration state in time.
L domain name resolution settings
Now all wireless routers on the market can set up domain name resolution. This test takes Huawei WS832 as an example for debugging. First log in to the router settings page, as shown in Figure 3 below. This is the main interface.
Select the last item "More Functions" in the above menu, select the dynamic domain name server DDNS to open, select oray (Peanut Shell Company) as the service provider, and log in the purchased domain name and account information, as shown in Figure 4 below.
Then select the following security settings, click NAT service to set port mapping, as shown in Figure 5 below, and add port mapping.
Add any information service name, and select the device as the host name of the server. Please note that it is a device that successfully joined this wireless router network. Before configuring DTU, the port number (4 123) was selected for internal and external ports.
Save and exit.
L server establishment
After the port mapping is completed, establish a TCP server and use TCP & amp; UDP test tool (directly downloaded from Zhiyuan official website), select Create Server, select 4 123 as the local port, confirm, and then start the server, as shown in Figure 7 below.
TCP server establishment
Using the serial debugging assistant, you can observe the information read when the device is powered on and configured, and the printed information is basically shown in Figure 8 below.
After starting the server, the device will automatically connect to the data center, which means that the data center has been successfully run.
Serial Assistant Printing Device Information
After the data center is successfully connected, the TCP test tool interface is shown in Figure 9 below.
Successfully connected to the server.
2. Data transmission
After the device is connected successfully, data transmission can be carried out. Open the sscom serial debugging tool, select RS-485 as the serial port and convert it into the port number corresponding to USB, and keep the baud rate consistent. Select hexadecimal display and send.
The TCP/UDP configuration also selects hexadecimal display and transmission. First, we test RS-485 to transmit data, and GPRS to the server. The following figure 10 shows the test chart.
Of course, CM3 16 1 also supports data return. The server sends it to ZWD-35B module through GPRS signal, and the module sends it to the computer through serial port.
At present, CM3 16 1 is widely used in power system, industrial monitoring, traffic management, meteorology, water treatment, environmental monitoring, financial securities, coal mine, petroleum and other industries. With its high-speed data transmission capability and stable product performance, it can be described as "the high-end machine in industrial mobile phones".