Embedded common interface protocol

Interface protocol refers to the communication method and requirements that need to be complied with between interfaces that need to exchange information. There are many types of interface protocols. The interface protocol not only specifies the communication of the physical layer, but also defines the requirements of the syntax layer and the semantic layer.

An embedded system device generally consists of an embedded computer system and an execution device. The embedded computer system is the core of the entire embedded system, and is composed of a hardware layer, an intermediate layer, a system software layer, and an application software layer. The execution device, also known as the controlled object, can accept control commands issued by the embedded computer system to perform the specified operations or tasks. The actuator can be very simple, such as a tiny motor on the phone, which is turned on when the phone is in vibration receiving state; it can also be complicated, such as the SONY smart robot dog, which integrates multiple micro-small control motors and various sensors. Thereby, various complicated actions and various state information can be performed.

The hardware layer includes an embedded microprocessor, memory (SDRAM, ROM, Flash, etc.), general device interface, and I/O interface (A/D, D/A, I/O, etc.). Adding a power circuit, a clock circuit and a memory circuit to an embedded processor constitutes an embedded core control module. The operating system and applications can be hardened in ROM.

Embedded common interface protocol

Embedded common interface protocol

1, BSD TCP / IP protocol stack

The BSD stack has historically been the starting point for other commercial stacks, and most professional TCP/IP stacks (VxWorks embedded TCP/IP stacks) are derived from the BSD stack. This is because the BSD stack provides the prototype of these professional stacks under the BSD license agreement. The BSD license allows the BSD stack to combine the code of these professional stacks in modified or unmodified form without having to pay royalties to the creator. At the same time, BSD is also the starting point for innovations in many TCP/IP protocols, such as hungry congestion control and avoidance in the WAN.

2, uC / IP

uC/IP is a set of uC/OS-based open source TCP/IP protocol stack written by Guy Lancaster. It can also be ported to other operating systems. It is a completely free and researchable TCP/IP protocol stack. Most of the uC/IP source code is ported from the open source BSD publishing site and KA9Q (a TCP/IP protocol stack running on a DOS single-tasking environment). uC/IP has the following features: PPP protocol with authentication and header compression support, optimized single request/reply interaction process, support for IP/TCP/UDP protocol, and achievable network functions are powerful and can be reduced. The UCIP stack is designed as a network module with a minimized user interface and an applicable serial link. Depending on how many protocols are required to implement the CPU, compiler, and system, the protocol stack requires a code size of between 30-60KB. Http://ucip.sourceforge.net

3, LwIP

LwIP is an open source TCP/IP protocol stack for embedded systems developed by Adam Dunkels of the Swedish Institute of Computer Science (Swedish InsTItute of Computer Science). LwIP means Light Weight (IP), compared to uip. LwIP can be ported to the operating system or run independently without an operating system. The focus of LwIP TCP/IP implementation is to reduce the occupation of RAM on the basis of maintaining the main functions of the TCP protocol. Generally, it only needs tens of K of RAM and about 40K of ROM to run. This makes the LwIP protocol stack suitable for the low end. Used in embedded systems. The characteristics of LwIP are as follows: support IP forwarding under multiple network interfaces, support ICMP protocol, including experimental extended UDP (User Datagram Protocol), including blocking control, RTT estimation and fast recovery and fast forwarding TCP (Transmission Control Protocol) A specialized internal callback interface (Raw API) is provided to improve application performance and an optional Berkeley interface API is provided. Http://~adam/lwip/ or http://savannah.nongnu.org/projects/lwip/

4, uIP

uIP is a very small TCP/IP stack designed specifically for 8-bit and 16-bit controllers. It is written entirely in C, so it can be ported to a variety of different architectures and operating systems. A compiled stack can run in a few kilobytes of ROM or hundreds of bytes of RAM. The uIP also includes an HTTP server as the service content. License: BSD license certificate http://~adam/uip/

5, TInyTcp

The TInyTcp stack is a very small and simple implementation of TCP/IP that includes an FTP client. TInyTcp was designed to burn into ROM and now seems to be useful for big endian architecture (the initial target is 68000 chips). TinyTcp also includes a simple Ethernet driver for the 3COM multi-bus card http://ftp.ecs.soton.ac.uk/pub/elks/utils/tiny-tcp.txt

Choosing an open source stack can be considered in four ways:

One is to provide an easy-to-use underlying hardware API, which is independent of the hardware platform; one is the kernel API with the operating system. Whether the system function interface that the protocol stack needs to call is easy to construct, and the other is the degree of application support. The most important thing is whether the occupied system resources are within the acceptable range. Is there room for reduction optimization? Among them, the BSD stack can fully implement the TCP/IP protocol, but the code is huge, between 70KB-150KB, the optimization is difficult, and the uIP and TinyTcp code capacity is small, and the function is simplified, which limits the application in some higher requirements. Such as * and * large data transmission. LwIP and uC/IP are two open source protocol stacks of the same level. The code capacity and implementation functions are similar. LwIP has no operating system specificity. It abstracts the protocol stack and platform-related code. If users want to port to themselves. The system needs to complete the encapsulation of this part of the code and provides an optional API interface for network application support.

The uC/IP protocol was originally designed for uC/OS. For the convenience of user porting, the protocol stack and platform related code are also abstracted. However, most of the system functions called by the protocol stack refer to the uC/OS kernel function prototype design and provide The test function of the protocol stack is convenient for the user to refer to. The disadvantage is that the protocol stack lacks support for the network application. According to the above analysis, from the perspective of application and development, it seems that LWIP has been favored by many friends on the Internet; uC/IP has many shortcomings in document support and software upgrade management, but it was originally designed for UC/OS. If you choose UC/OS as the software foundation, you have an advantage in system function construction. Of course, if you choose another operating system, you can refer to the file modification under the OS_NULL folder.

The above open source protocol stacks are not free and can be used. As far as I know, UC/OS's parent company has launched UC/OS-TCP/IP for 6 people*2 years of work, used by a domestic company. As a reference for porting, LWIP took 4-5 people*2 years of effort to test and optimize the protocol, and it is not surprising that the high cost of using the commercial TCP/IP stack. As a broad-based enthusiast learning, if you just run the prototype and experiment with the effects, the above several open source protocol stacks provide examples of testing, which should be a good choice. Personal opinion: LWIP can be given priority, at least there are many people on the Internet to study,

A26 Vape Cigarette

A26 Vape Cigarette,Replaceable Atomizer Vape Charger,Vapes Desechables,Replaceable Atomizer Electronic Cigarette

Lensen Electronics Co., Ltd , https://www.lensenvape.com