Remove Bluetooth GATT service

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
20 posts / 0 new
最后一篇
Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
Remove Bluetooth GATT service

你好,

我的软件使用BLE_GATTS_ADD_SERVICE()和BLE_GATTS_REGISTER_SERVICE()创建和注册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_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudred,

嗨apoudred,

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.

谢谢,PM_DIALOG.

Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
你好pm_dialog,

你好pm_dialog,

正如我所说,我想从中删除服务属性数据库。

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

因此,BLE_SERVICE_REMOVE()似乎从服务列表中删除服务,而不是属性数据库。
Is there a way to remove a service permanently from the attribute database?

Best regards,
安迪Poudret

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudret。

嗨apoudret。

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?

谢谢,PM_DIALOG.

Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
你好pm_dialog,

你好pm_dialog,

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

Best regards,
安迪

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
你好apoudret.

你好apoudret.

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

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudred,

嗨apoudred,

正如我在我之前的注释中已提及的那样,没有任何可用的API从属性数据库中永久删除服务。如果您检查可用服务的初始化到SDK中,您将看到它们在初始化中分配内存(OS_MALLOC),因此它取决于您释放(OS_FREE)服务的内存。如果您使用自定义服务,则不应在服务初始化中动态地分配内存

谢谢,PM_DIALOG.

Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
你好pm_dialog,

你好pm_dialog,

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

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_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudred,

嗨apoudred,

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

谢谢,PM_DIALOG.

Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
你好,

你好,

我认为你被误认为我会有同样的问题,你的SDK提供的服务。

例如,如果我创建并添加服务CTS:
- 我可以禁用服务(使用ble_gatts_disable_service)
- 我可以删除与设备关联的存储(BLE_SERVICE_CLEANUP)
- I can remove service from services list (ble_service_remove)
但我想做的就是从中删除服务属性数据库。即,恢复BLE_GATTS_ADD_SERVICE()调用使用的内存。

如果在您的SDK中不可能,请说。

Best regards,
安迪

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudred,

嗨apoudred,

NIS不是可用于从属性数据库中删除服务的API。虽然,我会再次检查一下,如果您发现此目的,我会通知您。

谢谢,PM_DIALOG.

Apoudret.
离线
最后一次露面:6个月前1年
加入:2017-09-22 08:33
你好pm_dialog,

你好pm_dialog,

您是否对此问题有任何更新?

Best regards,
安迪

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨apoudred,

嗨apoudred,

不,没有任何更新。在调用BLE_GATTS_DISABLE_SERVICE()之后,您只能使用BLE_SERVICE.H标题文件的BLE_SERVICE_REMOVE()函数。

谢谢,PM_DIALOG.

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
嗨PM_DIALOG.

嗨PM_DIALOG.

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

我将gattm_add_svc_req按摩向gatt任务发送,但它似乎没有工作

你有什么主意吗?

如何在运行时更改uuid(不要重启)?

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨Chenpenglai,

嗨Chenpenglai,

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

SW Example: DA1468x BLE customer service

Custom Bluetooth Low Energy Profile

Could you please share more details about your implementation?

谢谢,PM_DIALOG.

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
嗨PM_DIALOG请帮助我

Hi PM_Dialog

请帮我

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
请给我联系

请给我联系

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
我在SDK 5.0.4工作

嗨PM_DIALOG.

我在SDK 5.0.4工作

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

I'm trying develop a general bluetooth module

请告诉我如何在运行后通过哪个函数更改存在UUID

I'm doing the following

uint8_t new_uuid_arr [16] = {1,1,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_uuid_arr,16);

但它不起作用

我的期望是,代码执行后uuid更改^ _ ^

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

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

陈鹏莱
离线
最后一次露面:2 months 1 day ago
加入:2018-12-24 02:24
嗨PM_DIALOG.

嗨PM_DIALOG.

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

PM_DIALOG.
离线
最后一次露面:7 hours 34 min ago
职员
加入:2018-02-08 11:03
嗨Chenpenglai,

嗨Chenpenglai,

请尽量重复论坛上的问题。此线程与DA1468x产品系列和SDK1有关。我已经在以下线程中回复了你:

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

谢谢,PM_DIALOG.