Skip to content

L2CAP Enhanced Retransmission mode - #779

Merged
zxzxwu merged 2 commits into
google:mainfrom
zxzxwu:l2cap
Dec 3, 2025
Merged

zxzxwu merged 2 commits into
google:mainfrom
zxzxwu:l2cap

Conversation

@zxzxwu

@zxzxwu zxzxwu commented Sep 17, 2025 •

Copy link
Copy Markdown
Collaborator

Ported from Pigweed without actual retransmission support, because most devices don't perform retransmission at all.

@zxzxwu
zxzxwu marked this pull request as draft September 17, 2025 05:45
@zxzxwu
zxzxwu force-pushed the l2cap branch 2 times, most recently from 8187bea to 76f636a Compare September 19, 2025 06:01
@zxzxwu
zxzxwu force-pushed the l2cap branch 8 times, most recently from 44955d1 to 9cfa0a3 Compare September 26, 2025 17:17
@zxzxwu

zxzxwu commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator Author

@barbibulle This PR is still WIP, but I would like to have your opinion about the overall design.

@zxzxwu
zxzxwu requested a review from barbibulle September 30, 2025 07:24
@zxzxwu
zxzxwu force-pushed the l2cap branch 2 times, most recently from 41d4d6f to 65cb98a Compare November 1, 2025 11:17
@barbibulle

Copy link
Copy Markdown
Collaborator

@barbibulle This PR is still WIP, but I would like to have your opinion about the overall design.

I'll take a look in the next couple days.

@zxzxwu

zxzxwu commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator Author

Thanks!

Some summary:

  • Retransmission is not implemented. I am considering introduce an Busy exception allow packet receivers to raise REJ or SREJ, but probably will be another PR.
  • Config negotiation is WIP. I am still figuring out how it works.
  • Using processor classes to handle mode-specific logics. A potential improvement is to allow delegating factory for each mode.
  • Add write() and on_sdu() to allow sending SDU in non-basic modes, but keep the behavior in basic mode.
  • Add FCS support - though this is optional in Enhanced Retransmission mode, many implementations don't allow such combination.

@zxzxwu

zxzxwu commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator Author

I changed the implementation to Mode 2 spec, so that when mode is not matched, channels will be simply disconnected.

@zxzxwu zxzxwu changed the title [WIP] L2CAP Enhanced Retransmission mode L2CAP Enhanced Retransmission mode Nov 25, 2025
@zxzxwu
zxzxwu marked this pull request as ready for review November 25, 2025 05:58
@zxzxwu

zxzxwu commented Nov 27, 2025

Copy link
Copy Markdown
Collaborator Author

@barbibulle This PR is ready.

@barbibulle

Copy link
Copy Markdown
Collaborator

@barbibulle This PR is ready.

Sorry for the delay. I'll get to it very shortly.

Comment thread bumble/l2cap.py Outdated
Comment thread bumble/l2cap.py Outdated
Comment thread bumble/l2cap.py Outdated
Comment thread bumble/l2cap.py Outdated
@zxzxwu
zxzxwu merged commit e47cb55 into google:main Dec 3, 2025
104 of 108 checks passed
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.

2 participants