Pairing Failed with the device which sets LinkKey bit at LE Key Distribution on Pairing Request.

9个帖子/ 0新
Last post
CD
Offline
Last seen:3 years 8 months ago
加入:2015-11-18 02:51
Pairing Failed with the device which sets LinkKey bit at LE Key Distribution on Pairing Request.

Hi,

When DA14583 connects to Xperia Android 6.0 device, we got "Pairing Failed" from DA14583.

The issue seems to be related with the LinkKey bit at LE Key Distribution on Pairing Request. This bit is added in Bluetooth Core Spec. Version 4.2, and it was reserved bit in 4.0 and 4.0.
When we tested Pairing sequence using Nexus 6 (android 6.0), the pairing worked well because Nexus 6 doesn't use LinkKey bit. (I believe Xperia's implements is right. Because Xperia expose it use version 4.2.)

I think this procedure was handled by SDK, so could you check it?
I attached detail information, so could you check them please?

此致,
CD

Attachment:
Device:
Joacimwe
Offline
Last seen:1 year 4 months ago
格鲁鲁
加入:2014-01-14 06:45
You should use SDK 5.0.3

You should use SDK 5.0.3 which fixes exactly this.

CD
Offline
Last seen:3 years 8 months ago
加入:2015-11-18 02:51
你好joacimwe,

你好joacimwe,

Thank you so much for your comment. I've assumed so.
Actually we use SDK 5.0.3... Are there any settings for it to apply patches or something?
What is a difference between 5.0.2 and 5.0.3?? Is it a object part? or C file?
I think the SMP part is a object part, so it is embedded in ROM as a hardware. Is fix code included in patch object, isn't it?

How does patch object actually work? We are using OTA solution and using mkimage tool. Are there any important methods/factors for using patch object?

So sorry for many questions, but we do use 5.0.3 and I think the problem is in our usage/environment of SDK.

Thank you very much,
CD

Joacimwe
Offline
Last seen:1 year 4 months ago
格鲁鲁
加入:2014-01-14 06:45
如果您使用SDK 5.0.3它

如果您使用SDK 5.0.3它should work directly without modifications or settings. The important files are arch_patch.c and the .obj files. You can check how the patch looks like for 3.0.10.1 here:http://support.dialog-semiconductor.com/resource/patch-release-sdk30101. I guess the diff between SDK 5.0.2 and 5.0.3 looks similar.

If you wonder how the ROM patching works in detail you should take a look at section 2.2 inhttp://support.dialog-semiconductor.com/resource/b-002-da14580-applicati.... Basically you can replace 8 32-bit words in ROM. However there should normally be no reasons for customers manipulating the patches, as those are normally handled by Dialog.

Have you tried to run some SDK 5.0.3 example directly, such as the proximity application?

MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨CD,

嗨CD,

Joacimwe is correct, its was a known issue and should be fixed in the SDK5.0.3. The fix is patch in the ROM code and not a source code. There aren't any settings that you should apply, if you are using the 5.0.3 not the 5.0.2 this should work. You can also find the patch where is indicated and have a look (this is included in SDK5).

Thanks MT_dialog

CD
Offline
Last seen:3 years 8 months ago
加入:2015-11-18 02:51
你好joacimwe和mt_dialog,

你好joacimwe和mt_dialog,

Thanks for your quick reply.
之后,我使用DA14580 Dev-kit和Prox_poporter(自定义为配对)进行测试。它可以与Android 6.0配对。(它可以正确使用Linkkey位。)
我们还检查了5.0.2.1 +修补程序(4个重要文件 - Arch_patch.c和.obj文件)是否适用于da14580 dev-kit和prox_reporter环境。它也很好。
现在我们正在检查RAM和堆用。因为我们的旧项目运作良好,但最近一个不起作用....文件大小变得更大,更大,因此堆或堆栈边距可能不足以处理LinkKey位。我不知道,但它有可能吗?根据LinkKey位使用堆文件的使用情况吗?

Thank you very much for your supports as always.]

Best,
CD

Joacimwe
Offline
Last seen:1 year 4 months ago
格鲁鲁
加入:2014-01-14 06:45
More and more patches of

越来越多的补丁当然占用了更多空间。只有8个单词可以直接修补8个单词也意味着如果有更多的补丁需要不同的补丁方法,则占用更多空间。然而,通常有改善的空间;补丁不是真正优化的。

If you look in arch_patch.c, you will find the following which is the patch that fixes the LinkKey bit:
// 0x00031b95 smpc_check_param.
SetWord32(PATCH_ADDR5_REG, 0x00031b94);
setword32(patch_data5_reg,0xb500df05);// smpc_check_param svc 5

and with the corresponding entry in the patch_table array:
(const uint32_t *) my_smpc_check_param,

基本上意味着ROM SMPC_CHECK_PARAM函数的修补副本被放入了您在项目中链接的一些.obj文件。

你可以解决这个问题在一个更大的问题t way. Take back the patch files used by SDK 5.0.2.1.

Then you replace this code:
//0x0002cb43 smpc_check_pairing_feat
setword32(patch_addr3_reg,0x0002cb40);
setword32(patch_data3_reg,0xdf03e7f5);// smpc_check_pairing_feat svc 3

with this code:

setword32(patch_addr3_reg,0x00031be8);
setword32(patch_data3_reg,0xbd00);// pop {pc}

That's all that's needed and you should see that this solution takes less space than how it's done in SDK 5.0.3.
Note that the smpc_check_pairing_feat patch is only important if you use the central mode on the DA14580, which I guess you're not.

MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨CD,

嗨CD,

I cant see the connection between the memory usage and the Link key bit, yes the patches are making the file footprint larger but i cannot see the relation between this and the behaviour of your device.

Thanks MT_dialog

CD
Offline
Last seen:3 years 8 months ago
加入:2015-11-18 02:51
Hi Joacimwe and MT,

Hi Joacimwe and MT,

I just assumed SMP layer function in SDK uses malloc() or something memory assigning by using heap area, and if LinkKey bit is set, the usage of heap area or assigned area may become larger... (This was just our guess...) Now, we can't reproduce this issue now, it seems we missed the testing procedure or something... 5.0.3 works well, and we can not see any problem now on this. We would like to see how it goes...

Thank you so much for your great supports both!

Best,
CD