Presentation on theme: "TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003."— Presentation transcript:
TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October
Radio Stacks Mica (Old) Mica (MicaHighSpeedRadio) Mica2 (CC1000) Future?
Typical Radio Stack Generic Comm AM Packet Layer Byte Layer Bit Layer Mica and Rene Mica2 New Radios (CC2.4K) Radio Control
Mica (Old) Generic Comm AM CRCPacketObj SecDedRadioByte RFM
Mica (MicaHighSpeedRadio) Generic Comm AM RadioCRCPacket ChannelMon SpiByteFifo RadioTiming SecDedEncoding SlavePin RandomLFSR MicaHighSpeedRadioM CSMA Preamble Detect Start Sym Detect Captures radio timing and syncs receiver to sender Encoding
Mica2 (CC1000) Generic Comm AM CC1000Control SpiByteFifoRandomLFSRADC CSMA Encoding Data Preamble Detect Synchronization Control (Freq,Power,etc) CC1000RadioIntM Wires the control and data paths: Implementation hidden from app CC1000RadioC
Mica2 Radio Stack Phil B
Mica2 MAC DelayPreambleSyncPacket Transmission Switch to TX Mode Switch to RX Mode s
Mica2 Preamble CC1000 must sync its clock to incoming signal With manchester encoding, 17 sync bytes are required for longest range an extra byte is added for offset in receiving Settling (setting) Lock (17)
Strength Mica sends two strength bytes to measure high amplitude via RSSI pin Mica2 with FSK, both 0 and 1 contain energy measure energy at any point during packet reception, no need for extra bytes
Synchronous ACKs Mica Switch from Transmit to Receive mode instantly. No need to resynchronize ack sender. Mica2 Switch from Transmit to Receive mode in 250 s CC1K requires that each receiver lock to the incoming signal (~18 bytes = 7.5ms) Almost as expensive as sending a packet!
Mica Hardware sets automatic gain control (AGC) using a capacitor in ASK mode Channel Monitor looks for 1 bits on the radio while waiting to send start symbol/preamble detection
Mica2 Release Set a fixed noise floor threshold On transmission: Take RSSI reading If reading > floor, transmit on next byte boundary from radio With a few months in the lab, what happens?
Collisions Oh My! Channel Clear
CC1000 Radio MAC Radio RSSI sampled at 5kHz Current MAC Adjusted Threshold Adjusted Threshold with Averaging Incoming Packet Channel Considered Clear Periodic Errors Channel Busy during Xmit
CC1000 Radio MAC Radio RSSI sampled at 5kHz Median over 5 sample window Average over 5 sample window Max over 5 sample window False Positives
Mica2 Joe Use calibrated ADC Adjust noise floor: After each packet transmission, sample RSSI and add to 10 sample FIFO queue Select median(Q) and add to EWMA On transmit: Take <=5 RSSI samples If one reading > floor, transmit on next byte boundary from radio Downside: can take up to 10 packets for the noise floor to settle
Comparison MicaMica2 RelMica2 Joe Init MAC Backoff16 (5.3) 3.2ms ms ms Congest Backoff16 (5.3) 3.2ms 29*16 193ms ms Noise FloorAGC (Hardware) FixedAGC (Software)
Brief Low Power Operation Mica Snooze: Node is either on or off Radio: Can detect channel activity in microseconds Radio startup time is negligible (10s of s) Mica2 HPLPowerManagement: check the state of the mote and shut down if appropriate Radio: Currently can detect channel activity in 7.5ms (18 bytes) Using RSSI and MAC noise floor estimation, can reduce this time to ~1ms. Radio start up time is up to 2500 s!
ACKs Revisited If we can now reliably detect channel activity, can we do ACKs? Answer: Hopefully. How? By switching modes and sending data (or pulse sending data), the receiver can detect this signal Think amplitude shift keying May be able to detect hidden terminals too If ACK doesnt have pattern but instead is constant energy, then someone didnt detect the original transmitter and transmitted over him Can be done in 4-5 bytes and doesnt require the receiver to synchronize! … but it hasnt been tried yet.
Open Questions Allow Application to control MAC backoff? Is TOS_Msg the right networking abstraction for building sensor network apps and services? OSI? S-MAC? What does a stack look like where you can change MAC layers, security models, and encodings? Mica and Mica2 stacks are close, but not quite there…