📄 tep126.txt
字号:
time while low power listening is enabled, the radio will automatically
turn off and begin duty cycling at its specified duty cycle period.
4. CCA Sampling Strategy
The actual receive check is performed in a loop inside a function,
not a spinning task. This allows the sampling to be performed
continuously, with the goal of turning the radio off as quickly as
possible without interruption.
8. CC2420 Settings and Registers
====================================================================
To interact with registers on the CC2420 chip, the SPI bus must be
acquired, the chip selecct (CSn) pin must be cleared, and then the
interaction may occur. After the interaction completes, the
CSn pin must be set high.
All registers and strobes are defined in the CC2420.h file, and most
are accessible through the CC2420SpiC component. If your application
requires access to a specific register or strobe, the CC2420SpiC component
is the place to add access to it.
Configuring the CC2420 requires the developer to access the CC2420Config
interface provided by CC2420ControlC. First call the CC2420Config commands to
change the desired settings of the radio. If the radio happens to
be off, the changes will be committed at the time it is turned on.
Alternatively, calling sync() will commit the changes to the CC2420.
RSSI can be sampled directly by calling the ReadRssi interface provided
by CC2420ControlC. See page 50 of the CC2420 datasheet for information
on how to convert RSSI to LQI and why it may not be such a good idea [1]_.
9. Cross-platform Portability
====================================================================
To port the CC2420 radio to another platform, the following interfaces
need to be implemented:::
// GPIO Pins
interface GeneralIO as CCA;
interface GeneralIO as CSN;
interface GeneralIO as FIFO;
interface GeneralIO as FIFOP;
interface GeneralIO as RSTN;
interface GeneralIO as SFD;
interface GeneralIO as VREN;
// SPI Bus
interface Resource;
interface SpiByte;
interface SpiPacket;
// Interrupts
interface GpioCapture as CaptureSFD;
interface GpioInterrupt as InterruptCCA;
interface GpioInterrupt as InterruptFIFOP;
The GpioCapture interface is tied through the Timer to provide a relative time
at which the interrupt occurred. This is useful for timestamping received
packets for node synchronization.
If the CC2420 is not connected to the proper interrupt lines,
interrupts can be emulated through the use of a spinning task
that polls the GPIO pin. The MICAz implementation, for example, does this
for the CCA interrupt.
10. Future Improvement Recommendations
====================================================================
Many improvements can be made to the CC2420 stack. Below are some
recommendations:
10.1 AES Encryption
--------------------------------------------------------------------
The CC2420 chip itself provides AES-128 encryption. The implementation
involves loading the security RAM buffers on the CC2420 with the information
to be encrypted - this would be the payload of a packet, without
the header. After the payload is encrypted, the microcontroller reads
out of the security RAM buffer and concatenates the data with the
unencrypted packet header. This full packet would be uploaded again to the CC2420
TXFIFO buffer and transmitted.
Because the CC2420 cannot begin encryption at a particular offset
and needs to be written, read, and re-written, use of the AES-128 may be
inefficient and will certainly decrease throughput.
10.2 Authentication
--------------------------------------------------------------------
In many cases, authentication is more desirable than encryption.
Encryption significantly increases energy and decreases packet throughput,
which does not meet some application requirements. A layer could be
developed and added toward the bottom of the radio stack that validates
neighbors, preventing packets from invalid neighbors from reaching the
application layer. Several proprietary authentication layers have
been developed for the CC2420 stack, but so far none are available to
the general public.
A solid authentication layer would most likely involve the use of a
neighbor table and 32-bit frame counts to prevent against replay attacks.
Once a neighbor is verified and established, the node needs to ensure that
future packets are still coming from the same trusted source. Again,
some high speed low energy proprietary methods to accomplish this exist, but
encryption is typically the standard method used.
10.3 Synchronous Low Power Listening
--------------------------------------------------------------------
A synchronous low power listening layer can be transparently built on
top of the asynchronous low power listening layer. One implementation
of this has already been done on a version of the CC1000 radio stack.
Moteiv's Boomerang radio stack also has a synchronous low power listening
layer built as a standalone solution.
In the case of building a synchronous layer on top of the asynchronous
low power listening layer, a transmitter's radio stack can detect when
a particular receiver is performing its receive checks by verifying the
packet was acknowledged after a sendDone event. The transmitter can then
build a table to know when to begin transmission for that particular receiver.
Each successful transmission would need to adjust the table with updated
information to avoid clock skew problems.
The asynchronous low power listening stack needs to be altered a bit
to make this strategy successful. Currently, duty cycling is started
and stopped as packets are detected, received, and transmitted. The
stack would need to be altered to keep a constant clock running in the
background that determines when to perform receive checks. The
clock should not be affected by normal radio stack Rx/Tx behavior. This
would allow the receiver to maintain a predictable receive check cycle
for the transmitter to follow.
If the synchronous low power listening layer loses synchronization,
the radio stack can always fall back on the asynchronous low power listening
layer for successful message delivery.
10.4 Neighbor Tables
--------------------------------------------------------------------
Moteiv's Boomerange Sensornet Protocol (SP) implementation is a
good model to follow for radio stack architecture. One of the nice features
of SP is the design and implementation of the neighbor table. By
providing and sharing neighbor table information across the entire
CC2420 radio stack, RAM can be conserved throughout the radio stack
and TinyOS applications.
10.5 Radio Independant Layers
--------------------------------------------------------------------
The best radio stack architecture is one that is completely radio independant.
Many of the layers in the CC2420 stack can be implemented independant
of the hardware underneath if the radio stack architecture was redesigned
and reimplemented. The low power listening receive check strategy may need a
hardware-dependant implementation, but other layers like PacketLink,
UniqueSend, UniqueReceive, ActiveMessage, Dispatch, etc. do not require
a CC2420 underneath to operate properly. The ultimate TinyOS radio
stack would be one that forms an abstraction between radio-dependant
layers and radio-independant layers, and operates with the same
behavior across any radio chip.
10.6 Extendable Metadata
--------------------------------------------------------------------
Layers added into the radio stack may require extra bytes of metadata.
The PacketLink layer, for example, requires two extra fields
in each message's metadata to hold the message's max retries and
delay between retries. The low power listening layer requires
an extra field to specify the destination's duty cycle period for
a proper delivery.
If layers are not included in the radio stack during compile time,
their fields should not be included in the message_t's metadata.
One version of extendable metadata was implementing using an array at the end
of the metadata struct that would adjust its size based on which layers were
compiled in and what size fields they required. A combination of
compiler support in the form of unique(..) and uniqueCount(..) functions
made it possible for the array to adjust its size.
Explicit compiler support would be the most desirable solution to add
fields to a struct as they are needed.
10.7 Error Correcting Codes (ECC)
--------------------------------------------------------------------
When two nodes are communicating near the edge of their RF range,
it has been observed that interference may cause the packet to be
corrupted enough that the CRC byte and payload actually passes
the check, even though the payload is not valid. There is a one
in 65535 chance of a CRC byte passing the check for a corrupted
packet. Although this is slim, in many cases it is unacceptable.
Some work arounds have implemented an extra byte of software generated
CRC to add to the reliability, and tests have proven its effectiveness.
Taking this a step further, an ECC layer in the radio stack would help
correct corrupted payloads and increase the distance at which nodes
can reliably communicate.
11. Author's Address
====================================================================
| David Moss
| Rincon Research Corporation
| 101 N. Wilmot, Suite 101
| Tucson, AZ 85750
|
| phone - +1 520 519 3138
| email ? dmm@rincon.com
|
|
| Jonathan Hui
| 657 Mission St. Ste. 600
| Arched Rock Corporation
| San Francisco, CA 94105-4120
|
| phone - +1 415 692 0828
| email - jhui@archedrock.com
|
|
| Philip Levis
| 358 Gates Hall
| Stanford University
| Stanford, CA 94305-9030
|
| phone - +1 650 725 9046
| email - pal@cs.stanford.edu
|
|
| Jung Il Choi
| <contact>
| phone -
| email -
12. Citations
====================================================================
.. [1] TI/Chipcon CC2420 Datasheet. http://www.chipcon.com/files/CC2420_Data_Sheet_1_3.pdf
.. [2] TEP111: message_t
.. [3] IEEE 802.15.4 Specification: http://standards.ieee.org/getieee802/802.15.html
.. [4] TEP105: Low Power Listening
.. [5] TEP125: TinyOS 802.15.4 Frames
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -