Skip to content

Gemalto Cellular driver does not handle the situation correctly where a TCP connection has been closed by the remote peer #12074

@jporter4

Description

@jporter4

Description of defect

I have a working application that uses both UDP and TCP over WiFi. I am now porting it to run over cellular as an alternate network, specifically using a Gemalto EMS31-US modem. I got it to the point where it opened a TCP connection with the remote server and exchanged data successfully. But when the server closed the connection, my application continued trying to read from it and write to it. I spent some time in the debugger trying to figure out why. It appears that the function "GEMALTO_CINTERION_CellularStack::urc_sis" in "GEMALTO_CINTERION_CellularStack.cpp" was only written to support UDP. I base this conclusion on the comments within the function, and the fact that it ignores URC (unsolicited response code) 0, which is the URC received when the server closes the connection.

Target(s) affected by this defect ?

Any target with a Gemalto EMS31-US cellular modem attached. I haven't tried it with the Gemalto ELS61-US modem, but I'm sure it would fail as well.

Toolchain(s) (name and version) displaying this defect ?

I'm using IAR EWB for ARM 8.40. The issue should be observed regardless of which toolchain is used however.

What version of Mbed-os are you using (tag or sha) ?

5.14.1

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

IAR EWB for ARM 8.40.

How is this defect reproduced ?

Build for GEMALTO_CINTERION (edit "mbed-os\features\cellular\framework\targets\GEMALTO\CINTERION\mbed_lib.json", set "provide-default" value to true). The simple TCP client example "https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-sockets/docs/tip/main_8cpp_source.html" works nicely, with the following changes:

  1. Use Gemalto cellular rather than Ethernet.
  2. Add a loop in main so that multiple packets are sent to and received from the server, rather than just the single packet each in the example. When the server closes the connection, the application continues trying to send and receive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions