Hi there,
我通过使用无附加固件映像Defeless_531_Standalone_set_two.hex,通过在CP2104上通过2线UART和USB / UART转换器连接到计算机的一对DA14531微小模块。在UM-B-140的3.3节中建立它们之间的连接工作。但是Probelm是模块在大约3分钟后下降连接。是否可以修复它,以便连接将无限期保持活跃?
另外两个预编译(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.
Device:
嗨Sergei Bezroukov,
谢谢你的问题。
>>>但Probelm是模块在大约3分钟后下降连接。
您能否提供更多细节?连接下降?您是否在命令中发送任何特定的?你能在调试模式下运行它吗?
>>> I2C支持
您是否意味着有一个连接到TINE模块的I2C接口,您的要求是读取和发送I2C数据?
I would recommend running the project in debug mode and check if it gets stuck into an assertion NMI etc.
谢谢,PM_DIALOG.
谢谢你的提示response!
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.
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.
嗨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.
Would it be possible to use a BLE sniffer tool and share an sniffer capture?
您有定制板,或者您正在使用任何或dks?此外,如果使用睡眠模式,则应使用4个UART信号(URX / UTX / RTS / CTS)。
谢谢,PM_DIALOG.
干得好。附加的存档有我的硬件照片(仅为DA14531模块和CP2104 USB-UART)以及BLE事件日志。日志显示,连接建立后3分钟(最后3条记录),531发出的连接超时。我不使用睡眠模式。
嗨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.
谢谢,PM_DIALOG.
是的,丢弃连接后,DA设备再次启动广告。您是对的:链接监督已过期,因为DA14531停止响应连接事件。
我通过使用Silicon Labs Simplicity Studio及其雷鸣簿感测2板作为刚刚连接到DA14531的中央,并在保持连接的同时无效,使用Silicon Labs Sense 2板。在附加的存档中,简单的Studio网络分析仪提供了两个图像。在这些图像上,设备90:FD:9F:7B:86:16是我的中央和DA:E4:D9:A6:F6:E9是DA14531。在名为connection_parameters的图像上,您可以看到DA14531请求设置连接延迟5和监控超时1250ms,由客户端接受(请参阅事件详细窗口)。然后在图像log2上,您可以根据连接延迟,通过不响应串联的5个连接间隔,根据连接延迟,验证DA14531。但是在这一情况下,在138年代之后,它是一个较长的系列没有响应的数据包,导致中央的超级性超时。我也看到了这个原因(错误0x208)在第3图像上的Central设备中的Tera-术语输出上。
从这些日志,它遵循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.
好的,对话框,我决定通过在文件user_codeless.c中添加user_on_disconnect.c函数中的几个断点来遵循您的建议。事实证明,在连接删除后,您提供的代码不会进入此功能。进一步的调查显示,模块在丢弃连接后重置自身,如果一个在main()中添加断点,则代码停止在那里。所以,我相信您需要为软件开发组创建一次票证。如果你想让我这样做,请给我说明。
嗨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?
在我侧面,我无法复制它,无附庸无附庸。
谢谢,PM_DIALOG.
我再次在调试器中运行它,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.
通过使用Android(三星Galaxy S8)作为客户端的SmartConsole应用程序来观察到相同的连接下降行为。有什么想法还有什么检查?
稍后添加(重要):I just noticed that if I issue the ATI command to the module running under debugger, the response is无附带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 becomes无附带DA14531 V_6.380.9.10(??!!!) Maybe this is the reason for the misbehavior?
OK, these days I learned that 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.4无论你如何启动它(我的意思是在Keil的调试会话中,也与Jlink调试器断开连接)。因此,在中概述的固件图像之间的不匹配Added later我上面的帖子的一部分得到解决。但是,该模块仍在3分钟后丢弃连接。我是唯一一个经历的人吗?
Dialog team: if the connection is not dropping for you, could you please send me the HEX image forcodeless_531_set_two_standalone.hexthat works fine for you?
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?
谢谢,PM_DIALOG.
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.
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.
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.
Hi Sergei,
我对混乱道歉 - 刚看到附加的嗅探器日志。最后,我可以用Dodeless_531_Standalone_set_two.hex复制它并使用Flash程序员工具。让我在内部将其升级到团队中,我会尽快回复你。
谢谢,PM_DIALOG.
Hi Sergei,
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.
任何其他评论/反馈撤销无附庸不仅仅是欢迎!
谢谢,PM_DIALOG.
谢谢你。我在看forward for the issues to be resolved.
嗨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:
//www.xmece.com/products/smartbond-codeless-commands
谢谢,PM_DIALOG.
谢谢,对话团队。解决此问题已得到解决。等待解决I2C问题......
Hi Sergei,
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..
谢谢,PM_DIALOG.