# Cellular Interface - Handling AT+QFREAD Responses and Binary Data in FreeRTOS Cellular Interface for BG96 Modem

**URL:** <https://forums.freertos.org/t/cellular-interface-handling-at-qfread-responses-and-binary-data-in-freertos-cellular-interface-for-bg96-modem/21877>\
**Category:** Libraries\
**Created:** [November 15, 2024, 9:14am UTC](https://forums.freertos.org/t/cellular-interface-handling-at-qfread-responses-and-binary-data-in-freertos-cellular-interface-for-bg96-modem/21877 "2024-11-15T09:14:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [November 16, 2024, 9:02am UTC](https://forums.freertos.org/t/cellular-interface-handling-at-qfread-responses-and-binary-data-in-freertos-cellular-interface-for-bg96-modem/21877/2 "2024-11-16T09:02:33Z")

</div>

@panicjp

Have you tried using the [`_Cellular_TimeoutAtcmdDataRecvRequestWithCallback`](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/source/include/common/cellular_common.h#L557) API?

You can see the example usage of that API in the implementation of `Cellular_SocketRecv` API for BG96: [FreeRTOS-Cellular-Interface/modules/bg96/cellular\_bg96\_api.c at e173977bc8548d8720b3adda566a609910cd8bcf · FreeRTOS/FreeRTOS-Cellular-Interface · GitHub](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/e173977bc8548d8720b3adda566a609910cd8bcf/modules/bg96/cellular_bg96_api.c#L2506)

The `pktDataPrefixCallback` callback function is required to indicate the data start address and data length, along with returning `CELLULAR_PKT_STATUS_SIZE_MISMATCH` until required raw data bytes are received.

You can refer a similar thread [here](https://forums.freertos.org/t/cellular-library-need-help-implementing-raw-binary-recv-data/17304) for more data.

---

_[View the full topic](https://forums.freertos.org/t/cellular-interface-handling-at-qfread-responses-and-binary-data-in-freertos-cellular-interface-for-bg96-modem/21877)._
