I am using Telosb motes, with the help of tutorials, I could able to log the data into flash memory of the mote. But I dont know how to retrieve the logged data from flash memory. Is there any kind of command which has to be given at the linux terminal to do this function. please guide me.
My program is to log the counter value when timer is fired.
module LogC {
uses {
interface Boot;
interface Leds;
interface Timer<TMilli>;
interface LogWrite;
}
}
implementation {
uint8_t counter=0;
typedef nx_struct logentry_t {
nx_uint8_t value;
} logentry_t;
logentry_t m_entry;
event void Boot.booted() {
call Timer.startPeriodic(200);
}
event void Timer.fired() {
counter++;
m_entry.value = counter;
if( call LogWrite.append(&m_entry, sizeof(logentry_t))==SUCCESS){;
call Leds.led1Toggle();
}
}
event void LogWrite.appendDone(void* buf, storage_len_t len,
bool recordsLost, error_t err) {
call Leds.led0Toggle();
}
event void LogWrite.syncDone(error_t err) { }
event void LogWrite.eraseDone(error_t err) { }
}