ArticleslgStudy

computer science

UIP (software)

UIP (software) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand UIP (software) rather than just read about it. In short: The uIP is an open-source implementation of the TCP/IP network protocol stack intended for use with tiny 8- and 16-bit microcontrollers. It was initially developed by Adam Dunkels of the Networked Embedded Systems group at the Swedish Institute of Computer Science, licensed under a BSD style license, and further developed by a wide group of developers. uIP can be very useful in embedded systems because it requires v…

Key takeaways

  • UIP (software) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect UIP (software) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of UIP (software) from memory before moving on to harder problems.

Reference excerpt

The uIP is an open-source implementation of the TCP/IP network protocol stack intended for use with tiny 8- and 16-bit microcontrollers. It was initially developed by Adam Dunkels of the Networked Embedded Systems group at the Swedish Institute of Computer Science, licensed under a BSD style license, and further developed by a wide group of developers. uIP can be very useful in embedded systems because it requires very small amounts of code and RAM. It has been ported to several platforms, including DSP platforms. In October 2008, Cisco, Atmel, and SICS announced a fully compliant IPv6 extension to uIP, called uIPv6.

Implementation uIP makes many unusual design choices in order to reduce the resources it requires. uIP's native software interface is designed for small computer systems with no operating system. It can be called in a timed loop, and the call manages all the retries and other network behavior. The hardware driver is called after uIP is called. uIP builds the packet, and then the driver sends it, and optionally receives a response. It is normal for IP protocol stack software to keep many copies of different IP packets, for transmission, reception and to keep copies in case they need to be resent. uIP is economical in its use of memory because it uses only one packet buffer. First, it uses the packet buffer in a half-duplex way, using it in turn for transmission and reception. Also, when uIP needs to retransmit a packet, it calls the application code in a way that requests for the previous data to be reproduced. Another oddity is how uIP manages connections. Most IP implementations have one task per connection, and the task communicates with a task in a distant computer on the other end of the connection. In uIP, no multitasking operating system is assumed. Connections are held in an array. On each call, uIP tries to serve a connection, making a subroutine call to application code that responds to, or sends data. The size of the connection array is a number that can be adjusted when uIP is recompiled. uIP is fully compliant with the RFCs that define TCP, UDP and IP. It also implements the mandatory maintenance protocol ICMP.

Versions uIP 0.9 is the version with the least dependence on operating systems, the smallest resource use, and the only version that presents a pure event loop API, but in its original form does not support IP version 6, only the older, more common IPv4. It may be used in embedded systems with very small amounts of resources. It was delivered with a set of examples of higher-level protocols that also run on an event loop system, including HTTP (a simple web server), SMTP (simple mail transmission protocol), FTP (file transfer protocol), telnet (terminal emulation), and others. Despite the examples and its small size, uIP 0.9 can be difficult to apply because it does not use any form of socket API. uIP is widely used code with well-known weaknesses. The design minimizes and separates 32-bit arithmetic so that it can be adjusted or optimized for 8 and 16-bit CPUs. Also, 16-bit software timers (common on small microcontrollers) can overflow and cause defective operation. This can be fixed with a timer system that does not overflow (e.g. the timers count down or use modular arithmetic). Another issue is that its single packet buffer can have substantial throughput problems because a PC host usually delays the "ACK" packet, waiting for more packets. In slow, serial port implementations, the ack-throughput can be fixed by modifying uIP to send every packet as two half-packet fragments. uIP systems with fast ethernet or WiFi can modify the hardware driver to send every packet twice. Some PCs do not correctly respond to a fast uIP system on a local Ethernet, because the uIP system can start a responding packet before the PC is ready to receive it. The solution is to call the uIP system less frequently in the main loop (Windows PCs are designed for a response time of about 1 millisecond). Typical implementations of uIP have a fixed IP address, which can make them impractical in real networks, although some have implemented DHCP. Later versions of uIP, including the reference version of uIPv6, are integrated with Contiki, an operating system that uses coroutines for cooperative multitasking. Contiki provides the multitasking needed by a simplified socket API, simplifying the use of uIP. These versions may be less popular than 0.9 however. Many examples of embedded code do not use them.

See also Internet Engineering Task Force List of TCP and UDP port numbers lwIP –another TCP/IP stack project (also created by Dunkels), but more fully-featured and aimed at more capable hardware

References

External links uIP source uIP port for AVR microcontrollers uIP-based Webserver using OpenRISC-embedded SoC

Worked examples

Example 1 — a first encounter with UIP (software)

Start with the simplest possible case. Write down what UIP (software) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to UIP (software) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about UIP (software) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of UIP (software)

In research
UIP (software) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses UIP (software) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
UIP (software) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Embedded systems, Free network-related software, Software using the BSD license, so understanding it makes those chapters shorter.
In everyday life
Look for UIP (software) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “UIP (software)” →

How to study UIP (software) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what UIP (software) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain UIP (software) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is UIP (software) in simple terms?

The uIP is an open-source implementation of the TCP/IP network protocol stack intended for use with tiny 8- and 16-bit microcontrollers. It was initially developed by Adam Dunkels of the Networked Embedded Systems group at the Swedish Institute of Computer Science, licensed under a BSD style licens…

Why does UIP (software) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study UIP (software)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on UIP (software).

Tags

  • Embedded systems
  • Free network-related software
  • Software using the BSD license
  • TCP implementations

Keep exploring