da1469x_custom_ble_service示例中的属性许可中的混淆

学到更多FAQs教程

10个帖子/ 0新
最后一篇
普拉斯坦娜
离线
最后一次露面:1天5小时前
Joined:2020-09-29 11:56
da1469x_custom_ble_service示例中的属性许可中的混淆

你好对话框,

我正在测试示例“ble_central”和“da1469x_custom_ble_service”以在GATT客户端和服务器之间实现一些通信。在自定义服务示例中,在peripheral_task.c中,分别有两个与A和THE特征定义的服务。在这里,我为这两个服务的特征设置了一些随机权限。请找到下面附带的日志文件。

ÿÿð@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 [] {/ *初始化特征属性* / characture_declaration(11111111-000000000001,charperting_attr_value_max_bytes,char_write_prop_dis,char_read_prop_dis,char_notif_indic_en,初始化的特征,null,null,event_sent_cb),};常量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,世界你好,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对话框,get_var_value_cb,null,null),compyristic_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.

我要求您调查为什么会发生这种情况,并建议我可以做些什么来避免这种情况。这对我的应用非常重要,因为我必须在GATT客户端和服务器之间交换数据。

Thanks in advance.

问候,

Prasanna

设备:
PM_DIALOG.
离线
最后一次露面:49分钟41秒前
Staff
Joined:2018-02-08 11:03
嗨普拉斯坦尼亚,

嗨普拉斯坦尼亚,

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

谢谢,PM_DIALOG.

普拉斯坦娜
离线
最后一次露面:1天5小时前
Joined:2020-09-29 11:56
你好pm_dialog,

你好pm_dialog,

有关此问题是否有任何更新。我已经检查了两个可读取的两个特征,其中读取禁用,另一个写入禁用。写属性正常工作,我发现有读取权限有问题。你找到了同样的吗?

2.此外,我有时没有定义的状态。例如,当我尝试读取特征值时,我将输出作为“handle_evt_gattc_read_completed:conn_idx = 0000句柄= 000a status = 67”。在这里,您可以将状态视为67.此行为意味着什么意思是因为BLE_ATT.h文件中的ENUM ATT_ERROR_T中的值67声明了错误值。

问候,

Prasanna

PM_DIALOG.
离线
最后一次露面:49分钟41秒前
Staff
Joined:2018-02-08 11:03
嗨普拉斯坦尼亚,

嗨普拉斯坦尼亚,

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

请尝试使用通用BLE移动应用程序连接并检查权限吗?

此外,除了特征数据库之外,您是否可以共享您在示例中完成的修改?您是否使用了对话框提供的示例,或者您完成了任何更改吗?

谢谢,PM_DIALOG.

普拉斯坦娜
离线
最后一次露面:1天5小时前
Joined:2020-09-29 11:56
你好pm_dialog,

你好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.

除了更改权限之外,我没有在自定义服务示例中修改代码。

PM_DIALOG.
离线
最后一次露面:49分钟41秒前
Staff
Joined:2018-02-08 11:03
普拉斯纳,

普拉斯纳,

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.

谢谢,PM_DIALOG.

普拉斯坦娜
离线
最后一次露面:1天5小时前
Joined:2020-09-29 11:56
Hello PM_dialog,

Hello PM_dialog,

Thanks for the update.

问候,

Prasanna

普拉斯坦娜
离线
最后一次露面:1天5小时前
Joined:2020-09-29 11:56
你好对话框,

你好对话框,

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

问候,

Prasanna

annamarie.
离线
最后一次露面:5天7小时前
Joined:2021-01-27 11:14
很高兴看到你的问题

很高兴看到你的问题I think I have the same problem,I am also confused and in need of light on this same issue. Need help.

MyAARPMedicare Login

PM_DIALOG.
离线
最后一次露面:49分钟41秒前
Staff
Joined:2018-02-08 11:03
大家好,

大家好,

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

谢谢,PM_DIALOG.