Skip to content

Cellular API: purpose of get_max_packet_size() #7181

@RobMeades

Description

@RobMeades

Description

The new cellular API, in its AT_CellularStack class, includes the method get_max_packet_size(). What is the purpose of this method? I ask because, in the u-blox modem implementation, the answer is different for UDP versus TCP:

  1. A UDP packet passed into the sendto() call by the user can be up to 1024 bytes in size, after which it will be broken into multiple UDP packets.
  2. TCP, as a streamed protocol, has no size limit that is visible to the user, hence the maximum packet size is arbitrary.

I realise that the current AT_CellularStack is UDP-only but it is our intention to submit our AT_CellularStack implementation shortly and that will support both UDP and TCP, hence the request for clarification. If the purpose of the get_max_packet_size() call is to tell the user the maximum size that a UDP packet can be without being fragmented then could the Doxygen comment be update to that effect? If it is something else, please clarify.

Issue request type

[x] Question
[ ] Enhancement
[ ] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions