zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.55k stars 6.46k forks source link

[drivers/nble][PTS_TEST] Fix responding with the wrong error codes to the Prepare Write Request #1782

Closed zephyrbot closed 8 years ago

zephyrbot commented 8 years ago

Reported by Mariusz Skamra:

IUT responds with ATT Invalid Attribute Length error to the Prepare Write Request. According to the Table 3.38 (Core Spec 4.2, Vol 3, Part F, 3.4.9 Attribute PDU Response Summary) errors like Invalid Offset and Invalid Attribute Value Length can only be returned as a response to the Execute Write Request. So basically stack shall ignore this Prepare Write Request and wait for Execute Write Request to return this error.

Affected TC: TC_GAW_SR_BI_33_C, TC_GAW_SR_BI_35_C [Invalid Attribute Value Length] TC_GAW_SR_BI_09_C, TC_GAW_SR_BI_27_C [Invalid Offset]

(Imported from Jira ZEP-218)

zephyrbot commented 8 years ago

by Anas Nashif:

is this fixed?

zephyrbot commented 8 years ago

by Grzegorz Kolodziejczyk:

Yes, this is fixed now but I saw a problem with nble firmware. Callback on execute write with flag - cancel all pending prepare writes isn't called. https://gerrit.zephyrproject.org/r/#/c/2084/

zephyrbot commented 8 years ago

by Andrei Emeltchenko:

1/4 GATT TC_GAW_SR_BI_09_C FAIL 2/4 GATT TC_GAW_SR_BI_27_C FAIL 3/4 GATT TC_GAW_SR_BI_33_C PASS 4/4 GATT TC_GAW_SR_BI_35_C PASS

Summary:

Status Count

FAIL 2 PASS 2

Total 4

There are 2 test cases left still, investigation those, might be another issue

zephyrbot commented 8 years ago

by Andrei Emeltchenko:

This is currently blocked in bug in the firmware, it does not send event with "cancel" all previous writes. After that buffers pool is full since we wait for either write or cancel event.

zephyrbot commented 8 years ago

by Andrei Emeltchenko:

The issue is fixed in the new firmware with new SoftDevice 2.0

zephyrbot commented 8 years ago

by Andrei Emeltchenko:

Issue is fixed with https://gerrit.zephyrproject.org/r/#/c/2871/

zephyrbot commented 8 years ago

by Sharron LIU:

Please reporter verify this

zephyrbot commented 8 years ago

by Mark Linkmeyer:

Mariusz Skamra , as the Reporter of this bug we need you to verify it's fixed since it's in the Resolved state. Please verify it ASAP so we know whether or not more work is required to fix it before the upcoming 1.5 release. If it's fixed, please move it to the Verified state. Thanks!

zephyrbot commented 7 years ago

by Mark Linkmeyer:

Fixing incorrect priority