Closed dsilva-vd closed 2 years ago
I have to mention to comment out the following 2 lines in sample_config.h to match the code to my output log
#define DISABLE_MODULE_CLIENTS
#define DISABLE_MODULE1
Hi @dsilva-vd I used your sample and I was able to reproduce this issue, after debugging, I found the issue that you used the same metadata buffer for both connections, then I changed the code (see attachment) using different metadata buffer for different connection, the sample works. Could you try it on your side? sample_azure_iot_embedded_sdk_with_retry.zip
@bo-ms THank you for the help. That did solve it and I found a copy paste error in my telemetry client when publishing data for the module client also
Just to confirm you created a second iot stack variable but you never used it in the code. Just confirming I didn't miss anything, correct?
@dsilva-vd Good to know it works. I created a second stack and used it as below for a quick test.
Closing, @dsilva-vd feel free to reopen if you have any further issue.
I am encountering client disconnects when publishing telemetry and have 2 clients (1 device and 1 module) publishing telemetry data. I have increased Packet pool by ~25% (40 -> 48 packets) and increased NX_AZURE_IOT_TLS_PACKET_BUFFER_SIZE from 7kB to 10kB and the problem still persists.
My application:
NetxDUO v 6.1.7 STM32F429 host Cellular network connection - x-cube-cellular 7.0.0 sample_azure_iot_embedded _sdk_with_retry .c - edited to connect 1 module and 1 device client
The console out put is attached and also a snippet is provided below (Base is the device IoT client, VTL-1 is the module IoT client:
I have confirmed the following:
This testing points to a lack of memory allocation for some resource but I'm not sure which one to adjust. I reviewed the stack usage and didn't see anything out of the ordinary.
I have redacted the name of my iot hub but that can be provided by some other secure means for verification
Thanks 2 clients - frequent disconnects.txt IoT Client source.zip