Remove Bluetooth GATT service

⚠️
你好。。谢谢你来参加论坛。令人兴奋的消息!我们现在正在移动到我们的新论坛平台,将提供更好的功能,并包含在主对话网站的过程。所有帖子和账号都已迁移。我们现在只接受新论坛上的流量-请在//www.wsdof.com/support. 我们将在未来几天内修复bug/优化搜索和标记。
20 posts / 0 new
最后一篇文章
大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
Remove Bluetooth GATT service

你好,

我的软件使用ble_ghts\u add_uservice()和ble_gatts\u register_uservice()创建和注册GATT服务。在执行过程中的某个时刻,我想永久删除此服务。

I am aware of the function ble_gatts_disable_service(), however this only disables the service and does not remove it from the attribute database.

是否有方法永久地从数据库中删除服务?

Best regards,
安迪Poudret

设备:
PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房,

嗨,大乳房,

Can you please use the ble_service_remove() function from ble_service.h header file, after calling the ble_gatts_disable_service()? The function removes a service from the internal database. Please, try that and let me know.

谢谢,下午好

大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
您好PM炣对话框,

您好PM炣对话框,

正如我所说,我想从属性数据库。

通过查看ble_uservice_uuRemove()的文档,它说:
“此函数不会从属性数据库中删除服务。”

因此,看起来ble_uservice_uRemove()从服务列表中删除服务,但不会从属性数据库中删除该服务。
Is there a way to remove a service permanently from the attribute database?

Best regards,
安迪Poudret

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房。

嗨,大乳房。

No, there is a way to remove a service permanently from the attribute database. I suppose that the only way to do this is to reset the database, but it is no recommended. Could you please explain which your issue is? Do you want to make free memory space?

谢谢,下午好

大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
您好PM炣对话框,

您好PM炣对话框,

我正在开发一个简单的演示。用户可以使用输入创建一个可访问的服务、添加特性和描述符等。
Then the user can delete the service he has created and create other services for example.
如果服务从未真正从数据库中删除,我想我将丢失内存空间。

Best regards,
安迪

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
你好,大熊猫

你好,大熊猫

Would you tell me that how to create a BLE service and add characteristics?

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房,

嗨,大乳房,

正如我在前面的注释中已经提到的,没有任何可用的API可以永久地从属性数据库中删除服务。如果检查将可用服务初始化到SDK中,您将看到它们在初始化时分配内存(OS\u MALLOC),因此您可以释放服务的内存(OS免费)。如果您使用自定义服务,则不应在服务初始化中动态分配内存

谢谢,下午好

大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
您好PM炣对话框,

您好PM炣对话框,

我不会在服务初始化中动态分配任何内存。

As I have already mentioned in my previous comment, the memory space that I am losing and that I would like to get back is the memory space in the属性数据库(用于我服务的属性,但不再使用)。

Best regards,
安迪

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房,

嗨,大乳房,

如果是自定义概要文件,我强烈建议您遵循SDK中服务的实现,因此您应该动态分配内存,然后释放内存。

谢谢,下午好

大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
你好,

你好,

我认为您错了,因为我在SDK提供的服务上也会遇到同样的问题。

例如,如果我创建并添加服务CTS:
-我可以禁用服务(使用ble\u GATT\u disable\u服务)
-我可以删除与设备关联的存储(ble\U服务\u清理)
- I can remove service from services list (ble_service_remove)
但是我想做的是从属性数据库. i、 e.恢复布尔gatts_uAdd_uservice()调用使用的内存。

如果SDK中不可能这样做,请这样说。

Best regards,
安迪

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房,

嗨,大乳房,

这些API不可用,无法从属性数据库中删除服务。不过,我会再检查一遍,如果你有什么工作要做,我会告诉你的。

谢谢,下午好

大乳房
离线
上次看到:1 year 5 months ago
已加入:2017-09-22 08:33
您好PM炣对话框,

您好PM炣对话框,

你对这个问题有什么最新的消息吗?

Best regards,
安迪

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨,大乳房,

嗨,大乳房,

没有任何更新。在调用ble\gatts\u disable\u service()之后,只能使用ble\u service_uremove()函数从ble\u service.h头文件中。

谢谢,下午好

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
hi PM\u对话框

hi PM\u对话框

我正在尝试为ble添加新服务

我把GATTM\u ADD_uuSVC\u REQ按摩发送到GATT任务中,但似乎没有效果

你知道吗?

如何在运行时更改现有uuid(不重新启动)?

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨陈鹏莱,

嗨陈鹏莱,

你是说定制服务吗?如果是,请从我们的支持网站上查看以下文档:

SW Example: DA1468x BLE customer service

Custom Bluetooth Low Energy Profile

Could you please share more details about your implementation?

谢谢,下午好

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
嗨,下午好对话,请帮我

Hi PM_Dialog

请帮帮我

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
请给我联系

请给我联系

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
我在sdk 5.0.4中工作

Hi PM\u对话框

我在sdk 5.0.4中工作

现在我想改变在运行时存在uuid because the uuid is configured by the customer

I'm trying develop a general bluetooth module

请告诉我如何在运行后更改EXISTEXuUID函数

I'm doing the following

uint8\u新的uuid\u arr[16]={1,1,1,1,1,1,1,1,1,1,1,1,1,1}//一个新的uuid
struct att_char128_desc *p1 = (struct att_char128_desc *)cust_prf_funcs->att_db[CUST1_IDX_SERVER_TX_CHAR].value;
memcpy(p1->attr_type,new uuuid_uuarr,16);

但它不起作用

我的期望是,在代码执行之后uuid会发生变化^_^

我需要你的帮助,项目非常紧急

I can't find ble_gatts_add_service() and ble_gatts_register_service() function in sdk 5.0.4

陈鹏莱
离线
上次看到:1个月1周前
已加入:2018-12-24 02:24
Hi PM\u对话框

Hi PM\u对话框

我真的需要你的帮助!!!

PM\U对话框
离线
上次看到:12 hours 29 min ago
工作人员
已加入:2018-02-08 11:03
嗨陈鹏莱,

嗨陈鹏莱,

请尽量不要在论坛上重复这个问题。此线程与DA1468x产品系列和SDK1相关。我以以下的方式回答您:

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software/can-arbitrary-uuid-set-after

谢谢,下午好