On Sun, Jan 25, 2009 at 11:38 PM, Kenneth Bannister <[email protected]> wrote: > On Sun, Jan 25, 2009 at 8:28 PM, <[email protected]> wrote: >> I'm using a TelosB mote attached to a custom-made breakout box to read data >> from four sensors. The sensors are Decagon's 5TE model >> (http://www.decagon.com/literature/manuals/5TE.pdf) and the breakout box >> uses a 4-1 multiplexor/demultiplexor from Texas Instruments >> (http://www.datasheetcatalog.org/datasheet2/9/0o6p5fzdqee9l4dwqaq5o5ro6r3y.pdf). >> The ADC0, ADC1, and ADC2 pins are used to select which sensor to read from, >> and the readings are sent back to the UART receiving pin (the one next to >> the Vcc pin). The main body of the code is provided at >> http://docs.tinyos.net/index.php/TinyOS_2.x_index_of_contributed_code#ECH2O-TE_soil_probe >> , with a couple minor changes as the probes' data formats are slightly >> different. >> >> When I tell the mote to read from a sensor that's not plugged in, the code >> returns a TIMEOUT error. When I tell it to read from a sensor that is >> plugged in, it returns an OVERFLOW error. I tested the buffer after the >> OVERFLOW error, and it appears to be filled with zeros. (It should contain >> three 2-to-4-digit numbers, in ASCII characters, separated by spaces and >> followed by a CR character.) Lengthening the buffer far past the expected >> size still produces an OVERFLOW error, and the entire buffer is still filled >> with zeros. If anyone can suggest possible reasons for this, or other tests >> I could run to find more information, I'd greatly appreciate it. >> >> -Kyle >> > > Sorry to hear you're having problems, Kyle. The OVERFLOW error > indicates that no CR has been received within the maximum expected > number of bytes. This makes sense if the buffer is filled with zeros. > > What sort of testing have you done? I would take an incremental > approach. First be sure the probe itself is OK without use of the > TelosB. We used a Crossbow MIB510 (via the mica2dot pins) and a > generic serial comm program, and saw the expected output. Next I'd > hook up the Telos, but try it without the multiplexer. > > Also are you sure your power source meets the probe's specs? > > Ken >
A couple of other thoughts: You could also try simplifying the driver until you get something that "succeeds". Look at the UartStream.receivedByte handler and the completionTask() task. For example a good starting point would be to say success is just receiving a byte, then look for a non-zero byte -- which seems to be the problem now. Also it's conceivable there is some faulty interaction with the latest base TinyOS system. The most recent version I tested was CVS from 2008-05-30, which predates 2.1. IIRC I used that date to avoid the new type safe code which was being integrated as I was testing. Good luck, Ken _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
