[Tinyos-help] Program freezes - Mica2Dot/Mica2
Edgar Charry
echarry at hotmail.com
Fri May 16 21:00:19 PDT 2008
Hi all ,
I am just trying to increase my throughput with a Mica2Dot/Mica2 (still on that), but I am having one specific problem when I am disabling the ack read stage. I've changed the CC1000RadioM.nc to:
1) The command Send.send(TOS_MsgPtr pMsg) (which is being fired by one timer on the highest level - TestSensor.nc) should implement straight the tx of the packet WITHOUT listening to the RSSIADC.dataready (disabling collision avoidance) - result: Good.. throughput increased and that gave me more room to decrease the TIMER_REPEAT period of that timer from TestSensor.nc
2) Disabling of the ack packet: if you good recall, there are many states and substates during the tx phase (tx_preamble, tx_sync etc). I've skipped the stage where the tx enters in rx mode to wait for the ack (from TXSTATE_CRC it goes straight off to TXSTATE_DONE). This is when the problem shows up. It just freezes the transmission => Packets start being txmitted and parsed, BUT ALEATORY it just stops sending packets.IMPORTANT: it doesn't matter that the TOSBase send or doesn't send the ack to the transmitter -- it'll keep transmitting fine (and I keep seeing the packets being received in XSniffer), AS LONG AS I DON'T DISABLE THE ACK_READ form the TRANSMITTER, as explained before!I know that this problem at the transmitter, because serially, I've played with the red LED, setting for OFF the stages that where working and ON where they stopped. I finally got to the point where it remains ON only when it gets to the TX_STATE_DONE. If the rest was set to OFF, naturally the problem is at this phase. What does it do? Calls the task PacketSent, which will signal the event of a packet send (send.done to the highest level). Below you find it and the task. It freezes when the red led is on. So I imagine it manages to send this packet, but SOMETHING HAPPENS that maybe the next packet just is not sent off. And is not during the first stages (except for the last one - DURING the task posting), because obviously the LED will remain off (as you can see below).
Do you have any idea what might be happening with my code? Sorry for the big E-mail.
Otherwise just thanks a lot for your attention and patience. Best wishes!Edgar Charry
************************************************************************ case TXSTATE_DONE: default: //call RSSIADC.getData(); call Leds.redOff(); atomic bTxPending = FALSE; atomic txbufptr->ack = 1; if (post PacketSent()) { // If the post operation succeeds, goto Idle // otherwise, we'll try again. RadioState = IDLE_STATE; } break;************************************************************************ task void PacketSent() { TOS_MsgPtr pBuf; //store buf on stack atomic { txbufptr->time = 0; pBuf = txbufptr; }
call Leds.redOff(); signal Send.sendDone((TOS_MsgPtr)pBuf,SUCCESS); call Leds.redOn(); atomic bTxBusy = FALSE; }
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080517/e8cca835/attachment.htm
More information about the Tinyos-help
mailing list