[tinyos-help] clarifications about serial communication
Steve McKown
rsmckown at gmail.com
Wed Sep 12 16:56:20 PDT 2007
On Wednesday 12 September 2007 09:32:00 am Mayur Maheshwari wrote:
> Steve,
>
> Your response was of great help. Let me know if you can provide some
> pointers on how this could be done using the BSL or share the part of your
> code where the mote is reset if 3 "write failed" events trigger
> consecutively.
You can grab the logic from the tos-bsl program that comes in the tinyos-tools
package and installs into /usr/bin. I've attached a C snippet that I used.
Use the rest_gwbs() function. It's a poor substutue for solving the real
problem, but is an OK stopgap for development or testing, anyway...
Cheers,
Steve
>
> Thanks once again
> Mayur
>
> On 9/10/07, Steve McKown <rsmckown at yahoo.com> wrote:
> > On Sunday 02 September 2007 12:59:44 pm Mayur Maheshwari wrote:
> > > Hi Romain
> > >
> > > This is regarding the problem which you faced while sending the data to
> >
> > the
> >
> > > BaseStation from SerialForwarder(SF) when it continuously gives the
> >
> > "Write
> >
> > > Failed" event. Let me know if you got any success with that.
> > >
> > > I did few things and later found that the problem lies in the mote:
> > >
> > > 1. I stopped the SF, removed the modules controlling my mote from the
> >
> > linux
> >
> > > kernel i.e. usbserial and ftdi-sio while the mote is still plugged in.
> > > I restarted all the components and the sitaution was the same. However,
> >
> > the
> >
> > > mote was getting continous power from the USB all the time.
> > >
> > > 2. While the SF was running and "Write Failed" event coming up on every
> > > attempt to send data, I pushed the "reset" button on the telosB. This
> >
> > was a
> >
> > > mild success as the SF app was able to send the data after this.
> > >
> > > Right now I am thinking in a direction that the mote should stop and
> > > restart the radio and the UART if such an event occurs. This is not a
> >
> > good
> >
> > > technique but does help in automating the reset scenario.
> >
> > I also see this on our own msp430-based mote design. I tend to suspect
> > clock
> > drift of the DCO taking the baud rate out of spec. I've seen similar
> > behavior on read events as well, and in all cases so far, resetting the
> > mote
> > corrects the problem for some period of time. To work around this in the
> > mean time, our base station code resets the attached mote (using BSL) if
> > we
> > see 3 of these communications errors in a row.
> >
> > If this is the issue, then installing a crystal @ XT2 would solve the
> > problem.
> > We haven't had the time yet to try this out, but I'll report back if/when
> > we
> > ever do this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmote_reset.c
Type: text/x-csrc
Size: 1517 bytes
Desc: not available
Url : http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070912/1e2e8574/tmote_reset.c
More information about the Tinyos-help
mailing list