Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sim70x0] Clean up socket receive #6

Open
tpecar-ltek opened this issue Jan 10, 2023 · 1 comment
Open

[sim70x0] Clean up socket receive #6

tpecar-ltek opened this issue Jan 10, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@tpecar-ltek
Copy link

If I understand the AWS stack correctly, the higher-level libraries (eg. coreMQTT, or the underlying TLS / SSL encryption layers) interface to sockets via the TCP_Sockets interface, which is provided by wrappers to the actual implementation, which can either be

  • the FreeRTOS TCP (providing TCP/IP stack on MCU) or
  • the FreeRTOS Cellular Interface (reusing the TCP/IP stack on modem)

Current implementations are available here

The FreeRTOS Cellular TCP_Sockets wrapper provides modem-agnostic blocking receive (handled via event groups and data ready callbacks), thereby allowing the modem implementation only needing to support the non-blocking receive (possibly returning less than the requested number of bytes). The Cellular_SocketRecv() API seems to imply such operation. Some ports (eg. BG96) follow this.

The current sim70x0 implementation has implemented a blocking receive via pSimContext->pdnEvent event group, which is then manipulated in the URC handler and various parser functions.

This can probably be removed without effect on the higher layers, simplifying the port.

@chinglee-iot
Copy link
Member

@tpecar-ltek
Sorry for late reply. This port is contributed by community. Are you able to create a PR to update the implementation?

@chinglee-iot chinglee-iot added the help wanted Extra attention is needed label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants