Skip to content

at86rf2xx: cancel receiving when preparing for TX#3993

Merged
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
daniel-k:pr/at86rf2xx_cancel_rx
Sep 30, 2015
Merged

at86rf2xx: cancel receiving when preparing for TX#3993
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
daniel-k:pr/at86rf2xx_cancel_rx

Conversation

@daniel-k
Copy link
Copy Markdown
Member

When preparing the device for TX, i.e. switching to the right state, the driver busy waits until an RX operation is finished. According to the usage of this internal function, the frame buffer will be overwritten with the frame to send anyway, so waiting only wastes time.

Additionally when canceling an ongoing RX operation, sending an ACK is also prevented so that the sender won't assume a successful transmission.

@daniel-k daniel-k added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Area: drivers Area: Device drivers labels Sep 29, 2015
@jnohlgard
Copy link
Copy Markdown
Member

Good catch!

I won't have time to test this tonight. Anyone with an at86rf2xx at the Hack'n'ACK, feel free to test on hardware and see if it still works. I guess the proper handling of the actual case described in the PR is kinda hard to verify in real life since it requires somewhat synchronized timing between the two nodes.

(The CSMA hardware logic should make sure that the transceiver does not start to transmit before the remote node has finished sending its packet)

@PeterKietzmann
Copy link
Copy Markdown
Member

So, I didn't write a test for that scenario but I can confirm that basic sending/receiving is still working with this PR (I used gnrc_networking to check that)

@PeterKietzmann PeterKietzmann added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 29, 2015
@PeterKietzmann
Copy link
Copy Markdown
Member

Green lights @gebart :-) !

@jnohlgard
Copy link
Copy Markdown
Member

ACK & go

jnohlgard pushed a commit that referenced this pull request Sep 30, 2015
at86rf2xx: cancel receiving when preparing for TX
@jnohlgard jnohlgard merged commit 7c3eabc into RIOT-OS:master Sep 30, 2015
@OlegHahm
Copy link
Copy Markdown
Member

Isn't that a bug fix that should also go into the release?

@daniel-k
Copy link
Copy Markdown
Member Author

It's not really a bug. The outside behaviour is the same, except for slightly faster execution in a rare case (and no ACK reply). But there's no reason to not include it I'd say. You choose ;)

@daniel-k daniel-k deleted the pr/at86rf2xx_cancel_rx branch October 9, 2015 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants