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

Add BG96 support direct push socket #10

Merged
merged 6 commits into from
Sep 11, 2023

Conversation

chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Apr 9, 2023

Add BG96 support direct push socket.

This commit provides an example of input buffer callback in this PR FreeRTOS/FreeRTOS-Cellular-Interface#137.

Socket data is returned in the URC with direct access mode. To support this feature, the port make use of the input buffer callback to handle the binary data in URC.
In the following example, the socket data "test" will be stored in the buffer in module context. User of this port can retrieve the data with Cellular_SocketRecv later.

+QIURC: "recv",0,4
test

Compare to buffer access mode, the port will allocate an extra buffer per socket to store the socket data. This useful if developers want to configure the buffer size in MCU instead of relying on the buffer size in modem.

Description

  • This mode doesn't make use of the buffer in cellular modem. The socket data received is directly pushed through URC code. Extra buffer for socket will be required if enabled. Default buffer size is 2048 and can be configured with CELLULAR_BG96_DIRECT_PUSH_SOCKET_BUFFER_SIZE.
  • Define CELLULAR_BG96_SUPPPORT_DIRECT_PUSH_SOCKET in cellular_config.h to enable this function. Default is disabled.

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* define CELLULAR_BG96_SUPPPORT_DIRECT_PUSH_SOCKET to enable this
  function.
@chinglee-iot chinglee-iot requested a review from ActoryOu May 26, 2023 10:05
@chinglee-iot chinglee-iot merged commit b8143e2 into FreeRTOS:main Sep 11, 2023
@chinglee-iot chinglee-iot deleted the dev-bg96-direct-push-socket branch September 11, 2023 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants