用于配对的外围义务静态引脚。

12个帖子/ 0新
最后一篇
Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
用于配对的外围义务静态引脚。

I use LBCA2HNZYZ with SDK from Dialog version 3.0.6. Application based on " reporter_fh" example.

I have to implement PIN feature while BLE connection.
The device doesn't have display and keyboard. Device is "peripheral (slave)".
For pairing it need to require the static PIN code from "central (master)" side. The central is IPAD with iOS SDK.
当我尝试与Android手机与设备配对时,我会使用键盘获取弹出窗口以进入PIN。正确的引脚允许配对。iOS与设备连接,没有任何代码。
我如何要求PIN强制性?
Can you please tell me what is wrong?

Thanks in advance.

Device:
mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨Vadym,

嗨Vadym,

您的意思是iOS完成了配对而不询问PIN,然后输入您可以看到服务和特征的数字?你能写下它们吗?如果您的特性没有授权,那么没有人迫使主机需要配对以便阅读它们。也铭记服务发现不是安全的一部分。意味着主机能够看到不需要身份验证的支持的服务和特性,所有服务和特征都可以在服务发现期间(不是它们的值)。如果您希望主机无法看到您的服务,您可以在成功配对/绑定到外围设备后启用它们。现在我想看到iPhone上的服务/特征,而不是在Android上看到它们的一个UI。

谢谢mt_dialog.

Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
你好。I am not very big expert

你好。我不是蓝牙低能量协议的专家,所以可能有人可以帮助我几个问题:

1. Is there ability to ask pin code every time when the same IPAD(iOS) connects to the same device?
2.与设备配对时,我需要为强制性的询问密码代码做些什么定义?
3. Do I need to do PROXIMITY PROFILE ATTRIBUTES DEFINITION with authorization required or identification?
4.在Connect建立过程中,函数app_send_pairing_rsp_func()未调用。如何才能要求中央询问连接参数?
In the project I defined: app_sec_env.auth = (GAP_AUTH_REQ_MITM_BOND);

Thanks!

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
Hi vadym,

Hi vadym,

在BLE时,当断开连接时,当断开连接时不会再次通过配对过程,如果主机先前已连接到设备,则需要验证在配对过程中交换的键。因此,如果您的设备正确配对,则唯一的方式将重复配对过程是未配对的。您必须设置您的服务或特定的特征,以便才能授权,只有在配对序列之后只能读取和写入特征,主机将能够看到服务和特征,但他不会能够在配对之前读取它们或写入它们。当他看到特征需要授权时,您的主机必须发出配对请求命令。

谢谢mt_dialog.

Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
你好。

你好。

如果我理解对,我需要在功能中定义连接安全选项:
void app_send_pairing_rsp_func(struct gapc_bond_req_ind * param)
and also set service or specific characteristic to require authorization.
When I try to connect from IPAD I doesn't enter to the function "app_send_pairing_rsp_func". Obviously, the IPAD already paired to the device.
In our application now there isn't option for unpairing.
核心BLE(iOS)的API是什么,我们需要用于解成对设备并清除验证密钥?
我在“蓝牙设备”中看到设备(设置 - >蓝牙),但我不能做任何事情。

Thanks.

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨Vadym,

嗨Vadym,

在连接建立期间,您是否在app_connection_func中调用app_security_start()?您可以找到函数的实现和SmartTag参考设计中的配对过程的示例。要完成配对过程而不调用App_send_pairing respose_func是一点奇怪的。

谢谢mt_dialog.

Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
你好。

你好。

谢谢你的所有答案!它真的很有帮助!
Now I have the next situation.
当设备首次与中央连接时,请求PIN码弹出窗口显示在iPad上。并第一次正确连接。
从设备中央断开(不忘记绑定)后,无法再次连接。iPad提供消息“连接警报。在询问时断开连接的外设”。我尝试使用SmartTag参考设计的功能:
void app_store_bond_data(void);
void app_clear_bond_data(void);
int app_check_bond_data(struct rand_nb * rand_nb,uint16_t ediv);
void app_load_bond_data(void);

这并没有改善这种情况。
有人可以给我一个提示吗?
非常感谢!

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨Vadym,

嗨Vadym,

当一个设备配对时不再通过配对过程,主机必须发送和Ecryption请求,以便与对等设备建立安全链接。在SmartTag中,当您的设备绑定并通过配对过程再次进行闪存中的数据并将拒绝连接。

谢谢mt_dialog.

Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
Hi dear support.

Hi dear support.

I am trying to use example from smart tag, but no so successful...

当IOS试图连接键和disconn之后ecting I enter to the gapc_encrypt_req_ind_handler() function and it calls to app_connect_confirm(). After it enters to the app_send_pairing_rsp_func().If I understand right it should not happen.
After that, the devices disconnect.

使用Android,它在绑定后连接,当Android中央忘记绑定信息时,设备拒绝连接。
1. iOS所定义的错误是什么?
2. What is example for evaluation board I can to see for the same situation, when I want to connect with peripheral with static pin code (the device defined with Display).

非常感谢!

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨Vadym,

嗨Vadym,

In Smart Tag when the device pairs with the iOS when it disconnects in order to connect again the iOS should send the encryption request since they are bonded. In your case, when reconnecting, the device is sending a pairing request again and the device commands the peripheral to go through the pairing procedure again ? (yeap this should not happen since the devices are bonded - please check if the device is bonded in the settings tab in your android phone). There is no special definition for operating in iOS and android. Smart Tag should work on both android and iOS without any modifications.

谢谢mt_dialog.

Vadym.
离线
最后一次露面:1 year 3 months ago
加入:2015-08-13 08:28
你好。

你好。

它开始工作。
The problem was with IOS 7. With IOS 9 it works properly.

有人知道我是否可以使用超过6位数的硬编码的字母数字PIN码?

Thanks.

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨Vadym,

嗨Vadym,

I believe that the PIN code is 6 digits (from 000000 to 999999) by bluetooth spec.

谢谢mt_dialog.