Confusion in Properties permission in the DA1469x_Custom_BLE_Service example

⚠️
大家好. .谢谢光临论坛。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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
prasanna
离线
Last seen:2 weeks 13 hours ago
Joined:2020-09-29 11:56
Confusion in Properties permission in the DA1469x_Custom_BLE_Service example

Hello Dialog,

I am testing the examples "BLE_Central" and the "DA1469x_Custom_BLE_Service" to achieve some communication between the GATT client and server. In the custom service example, in the peripheral_task.c, there are two services defined with one and thee characteristics respectively. Here, I have set some random permissions for the characteristics of the both services. Please find the log file attached below.

ÿÿð@BLE中央应用程序启动BLE中央应用程序启动@BLE中央应用程序启动@ble中央应用程序启动@ble中央应用程序启动@ vt_gap_connected:conn_idx = 0000 supple_evt_gattc_discover_svc:conn_idx = 0000 uuid = 0x1800 start_h = 0001 end_h = 0007 handle_evt_gattc_discover_svc:conn_idx = 0000UUID = 0x1801 start_h = 0008 end_h = 0008 handle_evt_gattc_discover_svc:conn_idx = 0000 UUID = 11111111-0000-0000-0000-111111111111 start_h = 0009 end_h = 000D handle_evt_gattc_discover_svc:conn_idx = 0000 UUID = 22222222-0000-0000-0000-222222222222 start_h = 000Eend_h = 0016 handle_evt_gattc_discover_completed:conn_idx = 0000 type = 0 status = 0 shower_t_gattc_discover_char:conn_idx = 0000 uuid = 0x2a00句柄= 0002 value_handle = 0003属性= 02(-----)supple_evt_gattc_discover_char:conn_idx = 0000 uuid = 0x2a01句柄= 0004 value_handle = 0005属性= 02(-----)supple_evt_gattc_discover_char:conn_idx = 0000 uuid = 0x2a04句柄= 0006 value_handle = 0007属性= 02(-----)hange_evt_gattc_discover_completed:conn_idx = 0000类型= 2 status = 0 shower_evt_gattc_read_completed:conn_idx = 0000把手= 0003 status = 0 43 75 75 73 74 6f 6d 20 42 4c 45 20 53 6f 6d 20 42 4c 45 20 53 65 72 76 69定制ble servi 63 65 ce handle_evt_gattc_discover_completed:conn_idx = 0000type = 2 status = 0 shower_evt_gattc_discover_char:conn_idx = 0000 uuid = 11111111-0000-0000-0000-00000000/0000-0000-000000000001句柄= 000a value_handle = 000b属性= 22(-R --- i--)supple_evt_gattc_discover_completed:conn_idx = 0000类型= 2状态= 0 handle_evt_gattc_discover_desc:conn_idx = 0000 UUID = 0x2901手柄= 000C handle_evt_gattc_discover_desc:conn_idx = 0000 UUID = 0x2902手柄= 000D handle_evt_gattc_discover_completed:conn_idx = 0000类型= 3个状态= 0 handle_evt_gattc_discover_char:conn_idx = 0000 UUID = 22222222-0000-0000-0000-000000000001 handle=000f value_handle=0010 properties=0a (-R-W----) handle_evt_gattc_discover_char: conn_idx=0000 uuid=22222222-0000-0000-0000-000000000002 handle=0012 value_handle=0013 properties=02 (-R------) handle_evt_gattc_discover_char: conn_idx=0000 uuid=22222222-0000-0000-0000-000000000003 handle=0015 value_handle=0016 properties=02 (-R------) handle_evt_gattc_discover_completed: conn_idx=0000 type=2 status=0 handle_evt_gattc_discover_desc: conn_idx=0000 uuid=0x2901 handle=0011 handle_evt_gattc_discover_completed: conn_idx=0000 type=3 status=0 handle_evt_gattc_discover_desc: conn_idx=0000 uuid=0x2901 handle=0014 handle_evt_gattc_discover_completed: conn_idx=0000 type=3 status=0 handle_evt_gap_disconnected: conn_idx=0000 address=06:06:06:01:01:01 reason=8 handle_evt_gap_connected: conn_idx=0000 handle_evt_gattc_discover_svc: conn_idx=0000 uuid=0x1800 start_h=0001 end_h=0007 handle_evt_gattc_discover_svc: conn_idx=0000 uuid=0x1801 start_h=0008 end_h=0008 handle_evt_gattc_discover_svc: conn_idx=0000 uuid=11111111-0000-0000-0000-111111111111 start_h=0009 end_h=000d handle_evt_gattc_discover_svc: conn_idx=0000 uuid=22222222-0000-0000-0000-222222222222 start_h=000e end_h=0016 handle_evt_gattc_discover_completed: conn_idx=0000 type=0 status=0 handle_evt_gattc_discover_char: conn_idx=0000 uuid=0x2a00 handle=0002 value_handle=0003 properties=02 (-R------) handle_evt_gattc_discover_char: conn_idx=0000 uuid=0x2a01 handle=0004 value_handle=0005 properties=02 (-R------) handle_evt_gattc_discover_char: conn_idx=0000 uuid=0x2a04 handle=0006 value_handle=0007 properties=02 (-R------) handle_evt_gattc_discover_completed: conn_idx=0000 type=2 status=0 handle_evt_gattc_read_completed: conn_idx=0000 handle=0003 status=0 43 75 73 74 6f 6d 20 42 4c 45 20 53 65 72 76 69 Custom BLE Servi 63 65 ce handle_evt_gattc_discover_completed: conn_idx=0000 type=2 status=0 handle_evt_gattc_discover_char: conn_idx=0000 uuid=11111111-0000-0000-0000-000000000001 handle=000a value_handle=000b properties=22 (-R---I--) handle_evt_gattc_discover_completed: conn_idx=0000 type=2 status=0 handle_evt_gattc_discover_desc: conn_idx=0000 uuid=0x2901 handle=000c handle_evt_gattc_discover_desc: conn_idx=0000 uuid=0x2902 handle=000d handle_evt_gattc_discover_completed: conn_idx=0000 type=3 status=0 handle_evt_gattc_discover_char: conn_idx=0000 uuid=22222222-0000-0000-0000-000000000001 handle=000f value_handle=0010 properties=0a (-R-W----) handle_evt_gattc_discover_char: conn_idx=0000 uuid=22222222-0000-0000-0000-000000000002 handle=0012 value_handle=0013 properties=02 (-R------) handle_evt_gattc_discover_char: conn_idx=0000 uuid=22222222-0000-0000-0000-000000000003 handle=0015 value_handle=0016 properties=02 (-R------) handle_evt_gattc_discover_completed: conn_idx=0000 type=2 status=0 handle_evt_gattc_discover_desc: conn_idx=0000 uuid=0x2901 handle=0011 handle_evt_gattc_discover_completed: conn_idx=0000 type=3 status=0

这些都是“许可特征s I have set.

const mcs_characteristic_config_t custom_service_1[] = { /* Initialized Characteristic Attribute */ CHARACTERISTIC_DECLARATION(11111111-0000-0000-0000-000000000001, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES, CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_DIS, CHAR_NOTIF_INDIC_EN, Initialized Characteristic, NULL, NULL, event_sent_cb), }; const mcs_characteristic_config_t custom_service_2[] = { CHARACTERISTIC_DECLARATION(22222222-0000-0000-0000-000000000001, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES, CHAR_WRITE_PROP_EN, CHAR_READ_PROP_DIS, CHAR_NOTIF_NONE, Hello World, NULL, set_var_value_cb, NULL), CHARACTERISTIC_DECLARATION(22222222-0000-0000-0000-000000000002, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES, CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_EN, CHAR_NOTIF_NONE, Hello Dialog, get_var_value_cb, NULL, NULL), CHARACTERISTIC_DECLARATION(22222222-0000-0000-0000-000000000003, 0, CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_DIS, CHAR_NOTIF_NONE, NULL, NULL, NULL, NULL), };

Please compare the permissions with attached output log. You can see that the properties for the only characteristic of the service 1 are printed as (-R---I--), even though I have disabled the Read property.

Coming to the second service characteristics, They are printed as (-R-W----), (-R------) and (-R------) for the three characteristics respectively which are in contrast with the permissions which I actually gave.

Only the second characteristc permissions of the second service is printed correctly according to what I gave.

I request you to investigate about why this happens and suggest me what can I do to avoid this conditions. This is very important for my application as I have to exchange data between the GATT client and the Server.

Thanks in advance.

Regards,

Prasanna

Device:
PM_Dialog
离线
Last seen:3 hours 47 min ago
Staff
Joined:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

Let me check this and I’ll get back to you.

Thanks, PM_Dialog

prasanna
离线
Last seen:2 weeks 13 hours ago
Joined:2020-09-29 11:56
Hello PM_Dialog,

Hello PM_Dialog,

Is there any update about this issue. I have checked this with two characterisitics with one read disabled and the other write disabled. The write properties are working fine , I found there is problem with read permissions. Have you found the same?

2. Also, i am getting the status sometimes that is not defined. For example, when I tried to read a characteristic value, I am getting the output as "handle_evt_gattc_read_completed: conn_idx=0000 handle=000a status=67". Here you can see the status as 67. What does this behaviour mean since there is no error value declared for value 67 in the enum att_error_t in ble_att.h file.

Regards,

Prasanna

PM_Dialog
离线
Last seen:3 hours 47 min ago
Staff
Joined:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

So, if I understood correctly the problem is only in the custom service 1, where the wrong properties seem to not appear correctly.

Can you please try to connect with a generic BLE mobile application and check also the permissions ?

Additionally, can you please share which modifications have you done in the example except from the characteristics database? Are you using the example as provided by dialog or have you done any change?

Thanks, PM_Dialog

prasanna
离线
Last seen:2 weeks 13 hours ago
Joined:2020-09-29 11:56
Hello PM_Dialog,

Hello PM_Dialog,

I have checked with nrf connect application as well. Even though I have disable the read characteristic, I can see the Read property in application as well. The Read property seems to have a problem. Nonethless its read disabled or enabled, we can read.

I did not modify the code much in the custom service example other than changing the permissions.

PM_Dialog
离线
Last seen:3 hours 47 min ago
Staff
Joined:2018-02-08 11:03
H Prasanna,

H Prasanna,

We are working on this tutorial and will release an updated version hopefully by the end of this week. I’ll let you know once the new version is available for download.

Thanks, PM_Dialog

prasanna
离线
Last seen:2 weeks 13 hours ago
Joined:2020-09-29 11:56
Hello PM_dialog,

Hello PM_dialog,

Thanks for the update.

Regards,

Prasanna

prasanna
离线
Last seen:2 weeks 13 hours ago
Joined:2020-09-29 11:56
Hello Dialog,

Hello Dialog,

Is there any update on the new version on when it is available?

Regards,

Prasanna

PM_Dialog
离线
Last seen:3 hours 47 min ago
Staff
Joined:2018-02-08 11:03
嗨,大家好,

嗨,大家好,

I’ll check again the status internally and revert back to you shortly.

Thanks, PM_Dialog

PM_Dialog
离线
Last seen:3 hours 47 min ago
Staff
Joined:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

As mentioned in the following forum ticket, the example is not updated :

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/gatt-connection-timeout

Thanks, PM_Dialog