Re: [Tinyos-help] IPv6 and routing protocols
On Aug 21, 2007, at 11:01 PM, Pedro Pinto wrote: Hi, Where I can find examples that uses IPv6 with one of the routing protocols (Dissemination or Collection). You can't. While net2 is working on a 6lowpan stack, collection and dissemination use active messages, a link-layer packet format. That is, collection and dissemination are currently implemented as layer 3 protocols which would sit alongside IPv6. Phil ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] MACs for tinyos2.x
Hi all, I would like to know what MAC is implemented in tinyos2.x? B-MAC or S-MAC or what exactly ? where can I find information about them?? thanks for your helps Sara ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] low power listening - actual listening time?
When using low power listening, as discussed in the duty cycle help thread, I understand that the ON time is approx 5 ms. does anyone know approximately how long the radio is actually receiving during this period? I assume that some of it is due to start up time and that the receiver must be enabled for a certain length of time in order to detect a signal. The main reason I ask is because I am trying to work out just how much of a problem clock drift might be. I have read in a paper that the clock drift of a mica2 is approx 40 µs per second which amounts to 2.4 ms per minute. Is there a commonly used rule of thumb perhaps for estimating what the extra amount of time a transmitter might have to be active prior to another Motes estimated low power listening wakeup time. For example, if receive Mote is known to be on a one minute sleep period and the transmit node knows when this receive Mote was last awake, is it normal to begin transmission about 2.4 ms before you think receive Mote might wake up? *** Please consider the environment before printing this email. *** This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may not be divulged to any third party without the express permission of the originator. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thales Research Technology (UK) Limited. *** ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Request for Comments on TEP 113
Dear TinyOS developer community: TinyOS Extension Proposal (TEP) 113 on Serial Communications has Been released for public review. I am writing to solicit comments and Suggestions on TEP 113 before it is finalized. Your comments are Essential to providing feedback and driving revisions to the TEP. Soif you have an active interest in the serial communications API and Protocol for TinyOSI encourage you to send me comments. You can access the text for TEP 113 here: http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/ HTML/tep113.HTML Please direct all commentsquestionsand concerns to me. I will collect all feedback and forward to the authors of the TEP in About 3 weeks. Thanks! Matt Welsh Greetings Matt Welsh, I hope it is not too late to respond, and provide some feedback about TEP113 In [ 3.6 Packet Format ] the last sentence is about description of protocol field (P) of the example shown few lines above. It is said there that value is related to SERIAL_PROTO_ACK form the Serial.h, which is correct, but in same time the hex and decimal values that are shown in sentence and in example are the original ones 0x40 (64) as they are in HDLC or in TOS1. In TOS 2 in Serial.h they are different, so I think in the TEP113, the real value 0x43 (67) should be seen, no matter that the example is not exactly real one. This also leads that the protocol example - should be with values from TOS2 too, like: ``7e 43 09 00 be ef 05 7d 5d 06 01 02 03 04 05 7e`` Best regards Hristo Bojkov ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] SIM: Random
Hi all I'm working with TinyOS1.X. I want to know what the first line at the begining of any simulation means: SIM: Random seed is 320125 Does this value influences the simulation? if yes how? thanks a lot in advance *Khawal* ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] SendMsg.sendDone() - not signaled
Hi, I have some problems with the SendMsg.sendDone() as it's not signaled. My files/modules are as follows: Makefile: COMPONENT=IkExp01 PFLAGS += -I%T/platform/pc/CC1000Radio include ../Makerules IkTestMsg.h: enum { AM_IKTESTMSG = 38 }; typedef struct IkTestMsg { uint16_t addr;// Address of receiving mote uint16_t cnt; // Counter uint16_t src; // Source address } IkTestMsg; IkTest01.nc: includes IkTestMsg; configuration IkExp01 { } implementation { components Main, IkExp01M, GenericComm as Comm, TimerC; Main.StdControl - IkExp01M.StdControl; Main.StdControl - TimerC.StdControl; IkExp01M.SendMsg - Comm.SendMsg[AM_IKTESTMSG]; // Starts with sending message only // IkExp01M.ReceiveMsg - Comm.ReceiveMsg[AM_IKTESTMSG];// Commentted 21 Aug 2007 IkExp01M.Timer - TimerC.Timer[unique(Timer)]; } IkTest01M.nc: includes IkTestMsg; module IkExp01M { provides interface StdControl; uses { interface SendMsg; // interface ReceiveMsg;// Start with sending first interface Timer; } } implementation { bool pending; TOS_Msg local_msg; uint16_t counter; task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); } pending = FALSE; } dbg(DBG_USR1, Pending message in buffer!\n); } command result_t StdControl.init() { pending = FALSE; return SUCCESS; } command result_t StdControl.start() { call Timer.start(TIMER_REPEAT, 1000); return SUCCESS; } command result_t StdControl.stop() { call Timer.stop(); return SUCCESS; } event result_t Timer.fired() { post SendPacket(); return SUCCESS; } event result_t SendMsg.sendDone(TOS_MsgPtr msg, result_t success) { if (pending msg == local_msg) { pending = FALSE; dbg(DBG_USR1, Message Sending Done\n); counter++; } return SUCCESS; } } I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems to me that after the first sending, there is a message pending in the buffer. Any suggestions would be appreciated. Many thanks, Ittipong ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] SendMsg.sendDone() - not signaled
Hi, In the task SendPacket() you always set pending to FALSE. Try to set it only to false if there was an error: task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); pending = FALSE; } } dbg(DBG_USR1, Pending message in buffer!\n); } Cheers, Urs Ittipong Khemapech schrieb: Hi, I have some problems with the SendMsg.sendDone() as it's not signaled. My files/modules are as follows: [..] task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); } pending = FALSE; } dbg(DBG_USR1, Pending message in buffer!\n); } [..] I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems to me that after the first sending, there is a message pending in the buffer. Any suggestions would be appreciated. Many thanks, Ittipong ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] acknowledgements in Tinyos2.0.2 using BaseStationCC2420, not supported?
Hi all, I am trying to implement acknowledgementsin my telosb motes, using the tinyos2.0.2. I am using the component CC2420ActiveMessageC with the interface PacketAcknowledgements as suggested in the TestAcks application of folder cc2420. However i can make this work using the BaseStationCC2420 application ( tinyos2.0.1). The source does not receive any acknowledgments from the BaseStation. I found out that in the makefile there is the declaration: CFLAGS += -DCC2420_NO_ACKNOWLEDGEMENTS, which explains the lack of ack. However when i try to compile BaseStationCC2420 without this option i have this error: compiling BaseStationC to a telosb binary ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -D'TOSH_DATA_LENGTH=102' -DIDENT_PROGRAM_NAME=\BaseStationC\ -DIDENT_USER_ID=\tandre\ -DIDENT_HOSTNAME=\homenux\ -DIDENT_USER_HASH=0xb4d39b1cL -DIDENT_UNIX_TIME=0x46cc4aafL -DIDENT_UID_HASH=0xeb773d58L BaseStationC.nc -lm In file included from /opt/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlC.nc:53, from /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:61, from /opt/tinyos- 2.x/tos/chips/cc2420/CC2420ActiveMessageC.nc:58, from /opt/tinyos-2.x/tos/platforms/telosa/ActiveMessageC.nc:61, from BaseStationC.nc:71: In component `CC2420ControlP': CC2420ControlP.nc :236: `CC2420Config.getShortAddr': async mismatch with declaration /opt/tinyos-2.x/tos/chips/cc2420/interfaces/CC2420Config.nc:64: previous declaration of `CC2420Config.getShortAddr' CC2420ControlP.nc:244: `CC2420Config.getPanAddr': async mismatch with declaration /opt/tinyos-2.x/tos/chips/cc2420/interfaces/CC2420Config.nc:70: previous declaration of `CC2420Config.getPanAddr' CC2420ControlP.nc:76: `CC2420Config.setAutoAck' not implemented CC2420ControlP.nc:76: `CC2420Config.isAddressRecognitionEnabled' not implemented CC2420ControlP.nc:76: `CC2420Config.setAddressRecognition' not implemented CC2420ControlP.nc:76: `CC2420Config.isAutoAckEnabled' not implemented CC2420ControlP.nc:76: `CC2420Config.isHwAutoAckDefault' not implemented In component `CC2420ControlC': /opt/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlC.nc:98: cannot find `ActiveMessageAddress' make: *** [exe0] Error 1 I know that the CC2420 stack was changed in this last version. Are we still waiting for a updated BaseStationCC2420 (since in 2.0.2 cvs it seems to be deleted), or am I missing something? Thanks in advance, Tiago Camilo ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] MTS310 voltage level and light value correlated?
Hallo, I'm using TOS 2.0.2 with MICAz/MTS310 and the Crossbow sensor board drivers to measure light values. I recognized a dependency between voltage level of the batteries and the light value. The values are measured under equal conditions... Raw Light: ~766 (ID4), ~783 (ID5), ~799 (ID6) and ~912 (ID3) Voltage ~: 3.1V (ID4), 2.9V (ID5), 3.0V (ID6) and 2.6V (ID3) Is this normal or a bug with the drivers? Replacement of batteries of mote 3 resulted in lower values... Greetings Christian khawla lahmar schrieb: Hi all I'm working with TinyOS1.X. I want to know what the first line at the begining of any simulation means: SIM: Random seed is 320125 Does this value influences the simulation? if yes how? thanks a lot in advance *Khawal* ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Christian Hermann Am Weinberg 9 08529 Plauen Fax +49 3741 470159 Tel +49 173 4020035 [EMAIL PROTECTED] http://www.christian-hermann.de ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] low power listening - actual listening time?
Although I don't have much advice on clock drift, the CC2420 low power listening transmitter (micaz / tmote) should transmit a little longer than the receive check period, ensuring overlap. In the case of the CC2420, the 5 ms is approximately how long the radio is in receive mode. The radio actually kicks on for a little longer than that because the crystal oscillator powers up - this is not included in the 5 ms measurement. 5 ms is much less than the amount of time it takes to receive a packet (especially with CSMA) because it's only detecting channel energy. Once it sees energy on the channel, it stays awake longer to receive the packet. The CC1000 radio (mica2) previously did a preamble byte check, which is much more complex than the newer implementations (BMAC) that sense channel energy. In the case of the CC1000 radio, the receive check is much less than 5 ms. -David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murray, Ben Sent: Wednesday, August 22, 2007 2:28 AM To: tinyos-help@Millennium.Berkeley.EDU Subject: [Tinyos-help] low power listening - actual listening time? When using low power listening, as discussed in the duty cycle help thread, I understand that the ON time is approx 5 ms. does anyone know approximately how long the radio is actually receiving during this period? I assume that some of it is due to start up time and that the receiver must be enabled for a certain length of time in order to detect a signal. The main reason I ask is because I am trying to work out just how much of a problem clock drift might be. I have read in a paper that the clock drift of a mica2 is approx 40 µs per second which amounts to 2.4 ms per minute. Is there a commonly used rule of thumb perhaps for estimating what the extra amount of time a transmitter might have to be active prior to another Motes estimated low power listening wakeup time. For example, if receive Mote is known to be on a one minute sleep period and the transmit node knows when this receive Mote was last awake, is it normal to begin transmission about 2.4 ms before you think receive Mote might wake up? *** Please consider the environment before printing this email. *** This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may not be divulged to any third party without the express permission of the originator. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thales Research Technology (UK) Limited. *** ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] acknowledgements in Tinyos2.0.2 usingBaseStationCC2420, not supported?
I'd like to take a look at this, but will be unavailable to do so today. Tomorrow I'll probably have time to investigate and get back with you. Thanks for the report -David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tiago Camilo Sent: Wednesday, August 22, 2007 7:55 AM To: tinyos-help@Millennium.Berkeley.EDU Cc: Philip Levis Subject: [Tinyos-help] acknowledgements in Tinyos2.0.2 usingBaseStationCC2420, not supported? Hi all, I am trying to implement acknowledgementsin my telosb motes, using the tinyos2.0.2. I am using the component CC2420ActiveMessageC with the interface PacketAcknowledgements as suggested in the TestAcks application of folder cc2420. However i can make this work using the BaseStationCC2420 application ( tinyos2.0.1). The source does not receive any acknowledgments from the BaseStation. I found out that in the makefile there is the declaration: CFLAGS += -DCC2420_NO_ACKNOWLEDGEMENTS, which explains the lack of ack. However when i try to compile BaseStationCC2420 without this option i have this error: compiling BaseStationC to a telosb binary ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -D'TOSH_DATA_LENGTH=102' -DIDENT_PROGRAM_NAME=\BaseStationC\ -DIDENT_USER_ID=\tandre\ -DIDENT_HOSTNAME=\homenux\ -DIDENT_USER_HASH=0xb4d39b1cL -DIDENT_UNIX_TIME=0x46cc4aafL -DIDENT_UID_HASH=0xeb773d58L BaseStationC.nc -lm In file included from /opt/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlC.nc:53, from /opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:61, from /opt/tinyos- 2.x/tos/chips/cc2420/CC2420ActiveMessageC.nc:58, from /opt/tinyos-2.x/tos/platforms/telosa/ActiveMessageC.nc:61, from BaseStationC.nc:71: In component `CC2420ControlP': CC2420ControlP.nc :236: `CC2420Config.getShortAddr': async mismatch with declaration /opt/tinyos-2.x/tos/chips/cc2420/interfaces/CC2420Config.nc:64: previous declaration of `CC2420Config.getShortAddr' CC2420ControlP.nc:244: `CC2420Config.getPanAddr': async mismatch with declaration /opt/tinyos-2.x/tos/chips/cc2420/interfaces/CC2420Config.nc:70: previous declaration of `CC2420Config.getPanAddr' CC2420ControlP.nc:76: `CC2420Config.setAutoAck' not implemented CC2420ControlP.nc:76: `CC2420Config.isAddressRecognitionEnabled' not implemented CC2420ControlP.nc:76: `CC2420Config.setAddressRecognition' not implemented CC2420ControlP.nc:76: `CC2420Config.isAutoAckEnabled' not implemented CC2420ControlP.nc:76: `CC2420Config.isHwAutoAckDefault' not implemented In component `CC2420ControlC': /opt/tinyos-2.x/tos/chips/cc2420/control/CC2420ControlC.nc:98: cannot find `ActiveMessageAddress' make: *** [exe0] Error 1 I know that the CC2420 stack was changed in this last version. Are we still waiting for a updated BaseStationCC2420 (since in 2.0.2 cvs it seems to be deleted), or am I missing something? Thanks in advance, Tiago Camilo ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] problem using Eclipse with TinyOS plugin on Ubuntu
Hi all, Does anyone successfully use TinyOS plugin for Eclipse under linux machine? Every time I try to create an application, it could not get through. Is TinyOS plugin for Eclipse supported on Linux system? - Gary - Shape Yahoo! in your own image. Join our Network Research Panel today!___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] SendMsg.sendDone() - not signaled
Hi Urs, Thanks for your suggestion. I tried and got the same result. Seems that the call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg); returns SUCCESS only for the first time it's called. If I put the pending = FALSE; in if-statement, it'll always make the if condition in the event SendMsg.sendDone() return FALSE. Any further suggestions would be appreciated. Ittipong On 22/08/07, Urs Hunkeler [EMAIL PROTECTED] wrote: Hi, In the task SendPacket() you always set pending to FALSE. Try to set it only to false if there was an error: task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); pending = FALSE; } } dbg(DBG_USR1, Pending message in buffer!\n); } Cheers, Urs Ittipong Khemapech schrieb: Hi, I have some problems with the SendMsg.sendDone() as it's not signaled. My files/modules are as follows: [..] task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); } pending = FALSE; } dbg(DBG_USR1, Pending message in buffer!\n); } [..] I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems to me that after the first sending, there is a message pending in the buffer. Any suggestions would be appreciated. Many thanks, Ittipong ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] TOSSIM 2.x running slow
Hi , We are running some throughput simulations on TOSSIM 2.0.2 that we installed from the TinyOS website. In the simulation we have a single receiver and two senders. The topology is such that all nodes can hear each other. In the simulation the senders continuously send packets to the receiver by posting a send task the minute sendDone is returned. The throughput values that we are getting are quite believable (~300 pkts/sec), however the simulation is quite slow. For a 5 second simulation it takes close to an hour to complete. Could this be due to the new noise model being used ? We are using the complete meyers-heavy.txt file for generating the noise model. Thanks, Avinash -- Phd Dept. of Electrical Engineering University of Southern California http://www-scf.usc.edu/~asridhar ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] SendMsg.sendDone() - not signaled
send() returns fail when it is still working on a message (and for reasons...), so this may indicate that you are trying to send too fast. That's the original point of the pending state variable, so make sure you have that logic worked out correctly. MS Ittipong Khemapech wrote: Hi Urs, Thanks for your suggestion. I tried and got the same result. Seems that the call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg); returns SUCCESS only for the first time it's called. If I put the pending = FALSE; in if-statement, it'll always make the if condition in the event SendMsg.sendDone() return FALSE. Any further suggestions would be appreciated. Ittipong On 22/08/07, *Urs Hunkeler* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, In the task SendPacket() you always set pending to FALSE. Try to set it only to false if there was an error: task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send (TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); pending = FALSE; } } dbg(DBG_USR1, Pending message in buffer!\n); } Cheers, Urs Ittipong Khemapech schrieb: Hi, I have some problems with the SendMsg.sendDone() as it's not signaled. My files/modules are as follows: [..] task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); } pending = FALSE; } dbg(DBG_USR1, Pending message in buffer!\n); } [..] I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems to me that after the first sending, there is a message pending in the buffer. Any suggestions would be appreciated. Many thanks, Ittipong ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Platform: WinXP/Cygwin TinyOS version: 1.x, Boomerang Programmer: MIB510 Device(s): Mica2, MicaZ, Tmote Sensor board: homebrew ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Reg: TPSN Implementation in Tinyos
I was trying to implement the Time synchronization protocol (TPSN) in TinyOS.1x, I download the code from the following link http://www.ee.ucla.edu/~saurabh/time_synchronization/NesC-TPSNsync-1.1.zip but I had the following errors: In file included from C:/cygwin/cygwin/opt/tinyos-1.x/tos/system/tos.h:144: C:/cygwin/cygwin/opt/tinyos-1.x/tos/platform/xsm/hardware.h:199:1: warning: no newline at end of file CC1000RadioIntM.nc: In function `StdControl.init': CC1000RadioIntM.nc:217: subscripted value is neither array nor pointer CC1000RadioIntM.nc: In function `SpiByteFifo.dataReady': CC1000RadioIntM.nc:518: too few arguments to function `RadioSendCoordinator.startSymbol' CC1000RadioIntM.nc:567: `CC1K_LPL_ValidPrecursor' undeclared (first use in this function) CC1000RadioIntM.nc:567: (Each undeclared identifier is reported only once CC1000RadioIntM.nc:567: for each function it appears in.) CC1000RadioIntM.nc:567: subscripted value is neither array nor pointer CC1000RadioIntM.nc:602: subscripted value is neither array nor pointer CC1000RadioIntM.nc:670: too few arguments to function `RadioReceiveCoordinator.startSymbol' CC1000RadioIntM.nc: At top level: CC1000RadioIntM.nc:808: conflicting types for `RadioSendCoordinator.startSymbol' C:/cygwin/cygwin/opt/tinyos-1.x/tos/interfaces/RadioCoordinator.nc:31: previous declaration of `RadioSendCoordinator.startSymbol' CC1000RadioIntM.nc:810: conflicting types for `RadioReceiveCoordinator.startSymbol' C:/cygwin/cygwin/opt/tinyos-1.x/tos/interfaces/RadioCoordinator.nc:31: previous declaration of `RadioReceiveCoordinator.startSymbol' make: *** [exe0] Error 1 did any one implemented TPSN successfully on TinyOS.1x.??? Thanks Dheeraj Reddy Bheemidi Electrical Engineering Cleveland state University. Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] SendMsg.sendDone() - not signaled
Hi, Finally, I did it by having another variable in my module. It is increased when the SendMsg.sendDone() returns SUCESS and decreased otherwise. The SendPacket() is posted if and only if this variable is greater than zero. Many thanks for your suggestions :-) Ittipong On 23/08/07, Michael Schippling [EMAIL PROTECTED] wrote: send() returns fail when it is still working on a message (and for reasons...), so this may indicate that you are trying to send too fast. That's the original point of the pending state variable, so make sure you have that logic worked out correctly. MS Ittipong Khemapech wrote: Hi Urs, Thanks for your suggestion. I tried and got the same result. Seems that the call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg); returns SUCCESS only for the first time it's called. If I put the pending = FALSE; in if-statement, it'll always make the if condition in the event SendMsg.sendDone() return FALSE. Any further suggestions would be appreciated. Ittipong On 22/08/07, *Urs Hunkeler* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, In the task SendPacket() you always set pending to FALSE. Try to set it only to false if there was an error: task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send (TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); pending = FALSE; } } dbg(DBG_USR1, Pending message in buffer!\n); } Cheers, Urs Ittipong Khemapech schrieb: Hi, I have some problems with the SendMsg.sendDone() as it's not signaled. My files/modules are as follows: [..] task void SendPacket() { IkTestMsg *message = (IkTestMsg *)local_msg.data; if (!pending) { pending = TRUE; message-addr = TOS_BCAST_ADDR; message-cnt = counter; atomic { message-src = TOS_LOCAL_ADDRESS; } if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), local_msg)) { dbg(DBG_USR1, Sending Message\n); dbg(DBG_USR1, Source address = %d\n, message-src); dbg(DBG_USR1, Value = %d\n, counter); } pending = FALSE; } dbg(DBG_USR1, Pending message in buffer!\n); } [..] I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems to me that after the first sending, there is a message pending in the buffer. Any suggestions would be appreciated. Many thanks, Ittipong ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Platform: WinXP/Cygwin TinyOS version: 1.x, Boomerang Programmer: MIB510 Device(s): Mica2, MicaZ, Tmote Sensor board: homebrew ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help