CN1741524A - MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting - Google Patents

MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting Download PDF

Info

Publication number
CN1741524A
CN1741524A CN 200510047169 CN200510047169A CN1741524A CN 1741524 A CN1741524 A CN 1741524A CN 200510047169 CN200510047169 CN 200510047169 CN 200510047169 A CN200510047169 A CN 200510047169A CN 1741524 A CN1741524 A CN 1741524A
Authority
CN
China
Prior art keywords
protocol
icp
tcp
protocol stack
mini
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510047169
Other languages
Chinese (zh)
Other versions
CN100367741C (en
Inventor
胡青
张淑芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian Maritime University
Original Assignee
Dalian Maritime University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian Maritime University filed Critical Dalian Maritime University
Priority to CNB2005100471693A priority Critical patent/CN100367741C/en
Publication of CN1741524A publication Critical patent/CN1741524A/en
Application granted granted Critical
Publication of CN100367741C publication Critical patent/CN100367741C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

A mini TCP / IP protocol stack based on monolithic computer short data packet transceiving is a simplified mini TCP / IP protocol stack including PPP protocol layer , IP layer , UDP protocol layer and TCP protocol layer . It can be operated on normal 8 bit 51 series monolithic computer and It can be connected to remote communication host to set up normal TCP / UDP connection for carrying out stable short data packet transceiving with byte less than 500 .

Description

A kind of implementation method of the MINI ICP/IP protocol stack based on single-chip microcomputer short packages transmitting-receiving
Technical field
The invention belongs to remote data communication control field, relate to the transfer of data and the single-chip microcomputer application of ICP/IP protocol stack in the network service.
Background technology
At the various device of many real-time control applications particularly in the mobile control device, short data newspaper transmitting-receiving based on TCP/IP (transmission control protocol/Internet Protocol) agreement is most widely used, but complicated ICP/IP protocol stack makes equipment cost increase considerably.
Summary of the invention
Purpose of the present invention just provides a kind ofly can move a kind of ICP/IP protocol stack of simplifying on common 8 51 series monolithics, to utilize Internet Network Transmission short data message, realize the Long-distance Control and the transfer of data of equipment.
The implementation method of a kind of SCM Based MINI TCP/IP, mainly be by realizing a kind of ICP/IP protocol stack of simplifying on the terminal equipment of forming by single-chip microcomputer 4 and communication module 51, this protocol stack is carried out by the common single-chip microcomputer in the terminal equipment 4, utilizes communication module 5 to set up TCP/IP through communication network 2 and telecommunication main frame 3 and is connected the line data transmission of going forward side by side.This MINI ICP/IP protocol stack mainly comprises ppp protocol layer, IP layer, udp layer, tcp protocol layer.Whole protocol stack can normally move on common 51 series monolithics, and this kind MINI ICP/IP protocol stack is fit to the data transmit-receive of the short packages of industrial remote control field≤500 bytes.Its connection procedure is as follows:
1. single-chip microcomputer 4 carries out self initial work,
2. detect and initialize communications module 5,
3. need to judge whether dialing, if turn to 4, if do not need dialing to turn to 7,
4. the LCP protocol negotiation of communication link configuration turns to 5 if consult configuration successful, otherwise turns to 2,
5. pap authentication is carried out in configuration according to LCP, if authentication success turns to 6, otherwise turns to 2,
6. obtain the IP address from authentication operator, turn to 7 if correctly obtain the IP address, otherwise turn to 2,
7. initiate connection request to telecommunication main frame 3, reply instruction and turn to 8 if receive connection request in the certain hour, otherwise turn to 2,
8. connect with telecommunication main frame 3
9. carry out transfer of data according to ICP/IP protocol,
10.TCP whether available, if turn to 9 to proceed data communication, otherwise turn to 2 if detecting connection.
In this simple MINI TCP/IP implementation method, comprise LCP bag configuration, pap authentication and NCP agreement in the ppp protocol layer, wherein the LCP bag includes only Async Control Character Map and Authentication Protocol, and Authentication Protocol has selected 0xc023 as configuration parameter.
In this simple MINI TCP/IP implementation method, in TCP/IP and the udp protocol, whole data packet length is controlled in 500 bytes.Flow control is not provided, the buffering area of suitable length only is provided,,, utilize the TCP/IP retransmission mechanism to ensure data integrity,, ensure data integrity by upper layer application protocol for udp protocol for ICP/IP protocol if any overflowing.Sliding window protocol adopts simple positive acknowledgement agreement, must postpone the transmission of next grouping before receiving the affirmation information of previous grouping.Cancel semi-closed state.Do not use icmp packet.
The beneficial effects of the utility model are to use simple 8 single-chip microcomputers to move this simple MINITCP/IP protocol stack.By the serial ports just directly long-range connection and the transfer of data of carrying out property data.Native system has that size of code is little, real-time is high, low cost and other advantages, can be widely used in the various teledatas control communications.
Description of drawings
Below in conjunction with drawings and Examples the utility model is further specified.
Fig. 1 is that the utility model terminal equipment and telecommunication main frame carry out the network service schematic diagram.
Fig. 2 utilizes the utility model to carry out the ICP/IP protocol communication flow diagram.
Embodiment
The following configuration of LCP configuration data connects:
Send:
7E?FF?7D?23?C0?21?7D?21?7D?21?7D?20?7D?2A?7D?22?7D?26?7D?20?7D?2A?7D?20?7D?20?22?7D?28?7E
7E?FF?7D?23?C0?21?7D?21?7D?22?7D?20?7D?2A?7D?22?7D?26?7D?20?7D?2A?7D?20?7D?20?25?DE?7E
7E?FF?7D?23?C0?21?7D?24?7D?21?7D?20?7D?28?7D?21?7D?24?7D?25?DC?30?56?7E
7E?FF?7D?23?C0?21?7D?22?7D?22?7D?20?7D?32?7D?22?7D?26?7D?20?7D?20?7D?20?7D?20?7D?27?7D?227D?28?7D?22?7D?23?7D?24?C0?23?CD?36?7E
Receive:
7E?FF?7D?23?C0?21?7D?21?7D?21?7D?20?7D?36?7D?21?7D?24?7D?25?DC?7D?22?7D?26?7D?20?7D?20?7D20?7D?20?7D?27?7D?22?7D?28?7D?22?7D?23?7D?24?C0?23?26?B4?7E
7E?FF?7D?23?C0?21?7D?22?7D?21?7D?20?7D?2A?7D?22?7D?26?7D?20?7D?2A?7D?20?7D?20?4B?7C?7E
7E?FF?7D?23?C0?21?7D?22?7D?22?7D?20?7D?2A?7D?22?7D?26?7D?20?7D?2A?7D?20?7D?20?4C?AA?7E
7E?FF?7D?23?C0?21?7D?21?7D?21?7D?20?7D?36?7D?21?7D?24?7D?25?DC?7D?22?7D?26?7D?20?7D?20?7D20?7D?20?7D?27?7D?22?7D?28?7D?22?7D?23?7D?24?C0?23?26?B4?7E
7E?FF?7D?23?C0?21?7D?21?7D?22?7D?20?7D?32?7D?22?7D?26?7D?20?7D?20?7D?20?7D?20?7D?27?7D?227D?287D?227D?237D?24?C0?23?F5?37?7E
The PAP configuration data is as follows:
Send:
7E?FF?7D?23?C0?23?7D?21?7D?23?7D?20?7D?24?E1?7D?36?7E
Receive:
7E?FF?7D?23?C0?23?7D?22?7D?23?7D?20?7D?2D?7D?28?57?65?6C?63?6F?6D?65?21?BF?5D?7E
The configuration data of IPCP bag is as follows:
Send:
7E?FF?7D?23?80?21?7D?21?7D?24?7D?20?7D?2A?7D?23?7D?26?7D?20?7D?20?7D?20?7D?20?7D?2B?5A?7E
7E?FF?7D?23?80?21?7D?22?7D?21?7D?20?7D?2A?7D?23?7D?26?C0?A8?6F?6F?DA?D3?7E
7E?FF?7D?23?80?21?7D?21?7D?25?7D?20?7D?2A?7D?23?7D?26?7D?20?7D?20?7D?20?7D?20?F6?7D?37?7E
7E?FF?7D?23?80?21?7D?21?7D?25?7D?20?7D?2A?7D?23?7D?26?7D?2A?30?22?52?E2?2C?7E
Receive:
7E?FF?7D?23?80?21?7D?21?7D?21?7D?20?7D?2A?7D?23?7D?26?C0?A8?6F?6F?B3?A7?7E
7E?FF?7D?23?80?21?7D?23?7D?24?7D?20?7D?2A?7D?23?7D?26?7D?2A?30?22?52?51?39?7E
7E?FF?7D?23?80?21?7D?23?7D?25?7D?20?7D?2A?7D?23?7D?26?7D?2A?30?22?52?AC?74?7E
7E?FF?7D?23?80?21?7D?22?7D?25?7D?20?7D?2A?7D?23?7D?26?7D?2A?30?22?52?8B?58?7E
It is as follows that TCP sets up link data:
Send:
7E?FF?03?00?21?45?00?00?2F?00?00?00?00?FF?06?E6?2D?0A?30?20?53?DA?3D?D0?DA?7D?33?88?7D?33?8A00?7D?5D?33?00?00?00?00?00?60?02?02?00?67?AA?00?00?02?04?01?00?03?03?00?0B?1B?7E
Receive:
7E?FF?03?00?21?45?00?00?2C?6A?3A?40?00?72?06?C8?F6?DA?3D?D0?DA?0A?30?20?53?7D?33?8A?7D?33?8865?2F?2B?A5?00?7D?5D?33?01?60?12?FF?FF?D7?66?00?00?02?04?05?64?24?7A?7E
Send:
7E?FF?03?00?21?45?00?00?28?00?01?00?00?FF?06?E6?33?0A?30?20?53?DA?3D?D0?DA?7D?33?88?7D?33?8A?00?7D5D?33?01?65?2F?2B?A6?50?10?02?00?EC?D3?00?00?EB?91?7E

Claims (3)

1. implementation method based on the MINI ICP/IP protocol stack of single-chip microcomputer short packages transmitting-receiving, it is characterized in that, be to realize a kind of ICP/IP protocol stack of simplifying by going up at terminal equipment (1), this protocol stack is carried out by the common single-chip microcomputer (4) in the terminal equipment, utilizes communication module (5) to set up TCP/IP through communication network (2) and telecommunication main frame (3) and is connected the line data transmission of going forward side by side; MINI ICP/IP protocol stack mainly comprises ppp protocol layer, IP layer, udp layer, tcp protocol layer; Whole protocol stack can normally move on common 51 series monolithics, and this kind MINI ICP/IP protocol stack is fit to the data transmit-receive of the short packages of industrial remote control field≤500 bytes; Its connection procedure is as follows:
1. single-chip microcomputer (4) carries out self initial work,
2. detect and initialize communications module (5),
3. need to judge whether dialing, if turn to 4, if do not need dialing to turn to 7,
4. the LCP protocol negotiation of communication link configuration turns to 5 if consult configuration successful, otherwise turns to 2,
5. pap authentication is carried out in configuration according to LCP, if authentication success turns to 6, otherwise turns to 2,
6. obtain the IP address from authentication operator, turn to 7 if correctly obtain the IP address, otherwise turn to 2,
7. initiate connection request to telecommunication main frame (3), reply instruction and turn to 8 if receive connection request in the certain hour, otherwise turn to 2,
8. connect with telecommunication main frame (3)
9. carry out transfer of data according to ICP/IP protocol,
10.TCP whether available, if turn to 9 to proceed data communication, otherwise turn to 2 if detecting connection.
2. the implementation method of a kind of MINI ICP/IP protocol stack based on single-chip microcomputer short packages transmitting-receiving according to claim 1, it is characterized in that, comprise LCP bag configuration, pap authentication and NCP agreement in the ppp protocol layer, wherein the LCP bag includes only Async Control Character Map and Authentication Protocol, and Authentication Protocol has selected 0xc023 as configuration parameter.
3. the implementation method of a kind of MINI ICP/IP protocol stack based on single-chip microcomputer short packages transmitting-receiving according to claim 1 is characterized in that in the ICP/IP protocol, whole data packet length is controlled in 500 bytes; The buffering area of suitable length is provided,,, utilizes the TCP/IP retransmission mechanism to ensure data integrity,, ensure data integrity by upper layer application protocol for udp protocol for ICP/IP protocol if any overflowing; Sliding window protocol adopts simple positive acknowledgement agreement, must postpone the transmission of next grouping before receiving the affirmation information of previous grouping; Cancel semi-closed state; Do not use icmp packet.
CNB2005100471693A 2005-09-06 2005-09-06 MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting Expired - Fee Related CN100367741C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100471693A CN100367741C (en) 2005-09-06 2005-09-06 MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100471693A CN100367741C (en) 2005-09-06 2005-09-06 MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting

Publications (2)

Publication Number Publication Date
CN1741524A true CN1741524A (en) 2006-03-01
CN100367741C CN100367741C (en) 2008-02-06

Family

ID=36093737

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100471693A Expired - Fee Related CN100367741C (en) 2005-09-06 2005-09-06 MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting

Country Status (1)

Country Link
CN (1) CN100367741C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247304B (en) * 2008-03-21 2011-01-26 清华大学 Plug and play method of family wireless control network
CN101714911B (en) * 2009-11-11 2013-06-12 北京交控科技有限公司 Communication-based data communication method of train operation control system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7142565B2 (en) * 2002-02-21 2006-11-28 Qualcomm, Incorporated Method and apparatus for radio link control of signaling messages and short messages data services in a communication system
CN2558012Y (en) * 2002-08-02 2003-06-25 鸿富锦精密工业(深圳)有限公司 TCP/IP protocol supported signal collector
CN2603582Y (en) * 2003-03-31 2004-02-11 青岛中天信息技术有限公司 Wireless data communication card

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247304B (en) * 2008-03-21 2011-01-26 清华大学 Plug and play method of family wireless control network
CN101714911B (en) * 2009-11-11 2013-06-12 北京交控科技有限公司 Communication-based data communication method of train operation control system

Also Published As

Publication number Publication date
CN100367741C (en) 2008-02-06

Similar Documents

Publication Publication Date Title
CN1700629A (en) Method for transmitting data in mobile ad hoc network and network apparatus using the same
CN1921438A (en) Method for realizing acceleration between networks by using proxy
CN1881916A (en) Method and apparatus for realizing communication between communication equipments
CN1339877A (en) Header label compressor and header label compressing method
CN1914843A (en) Handling of acknowledgement messages in terminal
CN1897513A (en) Series telecommunication of monolithic processor and monolithic unit control system
CN1780299A (en) System and method for remotely controlling a debugging unit
CN1866971A (en) Method and apparatus of data segmentation in a mobile communications system
CN101030864A (en) Method for transmitting data file between computer and mobile terminal
CN1753408A (en) Method for handling discarding of a sequence of service data units and communication apparatus
CN101035140A (en) File transmission system based on the SIP and MSRP and its method
CN1198410C (en) Retry control method and device
CN104219247A (en) Method for accessing IP network to wireless multimedia sensor network
CN101605128B (en) Method for carrying out communication by LINUX primary and secondary devices through Ethernet interface
CN1741524A (en) MINI TCP/IP protocol stack realizing method based on one chip processor short data pack receiving and transmitting
CN101043523A (en) Login method, system and proxy server of instant message server
CN1306753C (en) Method of realizing RS485 master slave multi machine communication using universal asynchronous recerver transmitter
CN1268069C (en) Method and system of controlling network communication of automation based on blue-tooth technique
CN109361723B (en) UDP (user Datagram protocol) effective message sending time sequence control method
CN1622553A (en) Internet standard file transmission protocol based file breakpoint upload method
CN1863140A (en) Method for improving network resource utilization ratio of wireless communication system
CN102325146A (en) Universal data exchange (UDX) protocol stack, and UDX-protocol-based data transmission system and method
CN1185805C (en) Packet communication method, nodal equipment and packet communication system
EP2077653B1 (en) Methods and systems for communicating with storage systems using slim IP stacks
CN1642142A (en) Multimedia communication device using software and hardware protocol stacks and communication method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080206

Termination date: 20150906

EXPY Termination of patent right or utility model