Dear Lars, >> Interesting. Maybe you are using long packets (127 bytes) and the >> regular ActiveMessageC uses only ~30 byte messages, or your SPI bus is >> not set to its maximum speed. Do you set TASKLET_IS_TASK? What else is >> running on the mote? Is the base station not sending back an ACK or a >> regular node? Maybe the receiving mote (which does not send back the >> ack packet in time) is the base station which also needs to do some >> work on the serial so it cannot reply back fast enough. > > Your in all points right. I let blip run on my nodes, so the packet are > quite big (between 60 up to 127 bytes). Additionally blip sends many packets > and has to do additional things like routing calculations. > > In my test-environment, the mote which should answer with an ACK was the > basestation. So it could really have to do additional work. I will test this > subject in detail and check your hints with the SPI bus speed and the > TASKLET_IS_TASK.
Would be nice to know what ack timeout you need for communication between regular nodes. The base station is a special case. The RF2xx driver handles all radio functions between the RF2xxDriverLayer and the MessageBufferLayer in interrupt context, and everything between the application and the MessageBufferLayer in task context. This means that if you receive a message, then in the interrupt generated by the last received byte we download the message, create the ack packet, upload the ack packet to the radio chip and start the transmission. The next interrupt will be at ack packet completion. However, if you define the TASKLET_IS_TASK macro, then all of these are moved to task context, so it will be slower to send back the ack packet. The base station uses the serial stack and that serial stack cannot handle these long interrupts (even though we never disable interrupts while handling the packet). I am pretty sure that there is a bug in the atmega 1281 serial driver or it is badly written as it requires tasks for time critical sections. For these reason the base station uses TASKLET_IS_TASK by default (set in the makefile). If you disable this macro, then the base station works for some time and then locks up. In the not so distant future I want to write a sound recorder which can sample a microphone at 8 KHz, send all this info over the air reliably, then the base station turns all the radio message to serial messages. For that I will have to understand where the bottlenecks are in the serial driver and fix those. At that point you will not need the TASKLET_IS_TASK at the base station. Bay the way, Janos Sallai posted to the tinyos mailing list (maybe the devel list) a patch that improves the serial stack on the IRIS, maybe that can also be useful for you. I have CC'd the tinyos-help mailing list, maybe others would also find this discussion interesting. Miklos _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help