3 posts / 0 new
Last post
eli.iser
Offline
Last seen:5年11个月s ago
Joined:2014-04-13 07:54
128多个UUID特点

Hello, we are writing a single service with two characteristics, all having a 128 bit UUID. This code is based on the sample128 example, which only shows a single characteristic in the service.

We are adding the service and the characteristics to the ATTM DB (using attmdb_add_service and attmdb_add_attribute) and connecting with a BLE central application (on iOS). Advertisement, connection and service discovery work correctly. However, permissions seem to be a problem.

As in the examples, the initial permission is set to PERM(SVC, DISABLE) using attmdb_svc_set_permission. Then, only in the enable_req_handler we set the permission to param->sec_lvl with the service handle (obtained from attmdb_add_service).

One characteristic we are using is an INDICATE, and the other a WRITE. When the WRITE characteristic is added first, there is no problem writing it from the central application. However, when adding the WRITE characteristic second, writing from the central application fails and the BLE sniffer shows ATT_Error_Response with WRITE_NOT_PERMITTED (0x03).

Is there some way to enable permissions for all the characteristics in the service?
Is there an example for 128 bit UUID that has more than 1 characteristic in the service?

Note: before using 128 bit UUIDs, the code was using 16 bit UUIDs with the regular attm_svc_create_db API. In this case both characteristics worked correctly.

WT_Dialog (not verified)
Hi Eli.iser,

Hi Eli.iser,

In SPOTA project (3.0.2 or integrated in proxmity reporter application in 3.0.4 ), we have multiple characteristics included in a single service (SPOTA).

Could you pleaes have a look of that example and let me know your feedback?

eli.iser
Offline
Last seen:5年11个月s ago
Joined:2014-04-13 07:54
Thank you very much for the

Thank you very much for the suggestion. We are using SDK version 2.0.4.1 (version 3 doesn't work with our evaluation boards OTP) so didn't notice this example.
With the help of the configuration in the SPOTA project we were able to get the UUIDs working correctly.