Serial Programming:Forming Data Packets
From Wikibooks, the open-content textbooks collection
< Programming:Serial Data Communications
Just about every idea for communicating between computers involves "data packets", especially when more than 2 computers are involved.
The idea is very similar to putting a check in an envelope to mail to the electricity company. We take the data (the "check") we want to send to a particular computer, and we place it inside an "envelope" that includes the address of that particular computer.
A packet of data starts with some address information, some other transmission-related information, followed by the raw data, and finishes up with a few more bytes of transmission-related data (often a Adler-32 checksum ).
The accountant at the electricity company throws away the envelope when she gets the check. She already knows the address of her own company. Does this mean the "overhead" of the envelope is useless ? No.
Unfortunately, there are dozens of slightly different, incompatible protocols for data packets, because people pick slightly different ways to represent the address information and the check data.
... gateways between incompatible protocols ...
[edit] For further reading
- http://intcomm.wiki.taoriver.net/moin.cgi/ProtocolMadness
- UDP
- Internet Technologies/Protocols including TCP/IP and HTTP
- ATM
- VSCP - Very Simple Control Protocol http://www.vscp.org/ "The protocol is free"
- "Protocol Design Folklore" by Radia Perlman. Jan 15, 2001. http://www.awprofessional.com/articles/article.asp?p=20482
- "Devices that play together, work together: UPnP defines common protocols and procedures to guarantee interoperability among network-enabled PCs, appliances, and wireless devices." article by Edward F Steinfeld, EDN, 9/13/2001 http://www.reed-electronics.com/ednmag/index.asp?layout=article&articleid=CA154802&spacedesc=readersChoice&rid=0&rme=0&cfd=1
- CAN bus http://computer-solutions.co.uk/ http://computer-solutions.co.uk/gendev/can-module.htm
- "CMX-MicroNet is the first system that allows TCP/IP
- and other protocols to be run natively on small processors
- ... [including] AVR, PIC 18, M16C."
- "byteflight is a high speed data bus protocol for automotive applications" http://byteflight.com/
- Nagle's rule ... The Nagle algorithm. "Nagle's rule is a heuristic to avoid sending particularly small IP packets, also called tinygrams. Tinygrams are usually created by interactive networking tools that transmit single keystrokes, such as telnet or rsh. Tinygrams can become particularly wasteful on low-bandwidth links like SLIP. The Nagle algorithm attempts to avoid them by holding back transmission of TCP data briefly under some circumstances." -- http://www.tldp.org/LDP/nag/node45.html
- The SLIMP3 Client Protocol
- Beej's Guide to Network Programming Using Internet Sockets by Brian "Beej" Hall 2005-11-05
- ... other packet protocols ? ...

