There are many wireless protocols, covering different use-cases. Most of us are very familiar with the IEEE802.11 protocols (WiFi), giving us wireless connectivity for our laptops, iPads and Android devices. In the IoT world of low power devices WiFi and similar protocols such as Bluetooth are not suitable: they are heavy in power usage, draining a battery quite quickly, and unattended low power devices may require battery lifetimes in years.
IEEE802.15.4 is designed for low-rate, low power personal area networks. You won't watch movies over this - the intended transfer rate is about 250 kbits/sec, with a range of about 10 metres.
It was defined in 2003 by the IEEE at layers 1 (physical) and 2 (medium access control) of the OSI stack. It supports ethernet-like packets, but the packet size is only 127 bytes. Higher levels need to use fragmentation schemes for larger packets.
Devices can be either Full Function Devices or Reduced Function Devices. They can form peer-to-peer or star networks. Routing in adhoc peer-to-peer networks is not part of the standard.
Addresses are 4-bit device indetifier and 16-bit network identifier.
IEEE802.15.4 is used by the following layer 3 protocols:
IEEE802.15.4 packets are not secure by default. The higher level preparing the packet may, however, turn on flags requesting integrity or confidentiality. These allow
The security is discussed in detail by Sastry and Wagner Security Considerations for IEEE 802.15.4 Networks
The Wikipedia page Comparison of 802.15.4 radio modules lists a number of IEEE 802.15.4 wireless modules. Limux has support for several of these: the AT86RF230 series, the ADF7242, the CC2250 and the MRF24J40.
OpenLabs have made an 802.15.4 module for the Raspberry Pi,
a popular device for IoT experimenters
It is designed to match the RPi's header pins 15-26.
Unfortunately, the module can fit either way on these pins,
facing outwards or inwards.
has the following image showing it facing inwards and that
works for me:
I've got an RPi 2 Model B. In the file
/boot/config.txt I added
kernel=kernel7.img device_tree=bcm2709-rpi-2-b.dtb dtoverlay=overlays/at86rf233.dtboto boot off the standard
kernel7and pick up the relevant device trees.
To see the modules, install the package
sudo apt-get install lowpan-tools). Running
iz list should show something like
wpan0 (3) link: IEEE 802.15.4 MAC interface phy phy0 hw f6:ae:ca:ac:cb:66:cf:be pan 0xffff short 0xffff
If you install the
and then run
iwpan list you should get
$ ./iwpan list wpan_phy phy0 supported channels: page 0: 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 current_page: 0 current_channel: 13, 2415 MHz cca_mode: (1) Energy above threshold cca_ed_level: -77 tx_power: 4 capabilities: iftypes: node,monitor channels: page 0:  2405 MHz,  2410 MHz,  2415 MHz,  2420 MHz,  2425 MHz,  2430 MHz,  2435 MHz,  2440 MHz,  2445 MHz,  2450 MHz,  2455 MHz,  2460 MHz,  2465 MHz,  2470 MHz,  2475 MHz,  2480 MHz tx_powers: 4,3.7,3.4,3,2.5,2,1,0,-1,-2,-3,-4,-6,-8,-12,-17 cca_ed_levels: -91,-89,-87,-85,-83,-81,-79,-77,-75,-73,-71,-69,-67,-65,-63,-61 cca_modes: (1) Energy above threshold (2) Carrier sense only (3, cca_opt: 0) Carrier sense with energy above threshold (logical operator is 'and') (3, cca_opt: 1) Carrier sense with energy above threshold (logical operator is 'or') min_be: 0,1,2,3,4,5,6,7,8 max_be: 3,4,5,6,7,8 csma_backoffs: 0,1,2,3,4,5 frame_retries: 0,1,2,3,4,5,6,7 lbt: false Supported commands: * new_interface * del_interface * set_channel * set_pan_id * set_short_addr * set_backoff_exponent * set_max_csma_backoffs * set_max_frame_retries * set_lbt_mode * set_ackreq_default * set_tx_power * set_cca_ed_level * set_cca_mode
lowpan-tools will give you iz and other programs
Copyright © Jan Newmarch, email@example.com
"The Internet of Things - a techie's viewpoint" by Jan Newmarch is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://jan.newmarch.name/IoT/.
If you like this book, please donate using PayPal