Hi there,
我正在试验一对DA14531微型模块,通过CP2104上的2线UART和USB/UART转换器,使用无代码固件映像无代码\U 531 \U独立\U集连接到计算机_二.六角. 如UM-B-140第3.3节所述,在它们之间建立连接。但问题是模块在大约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:
你好,谢尔盖·贝佐鲁科夫,
谢谢你的问题。
>>>但问题是模块在大约3分钟后就会断开连接。
你能提供更多的细节吗?当连接中断时?你有什么特别的命令吗?你能在调试模式下运行它吗?
>>>I2C支持
您的意思是有一个I2C接口连接到TINE模块,您的要求是读取和传输I2C数据?
I would recommend running the project in debug mode and check if it gets stuck into an assertion NMI etc.
谢谢,下午好
谢谢你的提示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.
你好,谢尔盖·贝佐鲁科夫,
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?
您有定制的线路板吗,或者您正在使用任何一种或DK?另外,如果您使用的是睡眠模式,那么您应该使用4个UART信号(URX/UTX/RTS/CTS)。
谢谢,下午好
干得好。附带的档案有我的硬件照片(只有DA14531模块和CP2104 USB-UART)和BLE事件日志。日志显示531在连接建立3分钟后发出连接超时(最后3条记录)。我不使用睡眠模式。
你好,谢尔盖·贝佐鲁科夫,
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.
谢谢,下午好
是的,在断开连接后,DA设备再次开始播发。你说得对:链接监督过期,因为DA14531停止响应连接事件。
我使用Silicon Labs Simplity Studio和Thunderboard Sense 2板创建了一个特殊的应用程序,它只连接到DA14531,之后什么也不做,同时保持连接的活动状态。在所附的归档文件中,有两个由Simplicity Studio Network Analyzer提供的图像。在这些图像上,设备90:FD:9F:7B:86:16是我的中心,DA:E4:D9:A6:F6:E9是DA14531。在名为Connection\u parameters的映像上,您可以看到DA14531请求设置连接延迟5和监视超时1250ms,这已被客户端接受(请参阅事件详细信息窗口)。然后在映像Log2上,您可以看到DA14531根据连接延迟工作,不响应5个连续的consequentive连接间隔。但在138秒之后,在这种情况下,是一个较长的未响应数据包序列导致了中心的Supervision超时。我在第三张图片上的中央设备的Tera Term输出中也看到了这个原因(错误0x208)。
从这些日志,它遵循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.
好的,Dialog,我决定按照你的建议,在user\u codeless.c文件中的user\u on\u disconnect()函数中添加几个断点。结果表明,在断开连接后,你提供的代码不会进入这个函数。进一步的研究表明,模块在断开连接后会自行重置,如果在main()中添加断点,代码将停止。所以,我认为您需要为您的软件开发组创建一个票证。如果你要我做这件事,请给我指示。
你好,谢尔盖·贝佐鲁科夫,
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?
在我这边,我无法复制它,无代码的工作非常完美。
谢谢,下午好
我又在调试器里运行了一遍,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上的SmartConsole应用程序(Samsung Galaxy S8)作为客户端,也可以观察到相同的连接断开行为。知道还有什么要查的吗?
稍后添加(重要):I just noticed that if I issue the ATI command to the module running under debugger, the response is无代码DA14531 v泷U 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伏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?
谢谢,下午好
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,
很抱歉给你带来了混乱-我刚刚看到了附带的嗅探器日志。最后我可以用无代码的\u531\u独立\u集复制它_二.六角使用Flash编程工具。让我把它上报给团队内部,我会尽快回复你的。
谢谢,下午好
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.
任何其他的评论/反馈都非常欢迎!
谢谢,下午好
非常感谢。我在找forward for the issues to be resolved.
你好,谢尔盖·贝佐鲁科夫,
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
谢谢,下午好
谢谢你,对话小组。这个问题解决了。正在等待解决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..
谢谢,下午好