[Tinyos-devel] TelosB as base station?
Steve McKown
rsmckown at yahoo.com
Mon Jul 9 07:50:24 PDT 2007
Hi Matt,
I've seen this problem too (C SDK, Linux host). Here's the text of a message
I posted last week. Perhaps this is what is happening in your case as well?
---- Forwarded message ----
Hi,
serialsource.c does not have a maintainer attribution, so I'm posting this
here.
In TinyOS 2.0.x, the C SDK's serialsource.c contains a logic error in
write_serial_packet() that can cause a deadlock. This situation occurs when
write_serial_packet() is called by the host and the attached mote fails to
see the ending SYNC delimiter sent (due to a communication error). The host
waits in read_and_process() for an ack from the mote, and the mote waits in
RXSTATE_INFO for more data from the host. The deadlock is broken if the mote
forwards a radio packet to the host.
The patch below may be a suitable resolution.
Cheers,
Steve
Index: serialsource.c
===================================================================
--- serialsource.c (revision 1024)
+++ serialsource.c (working copy)
@@ -768,6 +768,9 @@
{
struct packet_list *entry;
+ if (source_wait(src, &deadline) < 0)
+ return 1;
+
read_and_process(src);
entry = pop_protocol_packet(src, P_ACK);
if (entry)
@@ -779,8 +782,6 @@
if (acked == src->send.seqno)
return 0;
}
- else if (source_wait(src, &deadline) < 0)
- return 1;
}
}
---- End of forwarded message ----
On Thursday 05 July 2007 06:58:04 am Matt Welsh wrote:
> Hi folks,
>
> We have been having continued problems with using a TelosB mote as a
> base station and I'm wondering if there's something we're doing wrong.
> Basically, using BaseStationCC2420 on a TelosB along with the C-based
> serialforwarder is just incredibly unstable. It seems to hang after
> bursts of packets and we usually have to restart the base station mote.
> (The code in support/sdk/c/serialsource.c also prints the quite useful
> error message 'foo' - apparently when no data is available on the serial
> port - we commented that out long ago.)
>
> Not sure if this is a problem with the TelosB, the sf, or both. I
> remember having similar problems with TinyOS 1.x and am somewhat
> surprised this hasn't been resolved in 2.x - or maybe it has and we
> don't know the fix?
>
> We do find that MicaZ motes are very stable as base stations (running
> for weeks at a time without any hang).
>
> Thanks -
> Matt
>
>
>
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
> !DSPAM:468cf089171342634645450!
More information about the Tinyos-devel
mailing list