1. If you are compiling an application such as Delta using the "lowpower" option like this
make tmote lowpower
2. Then there is a known bug that causes synchronization to fail.
3. To prevent this bug, download this new version of NetSyncM.nc and copy it to the /tos/lib/netsync directory, replacing the existing file.
----------------------------------------------------------------------------------
void setSyncMaster() {
uint32_t now;
// if a find is in progress, disable the find
call SPNeighbor.findDone();
atomic {
m_smsg->hopcount = 0;
m_nexton = m_nextoff = 0;
broadcast.addr = TOS_BCAST_ADDR;
m_smsg->global_time = m_smsg->local_time = call LocalTime.get();
now = m_smsg->global_time & 0xFFFF0000;
broadcast.timeon = now + (TIME_ON 1 PERIOD);
broadcast.timeoff = now + (TIME_OFF 1 PERIOD);
m_smsg->on = TIME_ON;
m_smsg->off = TIME_OFF;
m_timeout = 0;
}
// insert into the neighbor table
call SPNeighbor.insert(&broadcast);
}
----------------------------------------------------------------------------------
4. Recompile and reinstall your application using make tmote lowpower for the changes to take effect.
댓글 없음:
댓글 쓰기