L2CAP COC: buffer configuration errors
- Dominant language
- C
- Stars
- 893
- Forks
- 512
- Avg merge
- 13d 31m
- Merged PRs (30d)
- 7
Description
Hej guys,
I am currently struggling with the configuration of NimBLE's buffer sizes. I was under the impression, that my fixes in #315 did actually lead to a more efficient and better memory usage. Now after some digging, I found that the new default value for `MYNEWT_VAL_BLE_L2CAP_COC_MTU` which I introduced it somehow leading to all l2cap_coc packets > 250 bytes to be dropped silently by NimBLE. I was under the impression, that this value is only used for internal packet fragmentation in the host, but is it possible, that this MTU size is also somehow related to the actual packet size that is used by the controller?
Could someone maybe help me to understand a little better so I can provide a proper fix... Especially why the limit seems to be exactly 250 would be nice to know and I could not yet figure it out from the code.
For now my work-around is simply to set the value to `250` for my test code, but it would be nicer to do something like `min(250, MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8)` or the like...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the silent drop with MYNEWT_VAL_BLE_L2CAP_COC_MTU above 250 and compare it with MYNEWT_VAL_MSYS_1_BLOCK_SIZE and the workaround value of 250. Trace the L2CAP COC and controller buffer configuration to determine why packets over 250 bytes are rejected; done means the limit is explained and a proper configuration fix is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100