-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendDone error codes #334
Comments
It is a bug in TOSSIM. EBUSY should be returned only when you call send when there is an outstanding send call, i.e., send was successful but sendDone is not signaled yet. |
Yes, as you mentioned EBUSY is returned by the send command. The sendDone as documented in the AMSend and Send interfaces returns SUCCESS, FAIL or ECANCEL. In TOSSIM there might be a possibility for EOFF (https://github.com/tinyos/tinyos-main/blob/master/tos/lib/tossim/TossimPacketModelC.nc#L285). In the CC2420TransmitP it seems another code ERETRY can go up to both Send.sendDone and AMSend.sendDone (https://github.com/tinyos/tinyos-main/blob/master/tos/chips/cc2420/transmit/CC2420TransmitP.nc#L531) |
I think we should update the documentation because EOFF and ERETRY are possible return values. |
I agree about EOFF, but I think ERETRY should not be returned to upper layers which are more interested to know whether the transmission resulted in a SUCCESS or FAIL at the end. |
many other places in the code use ERETRY so the question is in the radio stack -- what is the highest level to which it is appropriate to send ERETRY. |
Hi All,
It seems there is a mismatch in the error codes returned by the sendDone event (at least for TOSSIM). Thus, the AMSend and Send interfaces specify that sendDone returns FAIL if a transmission has failed (https://github.com/tinyos/tinyos-main/blob/master/tos/interfaces/AMSend.nc#L104). However, TossimPacketModelC.nc for example returns an EBUSY code for such a case (https://github.com/tinyos/tinyos-main/blob/master/tos/lib/tossim/TossimPacketModelC.nc#L245)
I am not sure if it is the case with other platforms, but a quick look to the CC2420TransmitP.nc (https://github.com/tinyos/tinyos-main/blob/master/tos/chips/cc2420/transmit/CC2420TransmitP.nc) seems to not return a FAIL code.
Please share your opinions on the appropriate fix
The text was updated successfully, but these errors were encountered: