⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
19 posts / 0 new
Last post
Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
Connection drops

你好呀,

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
离线
Last seen:3 days 2 hours ago
职员
加入: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?

I would recommend running the project in debug mode and check if it gets stuck into an assertion NMI etc.

Thanks, PM_Dialog

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
Thanks for the prompt

谢谢你的快速回复!

I2C has nothing to do with the issue, since so far I even do not issue any I2C command to the module. Also, it has no slave connected to it. The only module pins I use are P0_5 and P0_6 to connect it to external USB-UART converter.

我使用无附带版SDK 6.380.10.4,使用免费版本的Keil v5.27.1.0,并在File User_at_Command.h中的命令中注释了一些命令(见附加),以使Codeless_Stand_Alone映像带到32K限制下。在您的建议之后,我在Segger J-Link调试器下调试中运行它。在启动代码后,我给它at + sleep = 0命令,模块响应OK和+唤醒下一行。然后我使用赛普拉斯综合工具以及他们的加密狗作为中央设备连接到微小模块。建立连接后,模块用+连接(在Teraterm中)响应,我可以在Cysmart中探索其使用用作BLE扫描仪工具的服务和属性。此时一切正常正常工作,我可以看到手册中概述的模块的特性。然后我在连接模式下留下模块空转,这是从Teraterm发出的命令,也没有从Cysmart上的蓝牙的命令。CA之后,连接被删除。我以前描述的3分钟。调试器不会向我展示Anyhing可疑,绝对没有NMI,实际上它没有显示任何内容,只需运行模块代码。 The TeraTerm reports +READY and CySmart reports connection drop.

如果您用Cysmart没有意识到,我通过建立一个与一对531微小模块建立蓝牙连接来执行相同的实验。其中一个运行预编译的图像(哪一个无关紧要),其他模块运行我的编译图像。3分钟后发生相同的连接下降。但是,如果两个模块都运行预编译的DataPump或独立图像(通过预编译的我意味着在SmartBond Flash程序员中提供的图像)工具,则没有经历任何连接下降。但是,一旦将其中一个调制装载了预先编译的独立安装两个,就会发生连接下降。因此,预编译的Set-Two Image和SDK源代码有问题。

我只写了关于I2C的,因为我需要这个选项。到目前为止,我甚至没有尝试如何工作,因此问题绝对与I2C无关。

PM_Dialog
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

Since the application code does not stuck anywhere (NMI / WDOG / assertion) , then it would be very helpful to share a sniffer log in order to understand what is happening over the air.

是否有可能使用BLE嗅探器工具并共享嗅探器捕获?

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
离线
Last seen:6 months 4 weeks ago
加入: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.

附件:
PM_Dialog
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

In the attached log, the disconnection reason is the connection timeout. According to Bluetooth LL core specifications, the Connection Timeout error code indicates that the link supervision timeout has expired for a given connection. The supervision timeout is set in the user_connection_param_conf structure.

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
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
Yes, after dropping the

Yes, after dropping the 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.

从这些日志中,它遵循,在某个时间(2-3min)da14531后,停止响应连接事件无缘无故。所以,对话框 - 你为什么不修复你的软件。这种行为绝对是一个错误。通过编译和加载所提供的源代码,您可以轻松地说服自己分为两个模块或DEV板。

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入: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
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

Could you please run it with the debugger attached and share a screenshot where the code gets stuck after the disconnection?

Does the device boot from System-RAM or SPI flash?

To be honest, I am little bit confused. Can you replicate this issue with the SmartConsole mobile application?

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

Thanks, PM_Dialog

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

I ran it in a debugger again, the screenshot is attached. The code does not stuck anywhere, it just resets the module and the main() function starts over. You will see it on the screenshot which shows where the debugger stopped after dropping the connection. So, the module is ready to establish a new one, and this works if I keep running it. But the new connection is also dropped after ~3 minutes. Again, I do not communicate with the module after establishing a connection - just leave it idling. It looks to me like a Watchdog behavior.

我不使用任何(外部)flash,裸模ule connected to CP2104 USB converter, see the attached image, and am not sure how the device boots internally. I just compiled Codeless software (v6.380.10.4) image for codeless_531_set_two_standalone without any changes and loaded it into my two modules via SWD interface. So, it boots according to the algorithm in your software. And it works the same on each of the modules - drops connection after 3 min of inactivity.

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

Added later (IMPORTANT):I just noticed that if I issue the ATI command to the module running under debugger, the response isCodeLess DA14531 v_6.380.10.4and this matches the SDK version that I use. However, if I now reboot the module with the debugger disconnected, the response to the ATI command becomesCodeLess DA14531 v_6.380.9.10(?? !!!)也许这是错误行为的原因?

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
OK, these days I learned that

好的,这几天我了解到,如果一个程序从Keil中的模块(在Degug模式下)和对话框中的对话框智能闪存程序员,那么结果是不同的。即,使用闪存程序员闪烁我的编译代码后,它显示正确的固件图像版本DA14531 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 theAdded latersection of my post above is resolved. However, the module still drops the connection after 3 minutes. Am I the only one who experiences that?

Dialog team: if the connection is not dropping for you, could you please send me the HEX image forDodeless_531_set_two_standalone.hex.that works fine for you?

PM_Dialog
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei,

Hi Sergei,

Do you have a BLE sniffer tool in the university? We would like to share a BLE capture, so that we can understand what is happening over the air. This will really help us to understand better the root cause.

Can you replicate this issue with another mobile phone running the SmartConsole application? Did you try ito only with the Samsung Galaxy S8?

Thanks, PM_Dialog

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
Dear Dialog Team! I have

Dear Dialog Team! I have provided above already two BLE captures collected by different capturing software and hardware. One of them is collected by Cypress CySmart tool and their dongle CY5677 and the other one by Silicon Labs Network Analyser. Attached is yet another most detailed capture collected by Nordic Semiconductor BLE dongle PCA10031 and their Sniffer 3.0 software that works in tandem with Wireshark (v3.2.5). The attached capture involves two devices (my Galaxy S8 phone running SmartConsole and DA14531 module with MAC 48:23:35:00:07:AA) and it can be opened with Wireshark. In each of these cases I left the connection idling after establishing it. These are my all BLE sniffer tools.

我在我的妻子的另一个Galaxy S8手机上复制了连接丢失问题,在我的较旧的Galaxy S5手机上,至少有3个我用作主人的其他非电话BLE设备。DA14531模块只是停止响应主连接事件并重置自身(我不确定第一个)。同样,只有在将Defeless_531_Standalone_set_two映像加载到模块中时,才会遇到这一点。与其他两个可用的预编译图像(Deceless_531_DataDump和Dodeless_531_Standalone)连接似乎工作正常,即3分钟后没有连接掉落,除非我从提供的源代码上编译它们。在后一种情况下,无论我编译哪个图像都会出现下降。

The pre-compiled images that I used are the ones provided by Dialog SmartBond Flash Programmer. I asked you above to send me the image that you are using for testing. Please do it. Also, please try my attached hex on your hardware.

附件:
PM_Dialog
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03

Hi Sergei,

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
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei,

Hi Sergei,

我为我迟到的回复道歉。我在内部与团队有反馈,并将很快解决。一旦修复被释放,我会在这个论坛线程中通知您。

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

Thanks, PM_Dialog

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入:2020-06-25 00:28
Thank you. I am looking

Thank you. I am looking forward for the issues to be resolved.

PM_Dialog
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei Bezroukov,

Hi Sergei Bezroukov,

The new Codeless SW version 6.380.12.6 has been released online. It is now available for download from the CodeLess portal:

https://www.dialog-seminile.com/produ亚博电竞菠菜cts/smartbond-codeless-commands.

Thanks, PM_Dialog

Sergei Bezroukov
离线
Last seen:6 months 4 weeks ago
加入: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
离线
Last seen:3 days 2 hours ago
职员
加入:2018-02-08 11:03
Hi Sergei,

Hi Sergei,

感谢您接受我的回答,很高兴新的无附件修复解决了这个问题。关于I2C问题,我会回复您的其他论坛主题..

Thanks, PM_Dialog