On Fri, Feb 17, 2012 at 3:48 PM, Sergio Gonzalez <[email protected]> wrote:
> Hi Eric, > > I don't know whether the radio drivers for the respective chips were > written so that if sendDone() returns a success value, then it means that > the packet's transmission is indeed complete. > I know explicitly what sendDone means is that all of the packet has been handed off to the radio's fifo. It is the signal that says you can send the next packet. It does NOT mean the packet has left the hardware and has been completed as far as the transmission is concerned. I'm not sure what exactly sync does. I haven't looked at what that does. Will probably get to it in the next month or so. At least for the 2520 chip. > Hopefully someone more experienced on transceiver details can help. Either > way, the available interfaces do not allow to specify the transmission > channel on a per-packet basis, so for the time being, using sync() and > syncDone() seems to address Ramakrishnan's need. > > Sergio > > > On 02/17/2012 11:38 AM, Eric Decker wrote: > > > That still doesn't help with seeing when the end of the packet has > actually gone out. > > On Wed, Feb 15, 2012 at 5:44 PM, Sergio Gonzalez <[email protected]>wrote: > >> Hi Ramakrishna, >> >> Before sending a packet, do: >> >> ... >> call CC2420Config.setChannel(<channel>); // 11 or 26, etc. >> call CC2420Config.sync(); >> ... >> >> Then, send the packet inside the synchDone callback afterwards: >> >> // Called after radio has tuned into a new channel >> event void CC2420Config.syncDone(error_t error) >> { >> if(error == SUCCESS) call AMSender.send(..); >> ... >> } >> >> >> Sergio Gonzalez >> >> >> > Hi , This is Ramakrishna, working on tinyos-2.1.1. I am experimenting on> >> dynamic channel switching for telosb mote. I am trying to send 2 packets> >> one in 26th channel and second in 11th channel. When i change the channel> >> from 26 to 11 after sending the first packet in my program, first packet> >> also being sent on 11th channel but not on 26th. why it is so? I am> >> modifying the channel only after getting 'sendDone' event of the first> >> packet. how it is overwriting the channel register with 11 before> >> transmitting the first packet? Please help me in this regard.> >> >> It is my understanding that sendDone gets generated when the last byte has >> been transfered to the h/w. It doesn't mean that the packet has acutally >> transmitted. >> >> So if you are changing the channel at that point you will probably cause >> problems for the back part of the packet. >> >> I'm not aware of an event being available from the h/w to indicate the >> complete TX has finished. Not sure if current h/w makes that >> available.... You will need to stare at the radio docs. >> >> >> You could try putting a delay of somekind to see if that helps. >> >> As far as the channel register changing, I have no clue. >> >> >> >> -- >> Eric B. Decker >> Senior (over 50 :-) Researcher >> >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Eric B. Decker > Senior (over 50 :-) Researcher > > > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
