Hi, I am using telosb mote and UartStream interface in nesc to receive data from a sensor (Tinyos 2.1.2). Once UartStream.receive() is initiated and due to some reasons if the data is not received, the mote will keep on waiting for the data and is not able to receive or transmit any packets after that.
I have tried to implement a timeout, based on a timer and resource interface as shown below. But it could not solve the issue. uses interface Resource as Resource_uart_TIVAC; uses interface UartStream as uart_TIVAC; ----------- ----------- event void Resource_uart_TIVAC.granted() { if ((call uart_TIVAC.receive(refbuf, 4))== SUCCESS) call uarttimeout_timer.startOneShot(1024); } ------------ event void uarttimeout_timer.fired() { if(call Resource_uart_TIVAC.release()!= SUCCESS) { printf("uart not released\n"); printfflush(); } } -------------- components new Msp430Uart0C() as uart_sensor; The uart is not getting released and telosb radio is not able to transmit or receive any packets after that. Please suggest a way to handle this. Thanks for your valuable time. Regards Wishing you a happy new year 2018.. Jobish John
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help