LEGATTDB_PERM_AUTH_READABLE?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

Please kindly provide an example for the characteristic permission :"LEGATTDB_PERM_AUTH_READABLE". I have done a lot of search but can not understand how to use it in BCM20737.

Thanks.

0 Likes
1 Solution
Anonymous
Not applicable

Hi victorz,

Thanks, I got some related example code in SDK 2.2.2 and tested. It works.

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

Hello Henry,

As you can see the GATT database shown here in the picture below:

pastedImage_0.png

The Header information shows this is the Spec:

#define LEGATTDB_PERM_NONE (0x00)

#define LEGATTDB_PERM_VARIABLE_LENGTH (0x1<<0)

#define LEGATTDB_PERM_READABLE (0x1<<1)

#define LEGATTDB_PERM_WRITE_CMD (0x1<<2)

#define LEGATTDB_PERM_WRITE_REQ (0x1<<3)

#define LEGATTDB_PERM_AUTH_READABLE (0x1<<4)

#define LEGATTDB_PERM_RELIABLE_WRITE (0x1<<5)

#define LEGATTDB_PERM_AUTH_WRITABLE (0x1<<6)

However, we don't have any examples in our SDK.

JT

0 Likes
Anonymous
Not applicable

j.t wrote:

However, we don't have any examples in our SDK.

JT

That's why I requested here with this topic, the BCM SDK usually used LEGATTDB_PERM_READABLE, LEGATTDB_PERM_WRITE_CMD and LEGATTDB_PERM_WRITE_REQ as characteristic permission of your database, I want to know the usage about LEGATTDB_PERM_AUTH_READABLE, LEGATTDB_PERM_RELIABLE_WRITE and LEGATTDB_PERM_AUTH_WRITABLE in BCM20737.

Please kindly provide some helpful information, thanks.

0 Likes

Following is a sample how to modify hello_sensor with required property

CHARACTERISTIC_UUID128 (0x0029, HANDLE_HELLO_SENSOR_VALUE_NOTIFY, UUID_HELLO_CHARACTERISTIC_NOTIFY,
                       LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY | LEGATTDB_CHAR_PROP_INDICATE,

#ifdef LINK_ENCRYPTION_REQUIRED

                       LEGATTDB_PERM_READABLE | LEGATTDB_PERM_AUTH_READABLE,

#else

                       LEGATTDB_PERM_READABLE,

#endif

0 Likes
Anonymous
Not applicable

Hi JT,

I know that setting, the question is, is there any other action we need to take care of for the flag enabled?

For example,

If we set the LEGATTDB_PERM_AUTH_WRITABLE or LEGATTDB_PERM_RELIABLE_WRITE to the characteristic, what is the extra code we should add into the write handle callback?

0 Likes

You got lucky today.  No more action required on the application side.  If peer decides to read/write characteristic over the unencrypted link, the error response with appropriate result code will be generated by the stack. 

0 Likes
Anonymous
Not applicable

Hi victorz,

Thanks, I got some related example code in SDK 2.2.2 and tested. It works.

0 Likes