• PC104 computer network communication system design and research

    Abstract: This article introduced embedded PC104 computer’s UDP network communication realizes the base principle based on the DOS operating system, proposed with emphasis how to solve not reliably, must faces the connection the UDP communication to lose the frame question. Has given in the actual some fire control system the UDP network communication hardware design and the partial software code, the related flow chart.
    Key word: DOS; Embedded PC104 computer; TCP; UDP; SOCKET; Loses the frame

    1. introduction

      Along with in the Internet technology’s swift development as well as the systems engineering enhancement which to aspects and so on embedded computer’s volume, power loss, hardware expenses requests, the embedded computer not only need realize the sole serial data transmission, but must realize the network communication. The DOS operating system is specially small by its essence, the simplicity of operator, the technology mature and so on merits enable it to hold the important status in the embedded operating system domain. But, the DOS operating system does not have in the Windows operating system Winsock such API, causes the network communication the development work load and the difficulty is relatively big, below introduced that in some fire control system based on DOS operating system’s UDP network communication software and hardware system design, and while guarantees UDP merit and so on communication fast payment, transmission, also aimed at the UDP network communication system’s unreliability to make the essential protection design, very good overcame in the UDP network communication to lose the frame, the error code this actual project difficult problem.

    2. network communication system’s hardware composition

          

    The model was SCM/SDXa PC104 uses the enlargement mode 80486 processors to make CPU, on the board has contained all PC/AT the compatible DMA controller, the interrupt controller and the timer, ROM-BIOS,32M byte DRAM and the keyboard, the loudspeaker connection; In board exterior connection including two serial ports, and mouth, IDE connection, floppy disk connection, CRT connection, panel display connection, more importantly with NE2000 compatible RTL8019 network interface. This section of PC104 does for the hardware PCB circuit design main core part. The ST16C554 four serial port card realizes the serial communication, the isp1032E gate takes each subsystem’s synchronized datum supply oscillator, 8255A and the mouth electric circuit control response exterior pressed key. What the system translation software uses is Borland C .

    3. must faces the connection the UDP data newspaper sleeve joint character network communication

    In the UDP network application, must first transfer the Socket establishment sleeve joint character, then binds the local address with bind, and the port. What with is different face the connection TCP class type sleeve joint character is it does not need to intercept and to establish the connection, this time through transferred Recvfrom() and the sendto() function may carry on the data read-write, client side and this same.

     


    Figure 2 UDP data newspaper sleeve joint character calling process chart

    under 4.DOS UDP network communication design

    4.1 network card actuations

        The model is the network card which in SCM/SDXa PC104 inlays is the RTL8019 network interface chip, must first move RSET8019.exe to establish the network card parameter. Mainly establishes network card’s interrupt number to interrupt 15, the base address is 320H (basis different funds PC104, carries on different establishment). Then needs to move NE2000.COM to install network card’s first floor information packet actuation. Needs to establish network card’s trap is the 0×62. trap may in 60H to 70H between any number. Movement form following NE2000 0×62 15 0×320; The final demand establishes in autoexec.bat: ne2000 0×62 15 0×320.

    4.2 UDP network communication project model building

    Needs to establish the project document under Borland C , in the project document must join DSOCK.LIB and dsock.h. DSOCK.LIB is DOS under the pattern Dsock storehouse supporting documentation, it is the network communication first floor actuation document and the application layer C compiling file connection bridge. dsock.h is supports Dsock the C language head document. Must act according to the different project under the project folder to request to revise the DSOCK.CFG document.

      The DSOCK.CFG document revision is as follows:

    ip= 192.21.209.61

    netmask= 255.255.255.0

    4.3 UDP network communication characteristic and against loses the frame design and the research

    The UDP agreement’s network communication right and wrong face the connection, is unreliable, but the UDP agreement has its special merit in certain aspects: Before transmitting the data, does not need to establish the connection, before reducing the expenses and the transmission data latency; Does not use the congestion control, also does not guarantee the reliable payment, the main engine needs to maintain has many parameters, the complex connection condition tables; The user data newspaper has 8 bytes the first expenses, must be shorter than TCP 20 byte first; As a result of the UDP congestion control, the jam which the network appears has not been able to cause main engine’s transmission speed to reduce.

    In order to overcome the UDP communication the unreliability to be possible to do through the software looks like TCP similarly “the handshake” the same communication process, but like this then the big discount UDP communication’s merit, increased the expenses and the time delay. For namely guaranteed that UDP the payment, the communication rapidity must avoid the UDP communication the unreliability, has made the following design in the control software.

    1.    In transmission each, we stipulated that the header information condition character has contained the masthead unit serial number, namely and local port number only correspondence masthead unit serial number. For example: (Information origin) had stipulated in the source the masthead unit serial number is the 0×7d correspondence port number is 1600, after network connection, the two overnight stays (information end-result) judges the receive the data masthead unit serial number whether is 0×7d, is then the expression receive from the port number is 1600 data. Because otherwise possibly is the network data has the error code which the collision, the jam produce, to harm the frame mistake.

    2.    In transmission each, we stipulated that the header information condition character has contained the information unit serial number, namely and each only corresponding information unit serial number. For example: A information unit serial number which transmits in the first time period is 00, but a information unit serial number which transmits in the next time period does adds a processing is 01, analogizes in turn until 255 completes a circulation. Like this realized the source unit serial number from 0-255 singular cycle transmissions, the two overnight stays has been possible the data which through the fox message unit serial number’s continuity, the integrity judged receives whether to have loses the frame phenomenon.

    3.    Makes the verification and the operation to the data frame, the so-called verification and is the source to except information unit serial number, the masthead unit serial number, the information length, the text symbolized that and so on outside header information’s concrete data character stages make logic different or processing. The verification and the operation result do the frame tail delivers to the two overnight stays, after the two overnight stays receive, to also makes the solution verification and the operation, if indicates this identically with the source for the effective network channel transmission data, otherwise discards.

    4.    The establishment time poked the information, in source each contains has transmitted this time four byte time to poke the information, the precision is 1ms. The two overnight stays inscribes this week time the time which receives to poke packs again returnes the source, the source pokes the time with on one cycle frame data transmission time time stamp does the information to compare, if then showing has not lost the frame phenomenon identically.

    5.    Designed has lost the frame, the error code wrong judgment accumulation information, namely aimed at the error message number of times which the above four kind of situations produced to make the accumulation statistics. And on monitor real-time demonstration, like this may in the very direct-viewing demonstration each time network communication process the concrete error message number of times, so that better improvement UDP network communication insufficiency.

    Satisfies 1% error rate test request through the above design.

    4.4 UDP network communication system’s project application

    In some project, we have used the 10MB/S band width ethernet, the communication subsystem and the higher authority fire control system through the network transmission, the communication subsystem and the servo subsystem, the television subsystem carry on the connection through the serial communication. the isp1032E gate array common time-base signal electric circuit produces the different frequency common time-base signal signal, achieves between each subsystem the synchronized goal. The UDP communication main function and the flow chart are as follows:

    BOOL the Dsock_Open() function realizes the function is opens Dsock the socket storehouse.

    BOOL Dsock_LoadConfigFile (char *szFile) the function is loads the network settings the configuration files, namely above us mentioned dsock.cfg document.

    SOCKET SocketCreate (int nType) the function founds one socket kind. the nType type may be TCP_SOCKET or UDP_SOCKET.

    BOOL SocketBind (SOCKET s, DWORD dwAddr, WORD wPort) the function is realizes the binding local IP address and the local port. dwAddr is the local IP address, wPort is the local port number.

    int SocketDataReady (SOCKET s) the function realizes the inquiry through the establishment sleeve joint character s returns data. This function’s returns value is socket receives the data the integer.

    int SocketRecvFrom (SOCKET s, DWORD *pdwAddr, WORD *pwPort, BYTE *pby, int nlen) the function for the data which receives through UDP Socket.

    int SocketSendTo (SOCKET s, DWORD dwAddr, WORD wPort, BYTE *pby, int nlen) function for through UDP Socket transmission data.

     

    Figure 3 the UDP communication mainly realizes the flow chart

    5. conclusion

       This article introduced based on DOS under PC104 the computer UDP network communication system’s software and hardware principle of design and the process, some theories which and the method in the article mentioned, obtained the very good confirmation in some reality engineering project, and achieves actual loses the frame collision technical specification. This communication system prevents to lose the frame design design concept to be possible to promote to other embedded UDP communication equipment. This article author innovates the spot: How designs under the DOS operating system the better solution UDP communication merit and unreliability this contradictory question.

    Reference:

    [1] Xie Xiren. Computer network [M] Beijing: Electronics industry publishing house 2003.

    [2] Jiang Dongxing. Windows Sockets network programming comprehensive work [M]. Beijing: Tsinghua University publishing house 1999.

    [3] Hu Daoyuan the INTRANET networking and applies the [M] Beijing: Tsinghua University publishing house in the May, 1998 1st edition.

    [4] [US] Ander S.Tanenbaum, Computer Neterworks,[M] Beijing: Tsinghua University publishing house 1999.

    [5] [US] William A.T. Mary A.P.   Keith A.B, Internet use comprehensive work [M], Beijing: Tsinghua University publishing house, 1995.

    the [6] week, Wang Wen will be brave tomorrow, TCP/IP network theorem and technical [M], Beijing: Tsinghua University publishing house, 1993.

    [7] Deng Quanliang.  Winsock network programming [M]. Beijing: Chinese Railroad Publishing house, 2002.

    under [8] excellent .VxWorks network card driver development [J]. micro computer information, 2004. (9): 10,11.

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3