Hello all, I've been writing code to send messages using the Sensornet Protocol. I'm struggling with sending a large buffer (don't want to use Spram) of data from a mote to matlab. Anyway, I send chunks of the large data buffer, residing on the mote, and combine the chunks in matlab to rebuild the buffer.
On the mote side I have two tasks, something like this I declare 1x TOS_msg and 1x sp_message_t structures sendTask(){ initial configuration post sendHelpTask } helpTask(){ load a new chunk into the data buffer send the data buffer to matlab, using SPSend.send } SPSend.sendDone(){ if everything's ok, I post another helpTask, untill I've sent all bits of the buffer } My problem is this: SPSend.send places a pointer to the message datastructure in a pool of pointers. So sendDone() is raised when the message is placed in the pool, not when the message is sent. So ... when the messages are finally sent, the message buffer only contains the last part of the data buffer, so I get multiple instances of the last part instead of the whole buffer (in pieces of course). I thought that when I post a task that sends the next message from within a sendDone event, I'd be able to reuse the buffers, but it seems like it's not the case. Can anybody help me with this, I need to be able to send a number of messages and reuse the message data buffer everytime. Please let me know if this post needs more information. Thanks in advance... -- Jon _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help