Sun Microsystems V2.0 manual Conserving power using deep sleep mode, Monitoring radio activity

Models: V2.0

1 54
Download 54 pages 11.11 Kb
Page 37
Image 37

RSSI (received signal strength indicator) measures the strength (power) of the signal for the packet. It ranges from +60 (strong) to -60 (weak). To convert it to decibels relative to 1 mW (= 0 dBm) subtract 45 from it, e.g. for an RSSI of -20 the RF input power is approximately -65 dBm.

CORR measures the average correlation value of the first 4 bytes of the packet header. A correlation value of ~110 indicates a maximum quality packet while a value of ~50 is typically the lowest quality packet detectable by the SPOT’s receiver.

Link Quality Indication (LQI) is a characterization of the quality of a received packet. Its value is computed from the CORR, correlation value. The LQI ranges from 0 (bad) to 255 (good).

These values are obtained using:

myRadiogram.getRssi();

myRadiogram.getCorr();

myRadiogram.getLinkQuality();

Monitoring radio activity

It is sometimes useful to monitor radio activity, for example when investigating errors. Two sets of facilities are provided. One allows the last ten radio packets received to be displayed on demand, along with information about the state of the radio chip at the time the packets were read. The second facility provides a count of key errors in the MAC layer of the radio stack.

To view the last ten radio packets, do

IProprietaryRadio propRadio = RadioFactory.getIProprietaryRadio(); propRadio.setRecordHistory(true);

// radio activity including receiving packets propRadio.dumpHistory(); // prints info to system.out

To see counts of MAC layer errors, do

IProprietaryRadio propRadio = RadioFactory.getIProprietaryRadio(); propRadio.resetErrorCounters(); // set error counters to zero

… // radio activity provoking errors

System.out.println("RX overflows since reset " + propRadio.getRxOverflow()); System.out.println("CRC errors since reset " + propRadio.getCrcError()); System.out.println("Channel busy stopped TX " + propRadio.getTxMissed()); System.out.println("Short packets received " + propRadio.geShortPacket());

Conserving power using deep sleep mode

Shallow Sleep

A thread is idle if it is executing Thread.sleep(), blocked on a synchronization primitive or waiting for an interrupt from the hardware. Whenever all threads are idle the Sun SPOT drops into a power saving mode (“shallow sleep”) to reduce power consumption and extend battery life. Decisions about when to shallow sleep are taken by the Java thread scheduler inside the VM. This is transparent to applications – no special work on the part of the programmer is required to take advantage of it.

While considerable power can be saved during shallow sleep, it is still necessary to power much of the Sun SPOT hardware:

37

Page 37
Image 37
Sun Microsystems V2.0 manual Conserving power using deep sleep mode, Monitoring radio activity, Shallow Sleep