GATT connection timeout in DA1469x_Custom_ble_service_sample_code

了解更多FAQsTutorials

14个职位/0个新职位
Last post
prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
GATT connection timeout in DA1469x_Custom_ble_service_sample_code

Hello Dialog,

I am able to run the Custom_ble_service example. But, when I am trying to read or write data through the nrf connect app, I am getting the GATT connection time out error with in some milliseconds of time which makes me to reset the USB board again to make the connection. Could you suugest me where can I adjust the time?

另外,如果我想测试这个应用程序with two USB DA14695 boards, How can I modify the properties of the characteristics in the ble_peripheral and the ble_central examples to read and write between them through UART?

Thanks in advance.

当做,

普拉桑纳

设备:
PM_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

Can you please indicate which characteristic are you trying to read/write? Would it be possible to share a sniffer log so that I can understand what is happening over the air?

>>如何修改ble\u外围设备和ble\u中心示例中的特征属性,以便通过UART在它们之间进行读写?

Can you please clarify this statement? So, do you need to read data from the UART and send them over BLE to a peer device?

Thanks, PM_Dialog

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
Hello Dialog,

Hello Dialog,

Please find the log file attached below.

I am testing the sample example "DA1469x_custom_ble_service_sample_code" example.

1你可以从日志文件中看到,有一个连续的连接错误几次,我几乎无法连接,只有当我重置USB。我在日志文件中突出显示了错误以及何时可以发送数据。几乎在文件的结尾,你可以看到,我可以发送“你好”的消息到外设,这是在UART打印。但是,你马上就能看到连接丢失了。你能告诉我怎样才能和在代码的哪些部分,我可以调整延迟吗?

2. Is there any specific intervel where the peripheral makes a connection with the requested central device so that the connection is lost when the time out happens?

3. The services and the characteristics that are discovered are displayed as "Unknown" in the central device. In which parts of the code I can change the names of services and characteristics?

4在此特定示例中创建了两个未知服务。第二个服务有三个只可读的特征。但是,在代码中,用于读取的参数在第二和第三特征中被禁用。尽管我们可以从我分享的截屏上看到我们可以读取数据。怎么可能?您可以在上述示例程序的“ble\u peripheral\u task.c”文件中看到第二个未知服务的第二个和第三个特征函数调用中的CHAR\u READ\u PROP\u DIS。

5. Now, with this example, I can read, write data to the peripheral from the smart phone. But, I wanted to read and write data between two DA1469x USB boards. To achieve this, I need some suggestions what are the two best example demos from the sdk I can use to modify the permissions?

Thanks in advance.

当做,

普拉桑纳

Attachment:
MHv_Dialog
Offline
Last seen:5 days 23 hours ago
Staff
加入:2013-12-06 15:10
Hi Prasanna,

Hi Prasanna,

Please use the Android app BLE Scanner instead (it is the one used in the readme file). It works well using this app.

  1. 可能是你的手机,可能是nRF应用程序。我测试它没有问题,使用BLE扫描仪和浅蓝色以及我的电脑上的Chrome浏览器(类型chrome://bluetooth-internals/#devices在Chrome或新边缘浏览器的地址字段中)
  2. Peripheral devices do not initiate connections. This is the task of a central device. A peripheral will often start advertising when the connection is dropped, but that is a design choice. Centrals can try to reconnect, but again that is a design choice. The sample code in question will start advertising if a connection is dropped
  3. The services and characteristics are unknown to the app because they are custom services and characteristics. How would the generic app know about them? you can define a user descriptor, a text string, to make it easier for a human to discover the database. Applications will typically be implemented to recognize the custom 128bit UUID
  4. There is likely an issue here. I'll dig further into that and let you know
  5. You will need the central example, this custom service example and likely the UART example.

/MHv公司

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
嗨,MHv\U对话,

嗨,MHv\U对话,

在SDK中哪里可以找到UART示例。另外,当我测试ble\u central和定制服务示例时,中心设备无法发现在定制服务示例中创建的服务。我不明白为什么会这样?你能测试一下这个,让我知道你是否能够发现服务。

Thanks in advance.

当做,

普拉桑纳

MHv_Dialog
Offline
Last seen:5 days 23 hours ago
Staff
加入:2013-12-06 15:10
可以找到UART示例

可以找到UART示例on the support site: DA1469x UART adapter example

I tested all of the central applications in my previous response, and none of them have any issues - did you try any of those?

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
你好,MHv\U对话,

你好,MHv\U对话,

我正在测试DA1469x\u custom\u service\u示例和BLE\u central示例。中心无法发现自定义\服务\示例中定义的服务。只有在使用ble\u外围示例进行测试时,才能发现服务。即使定制服务有ble\u外围任务,它声明了一些服务,我也不明白为什么ble\u中心不能用定制服务示例发现服务。

当做,

普拉桑纳

PM_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

Sorry for jumping in and happy new year. We have escalated this internally and we are working on this. We’ll get back to you.

Thanks, PM_Dialog

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
Hello PM_dialog,

Hello PM_dialog,

我明白了为什么我找不到这些服务。因为,设备无法发现外设,我在ble_conig.h中更改了地址。但是,每次外设用一些随机地址做广告时,我如何避免通过检查智能手机应用程序手动给出地址。

也祝你新年快乐:)

Thanks in advance.

PM_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

Could you let us know how you figured this out?

Please also clarify your follow-up question.

Thanks, PM_Dialog

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
你好,PM\U对话,

你好,PM\U对话,

I have changed manually the address "defaultBLE_STATIC_ADDRESS" in ble_config.h of the ble_central example to discover the BLE-peripheral, connect and dicover its attributes.

Regardimg my question,

为了在blecentral演示中手动更改上述地址,每当中央无法检测到外设时,我必须检查外设通过智能手机应用程序生成的随机地址。那么,有没有什么方法可以让中央计算机检测到带有随机地址的外设呢?

谢谢,普拉桑娜

PM_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

要更改BD地址,建议在custom\u config\u qspi.h文件中添加以下宏定义,而不是修改SDK文件。例如:

#define defaultBLE_STATIC_ADDRESS { 0x11, 0x22, 0x33, 0xCA, 0xEA, 0x80 }

The peripheral, is a mobile phone? Usually the mobile phone are using random BD address, so they are changing every time. There is not way to detect the newly generated random address of the peripheral. You could configure another DA1469x as a GAP Peripheral using a static BD address.

Thanks, PM_Dialog

prasanna
Offline
Last seen:3 days 1 hour ago
加入:2020-09-29 11:56
Hello Dialog,

Hello Dialog,

I am bit confused. Could you clarify me what is the value of the address "#define defaultBLE_STATIC_ADDRESS" defined in the ble_central/ble-config.h file. is it the central address or the peripherals address which it has to connect to?

我使用两个对话U盘作为ble\ U外围设备和ble\ U中央设备。我已经看到两次外设的地址发生了变化,这是我通过检查ble扫描仪应用程序发现的。一个是地址c5:80:c1:42:3e:8f,第二次我发现它改成了06:06:06:01:01。这就是为什么我不明白这是怎么发生的?

PM_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入: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