Skip to content
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

Blestress fixes #986

Merged
merged 4 commits into from
Mar 4, 2024
Merged

Blestress fixes #986

merged 4 commits into from
Mar 4, 2024

Conversation

KKopyscinski
Copy link
Contributor

No description provided.

@KKopyscinski KKopyscinski marked this pull request as ready for review June 11, 2021 12:48
@KKopyscinski KKopyscinski requested a review from sjanc June 11, 2021 12:48
@KKopyscinski
Copy link
Contributor Author

@mkasenberg please review these changes

@KKopyscinski KKopyscinski marked this pull request as draft June 14, 2021 05:16
@KKopyscinski
Copy link
Contributor Author

There is still crash in test 14 - I'll update a PR with fix

@KKopyscinski KKopyscinski marked this pull request as ready for review June 15, 2021 06:55
@KKopyscinski
Copy link
Contributor Author

All crashes are resolved - the only problem left is silent restart on RX side during test 9 if test 7 was executed before - for now, skip test 7. Reason of this restart is yet unknown - there is no crash visible in debugger, no crash information is printed to console, HCI trace only shows lack of activity - basically, restart causes RTT to deattach. All tests are working if run independently.

.supervision_timeout = 0x0C80,
.min_ce_len = 0x0010,
.max_ce_len = 0x0300,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are those connections maintained in test for at least this timeout after last one is created?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are total of 15 successful concurrent connections. For example run, last succesfull connection occurs ~164343728us timestamp and first disconnect at 196078120us. This gives us 31.734392s. 0x0C80 is 3200, x10ms = 32s, which considering print delays seems pretty close IMO.

@sjanc
Copy link
Contributor

sjanc commented Apr 13, 2022

please rebase

@@ -75,3 +75,6 @@ syscfg.vals:

# Whether to save data to sys/config, or just keep it in RAM.
BLE_STORE_CONFIG_PERSIST: 0

# ACL buf size must be able to contain CoC MPS plus ACL header
BLE_ACL_BUF_SIZE: MYNEWT_VAL_BLE_L2CAP_COC_MPS+4
Copy link
Contributor

@rymanluk rymanluk Feb 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be (MYNEWT_VAL(BLE_L2CAP_COC_MPS) + 4 ) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This incorrectly expands to

#define MYNEWT_VAL_BLE_TRANSPORT_ACL_SIZE (MYNEWT_VAL_MSYS_1_BLOCK_SIZE-8)

and ignores +4. So we need to use MYNEWT_VAL_ variant. I think it's the same as for BLE_L2CAP_COC_MPS definition in nimble/host/syscfg.yml

@@ -39,7 +39,7 @@ extern "C" {
#define TX_PHY_MASK 0
#define RX_PHY_MASK 0
/* L2CAP SDU */
#define STRESS_COC_MTU (64000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need to decrease it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what was wrong there, reading commit message I mentioned some issue with ble_l2cap_coc_rx_fn. Whatever this was, was fixed and this commit is not needed - I retested it. I suspect that c1a2c99 was the fix

/* 7,8: PHY update tests cause that the device during the next test
* will stuck somewhere and will reset. Skip them for now.
* 13: Should work after fixing ble_gattc_notify_custom (nimble issue on GitHub)*/
for (i = 2; i < STRESS_UUIDS_NUM; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this patch still needeD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but modified - looks like all tests are working now and neither should be skipped.

Disable filtering of advertising reports, as we check the same data N
times, and only first time is registered with filtering enabled.
With current (default) CoC MPS setting we were trying to send more
than HCI packet could hold. This patch increases its size to sufficient
value.
By adding connection params with increased supervision timeout we
are able to make more connections before previous are closed.
Supervision timeout is set to its maximum value of 32s
(0x0C80 in 10ms units).This allows to achieve number of connections
declared to be supported by NimBLE: 32+.
All implemented tests are working now - run all of them.
Copy link
Contributor

@rymanluk rymanluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KKopyscinski KKopyscinski merged commit 8debcf0 into apache:master Mar 4, 2024
16 checks passed
@KKopyscinski KKopyscinski deleted the blestress-fixes branch March 4, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants