Characteristic with Read Permitted = No can still be read

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
JamesHiebert
Offline
Last seen:6 months 4 weeks ago
Joined:2014-10-24 14:17
Characteristic with Read Permitted = No can still be read

Hello Dialog,

In our application, we have two characteristics exposed. The first only has the Property Notify Permitted set to Yes and the other has the two Properties Write Permitted and Indicate Permitted both set to Yes. All other properties are set to No.

If I issue a Read Request to the first characteristic, the DA14581 responds with a Read Response. If I issue a Read Request to the second characteristic, the DA14581 responds with an Error Response. Why is the read to the first characteristic permitted?

See attached sniffer screen shot excerpts.

Thanks!

Device:
Qinjiny_Dialog
Offline
Last seen:32 min 40 sec ago
Staff
Joined:2016-11-01 05:47
Hi James,

Hi James,

Can I see the codes where you configure the character properties?

Have you tried to verify this by directly remove the read permission on a character with notify permission in an existing example project and see if the change takes effect?

JamesHiebert
Offline
Last seen:6 months 4 weeks ago
Joined:2014-10-24 14:17
Hello Dialog,

Hello Dialog,

Upon inspecting the code, I found that the first characteristic was statically defined as follows:

[IDX_FIRST_VAL] = {FIRSTCharUUID, ATT_UUID_128_LEN, PERM(RD, UNAUTH) | PERM(NTF, UNAUTH), DEF_FIRST_LEN, 0, NULL},

Note that PERM RD is set. If I remove PERM(RD, UNAUTH) from this definition, then I indeed get an error response when reading handle 18. So part of my question is answered!

然而,为什么当烫di (RD, UNAUTH)d was not affect the characteristic definition property? Read Permitted was indicated as NO when PERM(RD, UNAUTH) was in place.

Thanks,

PM_Dialog
Offline
Last seen:3 days 13 hours ago
Staff
Joined:2018-02-08 11:03
Hi JamesHiebert,

Hi JamesHiebert,

Could you please provide the configurations of both of the characteristics in order to try to replicate your issue? Does the PERM RD is set to the first or to the second characteristic? Could you please let me know if you are using any type of security?

Thanks, PM_Dialog