tests: add nimble_l2cap test and benchmark applications#11235
Merged
Conversation
This was referenced Mar 22, 2019
Member
|
Please rebase. |
93f8de2 to
24184e7
Compare
Contributor
Author
|
rebased |
miri64
requested changes
Mar 26, 2019
miri64
left a comment
Member
There was a problem hiding this comment.
Code-wise it looks good (can't say much about the functionality though, but obviously it works). Some nit-picks about Makefiles and style though.
| size_t step = 10; | ||
| size_t limit = APP_MTU; | ||
|
|
||
| if ((argc == 2) && strncmp(argv[1], "help", 4) == 0) { |
| static uint32_t _rxbuf[APP_MTU / 4]; | ||
| static uint32_t _txbuf[APP_MTU / 4]; | ||
|
|
||
|
|
| size_t pktsize = PKTSIZE_DEFAULT; | ||
| unsigned limit = FLOOD_DEFAULT; | ||
|
|
||
| if ((argc == 2) && strncmp(argv[1], "help", 4) == 0) { |
| USEMODULE += bluetil_ad | ||
|
|
||
| # Get the shared NimBLE and test configuration from the backend server | ||
| include $(CURDIR)/../nimble_l2cap_server/nimble.inc.mk |
Member
There was a problem hiding this comment.
Better use $(RIOTBASE) here. I had problems with this construct in #11256.
| USEMODULE += bluetil_ad | ||
|
|
||
| # Get the shared NimBLE and test configuration from the backend server | ||
| include $(CURDIR)/../nimble_l2cap_server/nimble.inc.mk |
| static bluetil_ad_t _ad; | ||
| static struct ble_gap_adv_params _adv_params = { 0 }; | ||
|
|
||
|
|
24184e7 to
07a1210
Compare
Contributor
Author
|
addressed comments and cppcheck findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
I continuously ran into buffering trouble with nimble connected to the buffer handling for connection oriented L2CAP channels. As I got tired debugging this, I decided its time for an automated and easy to use test application that can be used to stress-test these L2CAP COC connections. So this PR provides just that.
This test is still missing a fitting
pexpectscript for itsmake testtarget - this will be added soon in a follow up PR.Testing procedure
Take two NimBLE capable boards (e.g.
nrf52dkornrf52840dk) and flash the client and server application on them. Once they are both started, they should automatically connect and you can run thefloodandinctestcommands with any parameters... They should never crash :-)Issues/PRs references
This PR depends (is reabsed on) #11232 and #11233