Disconnect issue with DA14580 (Murata LBCA2HNZYZ)

13 posts / 0 new
Last post
Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Disconnect issue with DA14580 (Murata LBCA2HNZYZ)

Dear Dialog,

I've developed a product with a Murata LBCA2HNZYZ BLE module (which includes a DA14580 chip).
That product has two modules, one is a central and the other one is a peripheral.
But after connected to each other, peripheral never responds a few times an hour.

The distance between central and peripheral is around 6 meter. And there is not radio wave interference at my environment.
At my test code, central sends a one packet which has 23 octet PDU-length every 50ms.

In many cases peripheral responds an ACK with empty packet.
But peripheral never sends any responce suddenly after sending a packet from central.
At this time, central keeps to send same packet (retry).
And finally they disconnect because central never get any packet from peripheral.

In this case, BLE stack (GAPC) of peripheral send error "0x3D(CONNECTION TERMINATED DUE TO MIC FAILURE)".

Please help me to find the reason why the disconnect and how to improve the stability of the connection.

Here are detailed infromation of my environment.

[SDK]
3.0.10.1

[BLE setting]
WinSize :02
WinOffset :0x0002
Interval   :0x0006
Latency :0x0000
Timeout :0x0048
ChM :0x1FFFFFFFFF
SCA :0x00
Encryption is enable.
Using MIDI over bluetooth protocol

Keywords:
Device:
MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

This kind of reason for link termination is a bit rare to happen and also is a bit strange, since the MIC in at the Controller level, i dont think that there are much to do via software in order to cause that disconnection reason, even if it was a bad antenna or a noisy enviroment you should be able to retransmit. The only thing that comes to mind, that perhaps, can cause this kind of disconnection is the use of the AES hardware by your software, perhaps in case you are using this hardware block, it isn't shared properly. Also try to replace the device of the central or the peripheral in case one of those doen't function properly.

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

Thank you for your reply!

Actually I use an AES hardware in DA14580 because our BLE connection is encrypted.

I have conducted some more tests. Here are additional facts.

1.我可以用强复制同样的问题g two Murata EVK (LBCA2HNZYZ-TEMP-DK) and our software.
2. There is no problem when our peripheral is connecting to Macbook.
[BLE setting]
WinSize :03
Interval :0x000F
Latency :0x0000
Timeout :0x0064
ChM :0x1FFFFFFFFF
SCA :0x05
Encryption is enable.
Using MIDI over bluetooth protocol
3. There is no problem when other peripheral (which doesn't use encryption) is connecting to our central.
[BLE setting]
WinSize :02
Interval :0x0006
Latency :0x0000
Timeout :0x0048
ChM :0x1FFFFFFFFF
SCA :0x00
Encryption is disable.
Using MIDI over bluetooth protocol
4. I can reproduce same issue with longer connection interval (7.5->15ms) and timeout (720->1000ms).
5. There is no problem when the central and the peripheral are set closer (0-3m).

I guess there is some problem at encryption method in central.
I'm looking forward to hearing from you.

Thank you!

Shun Kudoh

MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

Regarding the encryption, what i ment is, if on your central side you use the command in order for your application level implementation to use the encryption hardware ? more specifically if anywhere in your application you use the following command GAPM_USE_ENC_BLOCK_CMD ?Since you use security in your application the stack will handle all the encryption operations, you dont have to do anything from your application.

But besides that, the fact that when there is minimum distance between the devices you dont see this happening this would indicate an antenna problem. Also by the sniffer log i ve noticed that you have retransmittions (unexpected SN), can you provide some info regarding the XTAL32 that you use (if you are using, type etc). Also can you please switch the boards between the central and the peripheral for example pcb central -> fw peripheral and pcb peripheral ->fw central and check if you can catch the same error in the central this time.

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

I don't use a command GAPM_USE_ENC_BLOCK_CMD.
I only use a Bond and an encrypt command in sample code's macro of BLE_APP_SEC.

And I don't use both 32kHz xtal and sleep mode.

I have tried to exchange the hardware of Murata EVK (LBCA2HNZYZ-TEMP-DK) in order to switch from central to peripheral and peripheral to central.
But I have been able to reproduce this issue.

Now I'm trying to same test without encrypt at both central and peripheral. It seems to work well so far (one hour).
I'll continue to conduct this test.

Thank you!

Shun Kudoh

MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

Since you ve changed hardware and you were able to reproduce the issue, is the disconnection from the peripheral side (the peripheral reports MIC error as a disconnection reason and drops the connection due to a faulty MIC field packet from the central, as it was previously) or the central side ( the MIC disconnection reason appears on the central due a faulty MIC field on a packet the peripheral sent) ?

Without security and encryption you probably will get disconected by timeout, since you dont use encryption, you should not get a MIC reason disconnection.

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

The disconnection was from peripheral side in many cases. But also disconnection was from central side only once.
And I didn't get any disconnection including timeout (code 0x08) without security and encryption.

I have used a DA14580 with 7.5 ms fastest interval and security and encryption with 16 MHz xtal.
I guess there maybe some lack of performance in the core.
(And also I guess that the core needs more power when central and peripheral are put at a distance.)
The DA14580 has hardware AES peripheral, but security and encryption need some core power?
I wonder if I could get an information about a performance margin at both [7.5 ms connection interval + security and encryption] and [7.5 ms connection interval only] situation.

Thank you!

Shun Kudoh

MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

It seems a bit weird for the encryption to impose a delay in the to the system since the encryption its done via hardware, we are checking though and we will let you know. Also just to verify if the connection interval is larger, 50 ms or 100 ms for example you dont get a disconnection with that reason ?

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

I have tested with 100 ms connection interval and using encryption.
And I was able to reproduce same issue (0x3D CONNECTION TERMINATED DUE TO MIC FAILURE from peripheral).

I'm looking forward to hearing from your update.

Thank you!

Shun Kudoh

MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

If that is the case then the interval of the connection seems unrelated to the issue, and the lack of performance in the core can be crossed out. Is it possible to share your code over mail in order to try to replicate the issue ?

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

Thank you for your support.
Could you please tell me an address which I should send my code?
我在你的网站上寻找一个地址,但是我couldn't find...

Thank you,

Shun Kudoh

MT_dialog
Offline
Last seen:9 hours 5 min ago
Staff
Joined:2015-06-08 11:34
Hi Shun Kudoh,

Hi Shun Kudoh,

A mail has been sent to the registered email address.

Thanks MT_dialog

Shun Kudoh
Offline
Last seen:4 years 6 months ago
Joined:2016-06-27 09:59
Dear Dialog,

Dear Dialog,

I got your mail! And I sent my code.

Thanks

Shun Kudoh