Design of embedded TCP&IP scheme based on WCDMA 3G communication module im506p

Source: Internet
Author: User


I. SUMMARY of programme ISSUES
The popularization of mobile Internet and the development of smart home, the development of the IoT, more and more small devices, offline devices need to connect to the Internet to form an interconnection, and service providers to provide more powerful updates service. But ordinary small equipment are low-cost very simple microcontroller-based chip, do not have the Internet function, it is not possible to run in a single-chip TCP/IP protocol stack, thus, 3G module with embedded TCP/IP protocol stack and provide a single chip microcomputer transceiver data, SCM only need to provide a serial port, And the data to be sent through the serial port to send out, 3G module is responsible for data transmission to the public network designated host, so that the single-chip computer access to the Internet.
Today's topic, we choose im506p as the core element, im506p is Freedom Core communication production, in the car/mobile terminal/pos payment and other industrial applications a very wide range of modules, stable performance, interface and business functions, is we choose it as the main element of the object of the reason.
This topic is intended to guide more Internet factors into the Internet, stimulate more practical business applications and promote the development of the industry.
If you want to know the module specifications, you can download it by yourself or search the Web for download.
Second, the main characteristics
With embedded TCP/IP IM506, through the serial port and the microcontroller connected as a whole, b/s architecture, the microcontroller can be used as a normal client to connect to the cloud server, and the server to send and receive data, and to maintain the heartbeat of the cloud service area, the link protocol supports TCP and UDP, At the same time, the maximum 5-way socket link can be maintained with 5 servers simultaneously, and the MCU can be used as a TCP server or a UDP server, and other clients can connect to it for charging data and the function is very powerful.
The following verification process will be presented.

Third, the test topology map






Four, TCP&UDP server host environment construction
This test environment is a router to establish the local area network host and public network connection, by setting the NAT of the router to map the public network port to the LAN port, so that the public network host can access the internal network TCP&UDP server host.

1. Get Native LAN IP information



2. Increase NAT Port Mappings
Telecomadmin Password ne7ja%5m

3. Running the service Management program
Run TCP-UDP service Management V1.03.exe if the following warning point appears.


4. TCP Server Host Settings
where automatic reply box and transparent reply/Data reply must be received after the first time to allow the selection of data. The first time you receive the data, you can set it according to your needs.


5. UDP Server Host Settings

After setting, click Listen, as follows. The Automatic reply check box and the transparent reply/data reply can be set according to your own needs.



6. Get the server host public network IP
The most simple way to obtain the public network IP of the local area network of TCP&UDP server host is direct Baidu IP.

Five, 3G module client Preparation
1. Snap the relink 3G module into the Development Board
2. Insert the Unicom 3G card into the Development Board
3. Serial cable to connect the Development Board and PC computer
Power on the 3G module, send at To view the status of the network, the following is OK

Vi. TCP protocol Testing
(i) Normal mode
1.3G module sends data to TCP host

2. The TCP server host receives the data sent by the 3G module

Options such as auto-reply and transparent reply can now be manipulated

(ii) Transmission mode
3. Set to pass mode
The pass/Normal mode must be configured before the +enetinit network link is established, and UDP is the same.


4. Data transmission and reception in the transmission mode

5. Receiving and sending data from the server

6. Send "+ + +" to exit the transmission mode

7. Turn off the network


(iii) Multi-client mode
8. Start multiple TCP servers.
For example, ports are 6801 and 6802.

9. Client Socket Connection established
The maximum number of 0~9 client sockets is supported.

10. Client 0 sends and receives TCP data

A. TCP server host receives TCP data for client 0 and replies

12. Client 1 sends and receives TCP data

TCP server host receives TCP data for client 1 and replies

14. Close the socket and shut down the network


Seven, UDP protocol test
(i) Normal mode
1.3G module sends data to UDP host

2. The UDP server host receives the data sent by the 3G module

3. Close the link

(ii) Multi-client mode

4. Start multiple UDP servers.
For example, ports are 7001 and 7002.

5. Client Socket link Creation
The maximum number of 0~9 client sockets is supported.

6. Client 0 sends and receives UDP data

7. The UDP server host receives UDP data for client 0 and replies

8. Client 1 sends and receives UDP data

9. The UDP server host receives UDP data for client 1 and replies

10. Close the socket and close the network link




Viii. TCP&UDP Protocol Hybrid test
This scenario exists in multi-client mode.
1. Start multiple TCP&UDP servers.
For example, the ports are 6801 and 7001, respectively.

2. Client socket Connection established
The maximum number of 0~9 client sockets is supported.

3. Client 0 sends and receives TCP data

4. TCP server host receives TCP data for client 0 and replies

5. Client 1 sends and receives UDP data

6. The UDP server host receives UDP data for client 1 and replies

7. Close the socket connection and shut down the network

Ix. concluding remarks
This project, we have verified the embedded TCP/IP IM506, through the serial and MCU connected as a whole, b/s architecture, the microcontroller can be used as a normal client to connect to the cloud server, and the server to send and receive data, and to maintain the heartbeat of the cloud service area, the link protocol supports TCP and UDP, At the same time, the maximum 5-way socket link can be maintained with 5 servers simultaneously, and the MCU can be used as a TCP server or a UDP server, and other clients can connect to it for charging data and the function is very powerful.
It is very suitable for IoT access points, to expand products that break through traditional forms, develop more practical business functions, promote industry development, and provide people's living standard.
The successful completion of this topic, the module has been the original core communication support, especially the network and send and receive process above, making us take a lot of detours, especially thanks to technical support Mr. Huang, every time when we encounter bottlenecks difficult time, Mr. Huang remote came very quickly to solve the problem, our subject continues to go down, Mr. Huang Deep Technical foundation, solid communication technology is admirable.




Design of embedded TCP&IP scheme based on WCDMA 3G communication module im506p

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.