This is the sixth tutorial in a series that demonstrates "the essentials" of building applications based on Silicon Labs Connect. See Connect Tutorial Series: Table of Contents for an overview of topics addressed in the series, general pre-requisites to ensure you get the most out of the exercises, and definitive Connect references for when you're ready to dive deeper.
With this edition of the tutorial series, we briefly step away from the demonstration table to discuss a topic of critical importance to Connect: addressing in IEEE 802.15.4. A common source of initial confusion is the IEEE 802.15.4 support for multiple addressing modes. This tutorial clarifies the main elements related to addressing covered by the "15.4" standard, and presents some practical addressing examples typical of the space.
The following guidance is written with the Connect stack in mind, but it is applicable to any 15.4-based communication. Though the content is not dependent upon any other series tutorials, you will find it a valuable reference when those documents (or any other Connect resources) discuss addressing.
Each device that supports 15.4 should have an 8 Byte EUI-64 address assigned to it during manufacturing. This address is unique between all devices that supports this address format. This is usually called the long address.
IEEE 802.15.4 devices can be grouped into Personal Area Networks (PANs). These are identified by their 2 Byte PAN identifier (PAN ID). Messages sent between devices that are in the same PAN are called Intra-PAN messages, while messages that are sent between PANs are called Inter-PAN messages.
Each device can configure a 2 Byte short address (sometimes called node id). This should be unique within the PAN.
When a device configures this address in the application layer, we usually call it commissioning. However, a network layer can also configure a short address to devices, usually during a join process.
0xFFFFis used for broadcasting. All devices should receive it in the PAN, and no device should ACK it.
0xFFFFis the broadcast PAN ID. Devices for all PANs should accept it. In practice, this is only used together with the broadcast short address.
0xFFFFFFFFFFFFFFFFis used for broadcasting, though it is very rarely used in 15.4.
0xFFFEis the "not configured" short address. This is usually used during a join process to acquire a unique short address.
IEEE 802.15.4 frames contain address information for both the source and destination. Each of these can be (independently) configured as one of three different addressing modes, which sets the address data (none/short/long, with/without PAN ID) that is included in the frame:
Intra-PAN messages usually omit the source PAN ID (this is configurable, but in practice is never changed).
Short addressed, Intra-PAN.
This is the most common frame format used in 15.4. It includes short address for the source and the destination, as well as the destination PAN (which is the same as the source PAN). Addressing fields use 12B from the MAC header.
A 15.4 stack might not want to use short addresses at all, in which case they can use the long address for both source and destination. Since the addresses are unique, this mode can be used both inter-PAN and intra-PAN (in the latter case, the source PAN ID can be omitted)
Long source, short destination.
This addressing mode is used during a join process, where the source device does not yet have short address.
ACK frames don't have any address field.
This tutorial explained how the IEEE 802.15.4 standard treats addressing, and gave insight into when you might encounter specific scenarios or use certain elements within a 15.4-based network. The utility of this knowledge will be made particularly clear in the next tutorial,Traffic Analysis: Addressing, Acknowledgement, and Security.
For more information on 15.4 in Connect, see UG235.02: Using Silicon Labs Connect with IEEE 802.15.4.