question

SettyNarendra-1546 avatar image
0 Votes"
SettyNarendra-1546 asked teripklefsil-3500 edited

Interfacing CAT-M modem to azure-iot-sdk-C

Hi,

Greetings! We have a Gateway with yocto linux and CAT-M modem to connect to IoT hub. Running azure-iot-sdk-c to establish connection with IoTHub and push data. It appears connection is establish and sdk accepts data to send. However, it is unable to delivery the data, I get the following error.

Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:saslclientio_send Line:1133 send called while not open
Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/connection.c Func:on_bytes_encoded Line:241 Cannot send encoded bytes
Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:saslclientio_close Line:1083 saslclientio_close called while not open
Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/connection.c Func:on_bytes_encoded Line:245 xio_close failed
Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:saslclientio_close Line:1083 saslclientio_close called while not open
Sep 11 16:03:33 imx6ul-var-dart AzureLink[744]: Error: Time:Fri Sep 11 16:03:33 2020 File:/usr/src/debug/azure-iot-sdk-c/1.1.19-r0/azure-iot-sdk-c/uamqp/src/connection.c Func:connection_close Line:1339 xio_close failed

Interestingly, if I replace the CAT-M modem with a CAT-1 modem. Same code, same unit and same everything, data gets through and no errors.

Difference: CAT-M uses cdc-wdm (MSM) interface and CAT1 uses ttyACMx (PPP) interface.

Could you help resolving the issue? Why interfacing with CAT-M modem gives above error?

Regards
Narendra Setty

azure-iot-sdk
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SettyNarendra-1546 Welcome to Q&A forum!
Are you following any documentation for the steps? I see that you have also created an issue under Azure/azure-iot-sdk-c repo

If possible can you share the piece of code which you are trying without any PII details?

0 Votes 0 ·

Hi Ashok,

Thanks for the response! I create an issue under github for better reach. We are using azure-iot-sdk-c from the github, not sure what piece of code you are expecting. Our application is built on top of Azure-iot-sdk-c, there is not a significant addition. I believe, we leverage features of azure-iot-sdk-c to do most of the heavy lifting. Those errors are from azure-iot-sdk-c.

Regards
Narendra Setty

0 Votes 0 ·

Thanks for the additional information and clarity. Kindly check the response provided on the GitHub issue and continue the discussion there to avoid duplicate efforts. Feel free to respond here as well if you have any other queries and do not get any response on your issue.

25530-image.png


0 Votes 0 ·
image.png (13.6 KiB)

Hello @SettyNarendra-1546,

We kindly request that you follow-up on the related thread:

https://github.com/Azure/azure-iot-sdk-c/issues/1654

Last update from you: "Thanks! I will try to see if we can obtain modem logs. I will work on capture a network trace with wireshark and share it with you."

Thank you!

0 Votes 0 ·

1 Answer

asergaz avatar image
0 Votes"
asergaz answered asergaz commented

@SettyNarendra-1546 ,

From our discussion in the github repo. You have found the resolution to the issue:

"There was an issue with MTU. Apparently, recommended MTU for CAT-M is 1420, changing the value fixed the problem. It is not an issue with C SDK."

Please mark this as the answer! Thanks :)

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @SettyNarendra-1546 ,

Requesting that you please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

Thank you so much!

0 Votes 0 ·