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

Setty, Narendra 1 Reputation point
2020-09-14T16:21:24.953+00:00

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
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2020-11-03T16:30:42.827+00:00

    @Setty, Narendra ,

    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 :)