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

nimble/host: add eatt opcode check in ble_eatt_l2cap_event_fn #1869

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piotrnarajowski
Copy link
Contributor

@piotrnarajowski piotrnarajowski commented Sep 20, 2024

Att opcode check caused l2cap disconnection when opcode included in received data was write command which is supported and can be used on eatt. Also, the comment seemed irrelevant. Fixes GATT/SR/GAW/BV-01-C

@github-actions github-actions bot added the host label Sep 20, 2024
@piotrnarajowski
Copy link
Contributor Author

#AutoPTS run mynewt GATT/SR/GAW/BV-01-C

@github-actions github-actions bot added the size/S Small PR label Sep 20, 2024
@codecoup-tester
Copy link

Scheduled PR #1869 (comment), board: nrf52, estimated start time: 15:24:29, test case count: 1, estimated duration: 0:01:07

Test cases to be runGATT/SR/GAW/BV-01-C

@piotrnarajowski
Copy link
Contributor Author

#AutoPTS run mynewt GATT/SR --test_case_limit 10

@codecoup-tester
Copy link

Scheduled PR #1869 (comment), board: nrf52, estimated start time: 15:37:02, test case count: 10, estimated duration: 0:06:42

Test cases to be runGATT/SR/GAC/BV-01-C
GATT/SR/GAC/BI-01-C
GATT/SR/GAD/BV-01-C
GATT/SR/GAD/BV-02-C
GATT/SR/GAD/BV-03-C
GATT/SR/GAD/BV-04-C
GATT/SR/GAD/BV-05-C
GATT/SR/GAD/BV-06-C
GATT/SR/GAR/BV-01-C
GATT/SR/GAR/BI-01-C

@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful testsGATT GATT/SR/GAW/BV-01-C PASS

@piotrnarajowski piotrnarajowski marked this pull request as ready for review September 20, 2024 13:58
@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful testsGATT GATT/SR/GAC/BI-01-C PASS
GATT GATT/SR/GAC/BV-01-C PASS
GATT GATT/SR/GAD/BV-01-C PASS
GATT GATT/SR/GAD/BV-02-C PASS
GATT GATT/SR/GAD/BV-03-C PASS
GATT GATT/SR/GAD/BV-04-C PASS
GATT GATT/SR/GAD/BV-05-C PASS
GATT GATT/SR/GAD/BV-06-C PASS
GATT GATT/SR/GAR/BI-01-C PASS
GATT GATT/SR/GAR/BV-01-C PASS

@piotrnarajowski
Copy link
Contributor Author

FYI @KKopyscinski

@@ -268,16 +268,6 @@ ble_eatt_l2cap_event_fn(struct ble_l2cap_event *event, void *arg)
opcode = event->receive.sdu_rx->om_data[0];
if (ble_att_is_response_op(opcode)) {
ble_npl_eventq_put(ble_hs_evq_get(), &eatt->wakeup_ev);
} else if (!ble_att_is_request_op(opcode)) {
/* As per BLE 5.4 Standard, Vol. 3, Part F, section 5.3.2
Copy link
Contributor

Choose a reason for hiding this comment

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

looks it was Part G.

Anyways, instead of this we should maybe extend both ble_att_is_response_op and ble_att_is_request_op so it returns depends on EATT case and satisfy below

Vol 3, Part G, 4.2

If an ATT PDU is supported on any ATT bearer, then it shall be supported on all
supported ATT bearers with the following exceptions:
• The Exchange MTU sub-procedure shall only be supported on the LE Fixed Channel
Unenhanced ATT bearer.
• The Signed Write Without Response sub-procedure shall only be supported on the LE
Fixed Channel Unenhanced ATT bearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@piotrnarajowski piotrnarajowski marked this pull request as draft September 30, 2024 18:38
@piotrnarajowski piotrnarajowski marked this pull request as ready for review October 1, 2024 09:27
@piotrnarajowski piotrnarajowski changed the title nimble/host: remove unnecessarry opcode check in ble_eatt_l2cap_event_fn nimble/host: add eatt opcode check in ble_eatt_l2cap_event_fn Oct 1, 2024
@piotrnarajowski
Copy link
Contributor Author

#AutoPTS run mynewt GATT/SR/GAW/BV-01-C

@codecoup-tester
Copy link

Scheduled PR #1869 (comment), board: nrf52, estimated start time: 12:00:35, test case count: 1, estimated duration: 0:01:09

Test cases to be runGATT/SR/GAW/BV-01-C

@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful tests (1)GATT GATT/SR/GAW/BV-01-C PASS

Att opcode check caused l2cap disconnection when opcode included
in received data was write command which is supported and can be used
on eatt. Also, the comment seemed irrelevant. Fixes GATT/SR/GAW/BV-01-C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants