| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
PacketLink.setRetries(msg, 0) should disable ACKs even if they were enabled for this msg before.
|
So how would I send a single packet that I want an acknowledgement for? Request the ack after I have set retries to 0? |
Sorry, something went wrong.
|
Well, there are contradicting descriptions for setRetries in TEP 127 and the PacketLink.nc. The TEP says: Sets the maximum number of times to retry the transmission of the message The interface file: Set the maximum number of times attempt message delivery Default is 0 @param 'message_t* ONE msg' @param maxRetries the maximum number of attempts to deliver the message The implementation for CC2420 follows the one in the interface file. So, to send a single acknowledged packet maxRetries should be set to 1, while setting it to 0 will result in a single unacknowledged transmission. |
Sorry, something went wrong.
|
Well, I don't necessarily see contradictions in the descriptions you listed, perhaps just the wording in the interface is bad/incorrect. A retry is an extra delivery, the Set the maximum number of times attempt message delivery Default is 0 would kind of actually mean that setting this to 0 would result in no send being done at all, but then the variable name is still maxRetries, so I would just reword the description. Neither of them however has anything to do with the acknowledgements, but I guess since calling setRetries with a number larger than 0 would enable acknowledgements, then calling with 0 should perhaps revert things back. Though in practice Packet.clear should probably be called instead and then the necessary flags set again, since it is not really possible to revert the flags if several commands were issued on a packet - you don't know if the acknowledgements flag was set because the user set it or because retries were set at some point. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PacketLink.setRetries(msg, 0) should disable ACKs
even if they were enabled for this msg before.