Cubesat Space Protocol
Encyclopedia
Cubesat Space Protocol is a small network-layer delivery protocol designed for Cubesat
CubeSat
A CubeSat is a type of miniaturized satellite for space research that usually has a volume of exactly one liter , has a mass of no more than 1.33 kilograms, and typically uses commercial off-the-shelf electronics components...

s. The idea was developed by a group of students from Aalborg University in 2008, and further developed for the AAUSAT3 Cubesat mission scheduled for launch in 2011. The protocol is based on a 32-bit header containing both network and transport layer information. Its implementation is designed for, but not limited to, embedded systems such as the 8-bit AVR microprocessor and the 32-bit ARM and AVR from Atmel. The implementation is written in C and is currently ported to run on FreeRTOS
FreeRTOS
FreeRTOS is a real-time operating system for embedded devices, being ported to several microcontrollers. It is distributed under the GPL with an optional exception...

 and POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

 and pthreads-based operating systems such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

. The three-letter acronym CSP was originally an abbreviation for CAN Space Protocol because the first MAC-layer driver was written for CAN
Controller Area Network
Controller–area network is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer....

-bus. The physical layer has since been extended to include several other technologies, and the name was therefore extended to the more general Cubesat Space Protocol without changing the abbreviation.

The protocol and the implementation is actively maintained by the students at Aalborg University and the spin-off company GomSpace. The source code is available under an LGPL license and hosted on GitHub
Github
GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both commercial plans and free accounts for open source projects...

.

Description

The Cubesat Space Protocol enables distributed embedded systems to deploy a service oriented network topology. The layering of CSP corresponds to the same layers as the TCP/IP model. The implementation supports a connection oriented transport protocol (Layer 4), a router-core (Layer 3), and several network-interfaces (Layer 1–2). A service oriented topology eases the design of satellite subsystems, since the communication bus itself is the interface to other subsystems. This means that each subsystem developer only needs to define a service-contract, and a set of port-numbers his system will be responding on. Furthermore subsystem inter-dependencies are reduced, and redundancy is easily added by adding multiple similar nodes to the communication bus.

Notable features include:
  • Simple API
    Application programming interface
    An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

     similar to Berkeley sockets
    Berkeley sockets
    The Berkeley sockets application programming interface comprises a library for developing applications in the C programming language that perform inter-process communication, most commonly for communications across a computer network....

    .
  • Router core with static routes. Supports transparent forwarding of packets over e.g. spacelink.
  • Support for both connectionless operation (similar to UDP
    User Datagram Protocol
    The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...

    ), and connection oriented operation (based on RUDP
    Reliable User Datagram Protocol
    In computer networking, the Reliable User Datagram Protocol is a transport layer protocol designed at Bell Labs for the Plan 9 operating system...

    ).
  • Service handler that implements ICMP
    Internet Control Message Protocol
    The Internet Control Message Protocol is one of the core protocols of the Internet Protocol Suite. It is chiefly used by the operating systems of networked computers to send error messages indicating, for example, that a requested service is not available or that a host or router could not be...

    -like requests such as ping and buffer status.
  • Support for loopback traffic. This can e.g. be used for Inter-process communication
    Inter-process communication
    In computing, Inter-process communication is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for message passing, synchronization, shared...

     between subsystem tasks.
  • Optional support for broadcast traffic if supported by the physical interface.
  • Optional support for promiscuous mode if supported by the physical interface.
  • Optional support for encrypted packets with XTEA
    XTEA
    In cryptography, XTEA is a block cipher designed to correct weaknesses in TEA. The cipher's designers were David Wheeler and Roger Needham of the Cambridge Computer Laboratory, and the algorithm was presented in an unpublished technical report in 1997...

     in CTR
    Block cipher modes of operation
    In cryptography, modes of operation is the procedure of enabling the repeated and secure use of a block cipher under a single key.A block cipher by itself allows encryption only of a single data block of the cipher's block length. When targeting a variable-length message, the data must first be...

     mode.
  • Optional support for HMAC
    HMAC
    In cryptography, HMAC is a specific construction for calculating a message authentication code involving a cryptographic hash function in combination with a secret key. As with any MAC, it may be used to simultaneously verify both the data integrity and the authenticity of a message...

     authenticated packets with truncated SHA-1 HMAC.

Operating Systems supported

CSP should compile on all platforms that has a recent version of the gcc
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...

 compiler. CSP requires support for C99
C99
C99 is a modern dialect of the C programming language. It extends the previous version with new linguistic and library features, and helps implementations make better use of available computer hardware and compiler technology.-History:...

 features such as inline functions and designated initializers.
  • FreeRTOS
    FreeRTOS
    FreeRTOS is a real-time operating system for embedded devices, being ported to several microcontrollers. It is distributed under the GPL with an optional exception...

     – Tested on AVR8, AVR32
    AVR32
    The AVR32 is a 32-bit RISC microprocessor architecture designed by Atmel. The microprocessor architecture was designed by a handful of people educated at the Norwegian University of Science and Technology, including lead designer Øyvind Strøm, PhD and CPU architect Erik Renno, M.Sc in Atmel's...

     and ARM7.
  • Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     – Tested on x86, x86-64
    X86-64
    x86-64 is an extension of the x86 instruction set. It supports vastly larger virtual and physical address spaces than are possible on x86, thereby allowing programmers to conveniently work with much larger data sets. x86-64 also provides 64-bit general purpose registers and numerous other...

     and Blackfin
    Blackfin
    The Blackfin is a family of 16- or 32-bit microprocessors developed, manufactured and marketed by Analog Devices. The family is characterized by their built-in, fixed-point digital signal processor functionality supplied by 16-bit Multiply–accumulates , accompanied on-chip by a small and...

    .

Physical layer drivers

CSP supports several physical layer technologies. The LGPL licensed source code contains an implementation of a fragmenting CAN interface and drivers for SocketCAN
Socketcan
SocketCAN is a set of open source CAN drivers and a networking stack contributed by Volkswagen Research to the Linux kernel. Formerly known as Low Level CAN Framework ....

 and the Atmel AT90CAN128 and AT91SAM7A1 processors. The remaining physical layer drivers are not included in the LGPL licensed source code, and must be implemented separately. Interfaces need only to implement a function to transmit a packet, and insert received packets into the protocol stack with the csp_new_packet function. CSP has been successfully tested with the following physical layers.
  • CAN
    Controller Area Network
    Controller–area network is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer....

  • I2C
  • RS-232
    RS-232
    In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...

     using the KISS protocol
  • CCSDS 131.0-B-1-S/131.0-B-2 space link protocol
  • TCP/IP

Protocol Header

Two versions of the CSP header exists. The 0.9 version was used prior to November 2010, when it was replaced with a new header with support for more hosts and ports. The reserved bits must be set to 0. Note that the CSP header does not include a length field. If required, this must be implemented by the physical layer interface.

Version 0.9

The original CSP header supported up to 16 hosts on the network, with 32 ports available on each host. Address 15 is reserved for broadcast traffic. The port range is divided into three segments. Ports 0 to 7 are used for general services such as ping and buffer status, and are implemented by the CSP service handler. The ports from 8 to 15 are used for subsystem specific services. The remaining ports, from 16 to 31, are ephemeral ports used for outgoing connections. Bits 28 and 29 are used for marking packets with HMAC and XTEA encryption.
CSP Header 0.9
Bit offset  0 1 2 3 4 5 6 7 8 910111213141516171819202122232425262728293031
0 Protocol Priority Source Destination Destination
Port
Source
Port
Reserved tt style="font-size:8pt; line-height:1">H
M
A
C
tt style="font-size:8pt; line-height:1">X
T
E
A
tt style="font-size:8pt; line-height:1">R
E
S
1
tt style="font-size:8pt; line-height:1">R
E
S
2
32 Data (0 – 65535 bytes)

Version 1+

In November 2010, the header was redefined to support more hosts and ports. The protocol field was removed, and RDP packets are instead identified by a set bit in the flags field. The priority field was adjusted to two bits, and the freed bits were used to double both the host and port range. CSP now supports up to 32 hosts on the network, with 64 ports available on each host. Address 31 is reserved for broadcast traffic.

The port range is still divided into three adjustable segments. Ports 0 to 7 are used for general services such as ping and buffer status, and are implemented by the CSP service handler. The ports from 8 to 47 are used for subsystem specific services. All remaining ports, from 48 to 63, are ephemeral ports used for outgoing connections. The bits from 28 to 31 are used for marking packets with HMAC, XTEA encryption, RDP header and CRC32 checksum.
CSP Header 1.0+
Bit offset  0 1 2 3 4 5 6 7 8 910111213141516171819202122232425262728293031
0 Priority Source Destination Destination
Port
Source
Port
Reserved tt style="font-size:8pt; line-height:1">H
M
A
C
tt style="font-size:8pt; line-height:1">X
T
E
A
tt style="font-size:8pt; line-height:1">R
D
P
tt style="font-size:8pt; line-height:1">C
R
C
32 Data (0 – 65535 bytes)

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK