⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
19 posts / 0 new
Last post
Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
Connection drops

Hi there,

I am experimenting with a pair of DA14531 TINY modules connected to a computer via a 2-wire UART and USB/UART converter on CP2104 by using CodeLess firmware image codeless_531_standalone_set_two.hex. Establishing a connection between them works as described in Section 3.3 of UM-B-140. But the probelm is that the modules drop the connection after about 3 minutes. Is it possible to fix it so that the connection will remain active indefinitely?

另外两个预编译(codeless_53固件图像1_standalone.hex and codeless_531_datapump.hex) are free of this disadvantage, but I need I2C support. I recompiled the standalone_set_two project from source, but it still drops connection after 2-3 minutes. Same happens if I recompile SET ONE firmware by adding I2C feature to it. Dialog team - please advise how to fix this.

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

Thanks for your question.

>>> But the probelm is that the modules drop the connection after about 3 minutes.

Can you please provide further details on this? When the connection drops? Are you sending any specific AT command? Can you please run it in debug mode?

>>>I2C support

Do you mean that there is an I2C interface connected to the TINE module, and your requirement is to read and transmit the I2C data?

我建议在调试模式下运行该项目,并检查它是否陷入了断言NMI等。

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
Thanks for the prompt

Thanks for the prompt response!

I2C与此问题无关,因为到目前为止,我甚至不会向模块发出任何I2C命令。此外,它没有连接到它。我使用的唯一模块引脚是P0_5和P0_6,将其连接到外部USB-UART转换器。

I use Codeless SDK 6.380.10.4 with a free version of Keil v5.27.1.0 and commented out some AT commands in file user_at_command.h (see attached) to bring the codeless_stand_alone image under 32K limit. Following your advise I ran it in debug under Segger J-Link debugger. Right after starting the code I give to it AT+SLEEP=0 command, the module responded with OK and +AWAKE on the next line. Then I use Cypress CySmart tool along with their dongle as a central device to connect to the TINY module. Upon establishing the connection the module responded with +CONNECTED (in TeraTerm) and I can explore its services and attributes in CySmart used as BLE scanner tool. At this point everything works fine as expected - I can see the module's characteristics outlined in the manuals. Then I leave the module idling in the connection mode, that is issue no commands from TeraTerm and also no command over Bluetooth from CySmart. The connection is dropped after ca. 3 min as I described before. The debugger does not show me anyhing suspicious, definitely no NMI, actually it does not show anything, just runs the module code. The TeraTerm reports +READY and CySmart reports connection drop.

If you unaware with CySmart, I did the same experiment by establishing a Bluetooth connection with a pair of 531 TINY modules. One of them runs pre-compiled image (does not matter which one), the other modules runs my compiled image. The same connection drop happens after 3 min. However, if both modules run pre-compiled datapump or standalone images (by pre-compiled I mean the images provided in SmartBond Flash Programmer) tool, then no connection drop is experienced. But once one of the moduled is loaded with pre-compiled standlone set two, the connection drop happens. So, something is wrong with pre-compiled set-two image and with the SDK source code.

I wrote about I2C only because I need that option. So far I even did not try how it works, so the problem is definitely not related to I2C.

Attachment:
PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

由于应用程序代码不会卡住任何地方(NMI / WDOG /断言),因此共享嗅探器日志将非常有帮助,以便了解在空中发生的情况。

Would it be possible to use a BLE sniffer tool and share an sniffer capture?

Do you have a custom board, or you are using any of or DKs? Additionally, if you are using sleep mode, then you should use 4 UART signals (URX/UTX/RTS/CTS).

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
Here you go. The attached

Here you go. The attached archive has a photo of my hardware (just DA14531 module and CP2104 USB-UART) and the BLE events Log. The Log shows that the 531 issued connection timeout 3 minutes after connection establishment (the last 3 records). I do not use SLEEP mode.

Attachment:
PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

在附加日志中,断开原因是连接超时。根据蓝牙LL核心规范,连接超时错误代码表示链路监控超时已过期为给定连接。监控超时在User_connection_param_conf结构中设置。

Can please also indicate if the device starts advertising again after the disconnection? You can add a break point in the disconnection callback - user_on_disconnect() – and check the disconnection reason as well. Please see gapc_disconnect_ind structure.

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
是的,掉落后

是的,掉落后connection the DA device starts advertizing again. You are right: the Link supervision is expired because DA14531 stopped responding to connection events.

I created a special app by using Silicon Labs Simplicity Studio and their Thunderboard Sense 2 board as Central that just connects to DA14531 and does nothing after that while keeping the connection active. In the attached archive there are two images provided by Simplicity Studio Network Analyzer. On those images the device 90:FD:9F:7B:86:16 is my Central and DA:E4:D9:A6:F6:E9 is DA14531. On image named Connection_parameters you can see that DA14531 requested to set Connection latency 5 and Supervision Timeout 1250ms, which were accepted by the client (see Events Detail window). Then on image Log2 you see that DA14531 works according to the Connection Latency by not responding to 5 consequtive connection intervals in series. But after 138sec in this case it was a longer series of not responded packets which caused Superivision timeout at Central. I also see this reason (Error 0x208) on Tera-Term output from my central device on the 3rd image.

从这些日志,它遵循that after some time (2-3min) DA14531 stops responding to connection events for no reason. So, Dialog - why don't you just fix your software. Such behavior is definitely a bug. You can easily convince yourself in that by compiling and loading your provided source code into two modules or dev boards.

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
OK, Dialog, I decided to

好,对话框,我决定听从你的建议添加ing several break points in user_on_disconnect() function in file user_codeless.c. It turns out that your provided code does not go into this function after connection is dropped. Further investigation showed that the module resets itself after dropping a connection and if one adds a breakpoint in main(), the code stops there. So, I believe you need to create a ticket for your software development group. If you want me to do it, please give me instructions.

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

请你用它连接的调试器运行它,并分享一个屏幕截图,在断开断开后代码卡住了代码?

设备是否从系统RAM或SPI Flash启动?

说实话,我很困惑。您能用SmartConsole移动应用程序复制此问题吗?

In my side I am not able to replicate it and the CodeLess is working perfectly.

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
I ran it in a debugger again,

我再次在调试器中运行它,附加了屏幕截图。代码不会卡在任何地方,它只重置模块,主()函数开始续。您将在屏幕截图上看到它,显示调试器在删除连接后停止的位置。因此,模块已准备好建立一个新的,而且如果我继续运行它。但是在〜3分钟后,新的连接也会掉落。同样,我没有在建立连接后与模块通信 - 只是让它怠速。它看起来像看门狗行为一样。

我不使用任何(外部)闪光灯,只需连接到CP2104 USB转换器的裸模块,请参阅附图,并且不确定设备如何在内部启动。我刚刚编译了无附加的软件(V6.380.10.4)图像,用于无附加_531_SET_TWO_STANTalone,无需任何更改,并通过SWD接口将其加载到我的两个模块中。因此,它根据软件中的算法靴子。并且它在每个模块上都适用 - 在不活动3分钟后下降连接。

The same connection drop behavior is observed by using SmartConsole app on Android (Samsung Galaxy S8) as client. Any ideas what else to check?

稍后添加(IMPORTANT):我刚刚注意到,如果我向在调试器下运行的模块发出ATI命令,则响应是CodeLess DA14531 v_6.380.10.4这与我使用的SDK版本匹配。但是,如果我现在用调试器断开连接重启模块,则对ATI命令的响应变为CodeLess DA14531 v_6.380.9.10(??!!!) Maybe this is the reason for the misbehavior?

Attachment:
Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
好的,这几天我了解到了

好的,这几天我了解到了if one programs the module from within Keil (in degug mode) and externally with Dialog SmartBond Flash programmer, then the results are different. Namely, after flashing my compiled code with the Flash programmer it shows the right firmware image versionDA14531 v_6.380.10.4no matter how you boot it (I mean during the debug session in Keil and also with JLink debugger disconnected). So, the mismatch between the firmware images outlined in the稍后添加section of my post above is resolved. However, the module still drops the connection after 3 minutes. Am I the only one who experiences that?

对话团队:如果连接没有放弃你,请你能给我发六角映像吗?codeless_531_set_two_standalone.hex这对你有钱吗?

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
嗨谢尔盖,

嗨谢尔盖,

你在大学里有BLE嗅探器工具吗?我们想分享一个BLE捕获,这样我们就可以了解在空中发生的事情。这将真的帮助我们了解更好的根本原因。

您能用运行SmartConsole应用程序的另一个手机复制此问题吗?你有没有尝试使用三星Galaxy S8?

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
亲爱的对话团队!我有

亲爱的对话团队!我已经提供了由不同捕获软件和硬件收集的两个BLE捕获。其中一个由赛普拉斯综合组织和他们的加密狗CY577和另一个由Silicon Labs网络分析仪收集。附加是北欧半导体BLE加密狗PCA10031收集的另一个更详细的捕获,以及它们与Wireshark(V3.2.5)串联工作的嗅探器3.0软件。附加的捕获涉及两个设备(我的Galaxy S8手机运行SmartConsole和DA14531模块,带Mac 48:23:35:00:07:AA),可以使用Wireshark打开。在这些情况下,我在建立它后留下了连接空闲。这些是我的所有BLE嗅探工具。

我有replicated the connection drop issue on another another Galaxy S8 phone of my wife, on my older Galaxy S5 phone, and with at least 3 other non-phone BLE devices that I use as a master. DA14531 module just stopps responding on Master connection events and resets itself (I am not sure what comes first, though). Again, I experience this only if I load codeless_531_standalone_set_two image into the module. Connection with other two available pre-compiled images (codeless_531_datadump and codeless_531_standalone) seems working fine, i.e. without connection drops after 3 minutes, unless I compile them myself from the provided source. In the latter case connection drops appear no matter which image I compile.

我使用的预编译图像是由对话框智能闪存程序员提供的图像。我问你上面给我发给我用于测试的图像。请做到。此外,请在您的硬件上尝试附加的十六进制。

Attachment:
PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03

嗨谢尔盖,

My apologies for the confusion – just saw the attached sniffer log. Finally I can replicate it with the codeless_531_standalone_set_two.hex and using the Flash programmer tool. Let me escalate it to the team internally and I’ll get back to you as soon as possible.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
嗨谢尔盖,

嗨谢尔盖,

My apologies for my late response. i got feedback from the Team internally and will have a fix soon. I'll let you know in this forum thread, once the fixes is released.

Any other comments / feedback reggarding the CodeLess would be more than welcome!

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
谢谢你。I am looking

谢谢你。我期待着解决的问题。

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

新无附加无线环版6.380.12.6已在线发布。现在可以从无附件的门户下载:

//www.xmece.com/products/smartbond-codeless-commands

Thanks, PM_Dialog

Sergei Bezroukov
Offline
Last seen:6 months 4 weeks ago
Joined:2020-06-25 00:28
Thank you, Dialog Team. This

Thank you, Dialog Team. This issue is resolved. Waiting for resolving the I2C issues...

PM_Dialog
Offline
Last seen:3天2小时前
Staff
Joined:2018-02-08 11:03
嗨谢尔盖,

嗨谢尔盖,

Thanks for accepting my answer and glad that the new CodeLess release fixes this issue. I’ll get back to you in your other forum thread regarding the I2C questions..

Thanks, PM_Dialog