.. _ug:cha:802154: The 802.15.4 Model ================== .. _ug:sec:802154:overview: Overview -------- IEEE 802.15.4 is a technical standard that defines the operation of low-rate wireless personal area networks (LR-WPANs). IEEE 802.15.4 was designed for data rates of 250 kbit/s or lower to achieve long battery life (months or even years) and very low complexity. The standard specifies the physical layer and media access control. IEEE 802.15.4 is the basis for the :protocol:`ZigBee`, :protocol:`ISA100.11a`, :protocol:`WirelessHART`, :protocol:`MiWi`, :protocol:`SNAP`, and the :protocol:`Thread` specifications, each of which further extends the standard by developing the upper layers that are not defined in IEEE 802.15.4. Alternatively, it can be used with :protocol:`6LoWPAN`, the technology used to deliver IPv6 over WPANs, in order to define the upper layers. (Thread is also 6LoWPAN-based.) A basic implementation of the IEEE 802.15.4 protocol is provided by the INET Framework. .. _ug:sec:802154:network-interfaces: Network Interfaces ------------------ Two network interfaces differing in the type of radio are available: - :ned:`Ieee802154NarrowbandInterface` is for use with narrowband radios. - :ned:`Ieee802154UwbIrInterface` is for use with the UWB-IR radio. In order to create a wireless node with an 802.15.4 interface, use a node type that has a wireless interface and set the interface type to the appropriate type. For example, :ned:`WirelessHost` is a node type that is preconfigured to have one wireless interface, ``wlan[0]``. ``wlan[0]`` is of parametric type, so it allows configuring of all the nodes to use 802.15.4 with the following line in the ini file: .. code-block:: ini **.wlan[0].typename = "Ieee802154NarrowbandInterface" .. _ug:sec:802154:physical-layer: Physical Layer -------------- The IEEE 802.15.4 standard defines several alternative PHYs. Various frequency bands, modulation schemes (DSSS, O-QPSK, MPSK, GFSK BPSK, etc.), and narrowband radios are deployed. The standard also includes a Direct Sequence ultra-wideband (UWB) radio and one using chirp spread spectrum (CSS). INET provides the following radios: - :ned:`Ieee802154NarrowbandScalarRadio` is currently a partially parameterized version of the APSK radio. Before using this radio, the radio's parameters must be checked and ensure their correspondence to the specification of the narrowband PHY being simulated. - :ned:`Ieee802154UwbIrRadio` models the 802.14.5 UWB radio. To match the radios, a relevant medium model should be chosen. For instance, :ned:`Ieee802154UwbIrRadioMedium` for :ned:`Ieee802154UwbIrRadio`, and :ned:`Ieee802154NarrowbandScalarRadioMedium` for :ned:`Ieee802154NarrowbandScalarRadio`. .. _ug:sec:802154:mac-protocol: MAC Protocol ------------ The 802.15.4 MAC is based on collision avoidance via CSMA/CA. Other important features include real-time suitability by reservation of guaranteed time slots and integrated support for secure communications. Devices also include power management functions such as link quality and energy detection. The :ned:`Ieee802154Mac` type in INET is currently a parameterized version of a generic CSMA/CA protocol model with ACK support. There is also a :ned:`Ieee802154NarrowbandMac`.