14个职位/0个新职位
Last post
imalamoud
Offline
Last seen:4 days 17 hours ago
Joined:2014-11-16 21:34
DK-DK SPS connection

Hello,

We would like to implement SPS connection to connect a measurement data provider to a host PC.

I have tried DK-DK SPS connection and it works fine so I was thinking about making host-device pairs based on DA14580 in production.

In one of the forum posts I have read that the host application is preset to search for the peripheral, pair and then start the data connection session immediately.

你能提供主机正在搜索的信息吗?
自动配对需要什么?
How do we implement such during the actual production?

Your help is greatly appreciated.

当做,
Ilia

MHv_Dialog
Offline
Last seen:4 days 18 hours ago
Staff
Joined:2013-12-06 15:10
Hi Ilia,

Hi Ilia,

The host is searching for peripherals advertising the following data:

#define APP_DFLT_ADV_DATA "\x03\x03\x83\x07"

(在附录h中定义)

The comparison happens whenever a scan report is received. You can see this comparison in the file app_task.c:

如果(!memcmp&参数->报表.数据[3] ,应用程序数据,应用程序数据)

This filtering scheme is good unless more than one peripheral can be expected to advertise in a given setting. If multiple peripherals can be expected, you would need something like a user interface to determine which one to connect to. In either case, the scan report will contain the information to filter on.

I hope this helps you move forward.

imalamoud
Offline
Last seen:4 days 17 hours ago
Joined:2014-11-16 21:34
谢谢你的快速回复。

谢谢你的快速回复。

It is more clear now.

Looking at the code I noticed that NVDS data NVDS_TAG_APP_BLE_ADV_DATA is not used during connection establishment. Is it correct or I missed something?

MHv_Dialog
Offline
Last seen:4 days 18 hours ago
Staff
Joined:2013-12-06 15:10
You've got it right :o)

You've got it right :o)

imalamoud
Offline
Last seen:4 days 17 hours ago
Joined:2014-11-16 21:34
It is great to have some

能回答一些问题真是太好了!:)

So I guess the host would establish a connection with the first advertising data source. The user then would have to disconnect the source manually to establish a different connection.

到目前为止还不错:)

I understood that if the device terminates the connection the host would switch to advertising. Correct?

如果主机终止了连接怎么办?设备的电池资源非常有限。它会自动切换到睡眠状态,启动广告(高功耗),还是我们需要自己管理活动?

Also in the documentation it is mentioned that deep sleep mode is not implemented. Are you planning to implement it for SPS?

MHv_Dialog
Offline
Last seen:4 days 18 hours ago
Staff
Joined:2013-12-06 15:10
Hi,

Hi,

Yes, unless you change the connection criteria for the central, you would have to disconnect from the host and try again. This wouldn't be a good scheme in the real World, though. You could change the advertising data to include a unique ID and somehow let the central know which exact peripheral to connect to.

Sleep mode is not implemented in the current version of the DSPS. We are working on this however.

imalamoud
Offline
Last seen:4 days 17 hours ago
Joined:2014-11-16 21:34
Hello,

Hello,

Thank you for the answer.

So if the host terminated the connection (e.g. PC shutdown or out of bounds) the device would still needs to be manually disconnected?
What happens in such case?

你能推荐其他能完成类似任务的个人资料吗。测量数据为15-20字节块。不需要来自主机的控制通信。
也许是灯塔?

赵桂梦
Offline
Last seen:4 years 2 months ago
Joined:2014-08-25 05:18
Dear Dialog Supporter:

Dear Dialog Supporter:
在服务器角色示例中,我在您的DK DA14580\u DSPS\u 3.150.2上启用了app\u sec。我用北欧的主控制面板测试过。配对没问题,我拿到了安全钥匙。
The issue:
when I reconnect them, sometimes it can rearch the end of encrypton,sometimes disconnection occur soon after connected.
在sps服务器上,断开连接的错误代码为“0x3D”。
Do you know why?

bluetoothdev
Offline
Last seen:5年7个月前
Joined:2015-02-12 07:11
Hi Zhao Gui Meng,

Hi Zhao Gui Meng,

Could you show me how to enabled app_sec on your DK DA14580_DSPS_3.150.2 in server role and what is security keys you got? Truly, i have also tested this but it does not work with me!

Thanks and best regards
Blue

赵桂梦
Offline
Last seen:4 years 2 months ago
Joined:2014-08-25 05:18
Hi blue,

Hi blue,
Thanks for your reply.
To enable security:
1. define CFG_APP_SEC in da14580_config.h file.
2. add "app_sec.c" and "app_sec_task.c" to keil project app tag
3. modify some build issue if occured.

I got the keys in app_sec_env like below:
LTK :5D-EC-98-0B-CB-C2-B6-D1-19-F8-B4-F7-47-8E-92-7D
RAND :21-60-FC-9F-CF-76-5A-A5
EDIV:0x3455
K尺寸:16
TYPE :0
地址:D6-6F-C3-85-29-4D
作者:1
NVDS :0

致以最诚挚的问候。

bluetoothdev
Offline
Last seen:5年7个月前
Joined:2015-02-12 07:11
Dear Zhao Gui Meng,

Dear Zhao Gui Meng,

I greatly appreciate your answer! I have configured as you before . Are you using noRDIC Master Control Panel to test the keys in app_sec_env? I was using DSPS android app to do it and it might causes my problem :D
Thanks a lot,

blue

赵桂梦
Offline
Last seen:4 years 2 months ago
Joined:2014-08-25 05:18
Dear Blue,

Dear Blue,
早上好。
Yes, the opposite tester is a NORDIC Master Control Panel.
谢谢你的关心。

赵桂梦
Offline
Last seen:4 years 2 months ago
Joined:2014-08-25 05:18
嗨,蓝色,

嗨,蓝色,
Can you tell me the meaning about error code of "0x3D" of disconnection?
How can I catch the advertising report for a direct advertising?
致以最诚挚的问候。

赵桂梦
Offline
Last seen:4 years 2 months ago
Joined:2014-08-25 05:18
Dear Dialog Supporter,

Dear Dialog Supporter,
I have enabled security features on your DK DA14580_DSPS_3.150.2.
With DSPS of IOS, both of pairing process from unpaired state and encription process from paired state works alright.

But with Dialog's DK, when encript, the link is disconnected from slave. The disconnect resons are "0x3D" for slave and "0x08" for master.

谁知道如何解决这个问题?

I have a hint that is the contents of app_sec_env in master be corrupted between connections. but why?

I lookforward your reply.
致以最诚挚的问候。