DA1469x_Custom_BLE_Service示例中的属性权限混淆

⚠️
大家好. .感谢来到论坛。令人兴奋的消息!我们现在正在转移到新的论坛平台的过程中,它将提供更好的功能,并包含在主对话网站。所有的帖子和账号已经迁移。我们现在只接受新论坛的流量-请发布任何新的帖子在https://www.dialog-seminile.com/support..我们会在接下来的几天修复bug /优化搜索和标记。
10个帖子/ 0个新帖子
最后发表
prasanna
离线
最后看到:5个月1个星期前
加入:2020-09-29 56
DA1469x_Custom_BLE_Service示例中的属性权限混淆

你好,对话框,

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

ÿ ÐÊ@ BLE Central application started BLE Central application started @ BLE Central application started @ BLE Central application started @ BLE Central application started 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-2222222222 start_h=000e end_h=0016 handle_evt_gattc_discover_completed:conn_idx=0 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 = 0 x2a04处理属性= 0006 value_handle = 0007 = 2 (- r) handle_evt_gattc_discover_completed: conn_idx = 0000 = 2型状态= 0 handle_evt_gattc_read_completed: conn_idx = 0000 = 0003 = 0状态处理43 75 73 74 6 f 6 d 20 42 4 c 45 63 53 65 72 76 69定制的祝福就是公元65年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- 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-000000000002 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_completed: Conn_idx =0000 type=3 status=0 handle_evt_gatt_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-1111111111 start_h=0009 end_h=000d handle_evt_gattc_discover_svc: Conn_idx =0000 uuid=22222222-0000-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

这些是我所设定的冒充特征权限。

const mcs_characteristic_config_t custom_service_1 [] = { /* 初始化特征属性* / CHARACTERISTIC_DECLARATION (11111111-0000-0000-0000-000000000001, CHARACTERISTIC_ATTR_VALUE_MAX_BYTES, CHAR_WRITE_PROP_DIS、CHAR_READ_PROP_DIS CHAR_NOTIF_INDIC_EN,初始化特点,空,空,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,charactertic_attr_value_max_bytes, CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_EN, CHAR_NOTIF_NONE, Hello Dialog, get_var_value_cb, NULL, NULL), charactertic_declaration (22222222-0000-0000-0000-000000000003, 0, CHAR_WRITE_PROP_DIS, CHAR_READ_PROP_DIS, CHAR_NOTIF_NONE, NULL, NULL, NULL),};

请将附加输出日志的权限进行比较。您可以看到服务1的唯一特征的属性打印为( - --- i--),即使我已禁用read属性。

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.

仅根据我给出的内容正确打印第二服务的第二个特征权限。

我请求你调查为什么会发生这种情况,并建议我如何做才能避免这种情况。这对我的应用程序非常重要,因为我必须在GATT客户机和服务器之间交换数据。

提前致谢。

问候,

普拉斯坦娜

设备:
PM_Dialog
离线
最后看到:1周3天前
职员
加入:2018-02-08 11:03
嗨Prasanna,

嗨Prasanna,

让我检查一下,我会回复你。

谢谢,PM_Dialog

prasanna
离线
最后看到:5个月1个星期前
加入:2020-09-29 56
你好PM_Dialog,

你好PM_Dialog,

关于这个问题有新的进展吗?我用两个特性检查了这个,一个是读禁用,另一个是写禁用。写属性工作正常,我发现读权限有问题。你找到同样的了吗?

2.而且,我有时得到的地位是不确定的。例如,当我试图读取一个特征值时,我得到的输出是“handle_evt_gattc_read_completed: conn_idx=0000 handle=000a status=67”。这里你可以看到状态为67。这个行为意味着什么,因为在ble_att.h文件的枚举att_error_t中没有为值67声明错误值。

问候,

普拉斯坦娜

PM_Dialog
离线
最后看到:1周3天前
职员
加入:2018-02-08 11:03
嗨Prasanna,

嗨Prasanna,

因此,如果我理解正确的问题,问题只在自定义服务1中,其中错误的属性似乎没有正确看起来。

你能试着连接一个通用BLE移动应用程序,并检查权限吗?

另外,能否分享一下,除了特征数据库之外,你在示例中还做了哪些修改?您是否使用了dialog提供的示例,或者您做了任何更改?

谢谢,PM_Dialog

prasanna
离线
最后看到:5个月1个星期前
加入:2020-09-29 56
你好PM_Dialog,

你好PM_Dialog,

我也使用NRF Connect应用程序检查。即使我禁用了读取特性,我也可以在应用程序中看到read属性。读的财产似乎有问题。我们可以读取禁用或启用的读取。

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

PM_Dialog
离线
最后看到:1周3天前
职员
加入:2018-02-08 11:03
H Prasanna,

H Prasanna,

我们正在研究本教程,并将在本周末发布更新的版本。一旦新版本可供下载,我会通知您。

谢谢,PM_Dialog

prasanna
离线
最后看到:5个月1个星期前
加入:2020-09-29 56
你好pm_dialog,

你好pm_dialog,

感谢更新。

问候,

普拉斯坦娜

prasanna
离线
最后看到:5个月1个星期前
加入:2020-09-29 56
你好,对话框,

你好,对话框,

新版本可用时是否有任何更新?

问候,

普拉斯坦娜

PM_Dialog
离线
最后看到:1周3天前
职员
加入:2018-02-08 11:03
大家好!

大家好!

我会在内部检查状态并很快恢复给您。

谢谢,PM_Dialog

PM_Dialog
离线
最后看到:1周3天前
职员
加入:2018-02-08 11:03
嗨Prasanna,

嗨Prasanna,

正如在下面的论坛票据中提到的,示例没有更新:

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

谢谢,PM_Dialog