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

Handle Incomplete Sequence numbers in missing transmission report #594

Closed
Alka1703 opened this issue Feb 27, 2023 · 1 comment
Closed

Handle Incomplete Sequence numbers in missing transmission report #594

Alka1703 opened this issue Feb 27, 2023 · 1 comment
Labels
BLE BLE Transefer of VCs BLE-Sharing Related to BLE sharing mechanism enhancement New feature or request triage This issue is pending confirmation and planning and should not be worked on yet
Milestone

Comments

@Alka1703
Copy link
Contributor

Alka1703 commented Feb 27, 2023

If the MTU size(-headers) is less than 183, there is a chance of incomplete sequence number in the transmission report in case of higher failure of chunks. In such scenario ignore any incomplete sequence number.

Scenario:
MTU negotiated: 185 [182 (-3 for headers)]
No of missed chunks: 95
Transfer Report Packet:
First Byte: Success/ Failure
Next 2 bytes: page numbers
No of bytes needed for representing each sequence number: 2 bytes
Remaining bytes: 179 bytes which can hold max of 89 sequence numbers
Current implementation will write first 90 sequence numbers in the characteristics which is 180 bytes. The last byte will get dropped as max available space is 179 bytes.
When the wallet tries to convert the bytes into Transfer Report back, the last sequence number will not be converted and throw an exception.

Example:
Data to be written by verifier:
00 | 00 95 | 00 01 | 00 34 | ....................... | 00 68 | 00 99

Data received by the wallet :
00 | 00 95 | 00 01 | 00 34 | ....................... | 00 68 | 00

Since the last sequence number is incomplete, it will cause error.

To be done:
Drop the entire last sequence number and then process the request:
00 | 00 95 | 00 01 | 00 34 | ....................... | 00 68

@Alka1703 Alka1703 added enhancement New feature or request triage This issue is pending confirmation and planning and should not be worked on yet labels Feb 27, 2023
@ravikp ravikp added this to the 28th Feb 23 milestone Feb 28, 2023
@ravikp ravikp added BLE BLE Transefer of VCs BLE-Sharing Related to BLE sharing mechanism labels Feb 28, 2023
@Alka1703
Copy link
Contributor Author

Alka1703 commented Feb 28, 2023

The following PRs implements handling of incomplete sequence number in the transmission report. It ignores the last sequence nuber if it is incomplete.
PR for mosip/tuvali: #28
PR for mosip/inji: #595, #597

The PRs have been merged in 28-02-2023 Release and the latest commit id on mosip/inji/develop is 7cdee82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLE BLE Transefer of VCs BLE-Sharing Related to BLE sharing mechanism enhancement New feature or request triage This issue is pending confirmation and planning and should not be worked on yet
Projects
Status: Closed
Development

No branches or pull requests

3 participants