⚠️
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命令。而且,它没有与之连接的从属设备。我使用的唯一模块引脚是p0u5和p0u6,用于将其连接到外部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/assertion),因此共享嗅探器日志以了解空中发生的事情将非常有用。

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,

在附加的日志中,断开连接的原因是连接超时。根据Bluetooth LL核心规范,连接超时错误代码表示给定连接的链路监督超时已过期。监视超时在user\u connection\u param\u 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闪存引导?

说实话,我有点困惑。您能否用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,

我再次在调试器中运行它,屏幕截图附在后面。代码不会卡在任何地方,它只是重置模块,main()函数重新开始。您将在屏幕截图上看到它,该截图显示调试器在断开连接后停止的位置。所以,这个模块已经准备好建立一个新的模块了,如果我继续运行它,它就可以工作了。但新的连接也会在3分钟后断开。同样,在建立连接之后,我不与模块通信—只是让它处于空闲状态。在我看来,这就像看门狗的行为。

我不使用任何(外部)闪存,只是一个裸模块连接到CP2104 USB转换器,看到附加的图像,不知道如何引导设备内部。我刚刚编译了无代码软件(v6.380.10.4)映像,用于无代码\u 531 \u set \u two \u standalone,没有任何更改,并通过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
嗨,谢尔盖,

嗨,谢尔盖,

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

你能用另一部运行SmartConsole应用程序的手机复制这个问题吗?你只试过三星Galaxy S8吗?

Thanks, PM_Dialog

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

亲爱的对话小组!我已经提供了以上两个BLE捕获收集不同的捕获软件和硬件。其中一个由Cypress CySmart工具及其软件狗CY5677采集,另一个由Silicon Labs网络分析仪采集。附件是北欧半导体公司BLE-dongle PCA10031及其Sniffer 3.0软件(与Wireshark(v3.2.5)协同工作)收集的另一个最详细的捕获。附带的捕获涉及两个设备(运行SmartConsole的Galaxy S8手机和带有MAC 48:23:35:00:07:AA的DA14531模块),可以用Wireshark打开。在每一种情况下,在建立连接之后,我都让连接处于空闲状态。这些是我所有的嗅探工具。

I have 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.

我使用的预编译图像是由Dialog SmartBond Flash程序员提供的。我要求你上面给我的图像,你正在使用的测试。请做吧。另外,请在你的硬件上尝试我的附加十六进制。

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
Thank you. 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