Operation
Encryption
802.15.4 protocol specifies eight security modes, enumerated as shown in the following table.
Length of message integrity
check
Packet length
overhead
Level
Name
Encrypted?
0
1
2
3
4
5
6
7
N/A
No
No
No
No
Yes
Yes
Yes
Yes
0 (no check)
0
MIC-32
4
9
MIC-64
8
13
21
5
MIC-128
ENC
16
0 (no check)
ENC-MIC-32
ENC-MIC-64
ENC-MIC-128
4
9
8
13
21
16
The XBee/XBee-PRO S2C 802.15.4 RF Module only supports security levels 0 and 4. It does not support
message integrity checks. EE 0 selects security level 0 and EE 1 selects security level 4. When using
encryption, all devices in the network must use the same 16-byte encryption key for valid data to get
through. Mismatched keys will corrupt the data output on the receiving device. Mismatched EE
parameters will prevent the receiving device from outputting received data.
Working from a maximum packet size of 116 bytes, encryption affects the maximum payload as shown
in the following table.
Effect on
maximum
payload
Factor
Comment
Compatibility
mode
Force to 95 If C8 bit 0 is set, all packets are limited to 95 bytes, regardless of
other factors listed below. This is how the Legacy 802.15.4 module
(S1 hardware) functions.
Packet
overhead
Reduce by 5 This penalty for enabling encryption is unavoidable due to the
802.15.4 protocol.
Source address Reduce by 6 This penalty is unavoidable because the 802.15.4 requires encrypted
packets to be sent with a long source address, even if a short
address would otherwise be used.
Destination
address
Reduce by 6 This penalty only applies if sending to a long address rather than a
short address.
App header
Reduce by 4 The app header for encryption is 4 bytes long. This penalty only
applies if MM = 0 or 3.
Because of the two mandatory reductions when using encryption, no packet can exceed 116 - (5+6)
=105 bytes. The other options may further reduce the maximum payload to 101 bytes, 99 bytes, or 95
bytes.
When operating in API mode and not using encryption, if the source address is long, the receiving
device outputs an RX Indicator (0x80) frame for received data. But, if the source address is short, the
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
39