Host Communication Protocol  2.0
doc/md/1_stack.md
Go to the documentation of this file.
1 FPC embedded stack {#stack}
2 ========
3 
4 The communication stack implemented on the embedded devices by FPC follows the following
5 specification.
6 
7 \image html stack.svg "HCP embedded stack"
8 \image latex stack.eps "HCP embedded stack"
9 
10 \section phy Physical
11 
12 The physical layer have a fixed size buffer of 256 bytes.
13 
14 \section link Link
15 
16 The link layer handles packet consistency.
17 
18 Each packet received is acknowledged on the link layer, if an error occurs no retransmission is
19 done on this level, instead the error is propagated upwards.
20 
21 Channel | Size | Payload | CRC |
22 ------- | ------- | ---------- | ------- |
23 2 bytes | 2 bytes | size bytes | 4 bytes |
24 
25 All fields are using unsigned data types.
26 
27 \section tsp Transport
28 
29 The transport layer handles packet segmentation.
30 
31 As the PHY MTU is 256 bytes the maximum payload per segment is 242 bytes.
32 
33 Errors are propagated upwards.
34 
35 Size | Seq Nr | Seq Len | Payload |
36 ------- | ------- | ------- | ---------- |
37 2 bytes | 2 bytes | 2 bytes | size bytes |
38 
39 All fields are using unsigned data types.
40 
41 \section app Application
42 
43 The application layer is a optional security layer, the default implementation is clear text
44 (unsecure).
45 
46 If a security solution is used it will be part of that products documentation.
47 
48 \section hcp HCP
49 
50 The HCP frame is described in the \link hcpf \endlink HCP frame format section.