- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
ReadWrite Characteristics
-
SDK 2.X
-
Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Henry,
As you can see the GATT database shown here in the picture below:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content