We’re trying to port the FreeRTOS Cellular Interface to work with the nRF9160 which is operating in Serial LTE Modem.
The problem we are facing is a discrepancy of how the FreeRTOS Cellular Library expects the modem to work with Sockets, and the Serial LTE Modem implementation of the nRF.
Essentially on receiving a TCP message, the nRF will put the data on bus (UART in our case) without first prefixing an URC message:
<data>
#XTCPDATA: <size>
From what I understand, this mode corresponds the closest with CELLULAR_ACCESSMODE_TRANSPARENT, but for this we can’t find any implementation details.
The data the nRF will be sending will be binary data, and I’m struggling with figuring out how this will propagated to my cellalur_api_ layer so I can make it available on SocketRecv or notify some service…
The CELLULAR_ACCESSMODE_TRANSPARENT mode socket expects that all data received from the communication interface will be sent to the internet directly, and all data received from the internet will be output to the communication interface directly. This behavior may not align with the AT command functionality you expected.
Most of the reference ports make use of buffer access mode. It appears that the NRF91 also supports socket AT commands. The “#XRECV” example in the NRF91 SLM Socket AT command document is similar to those found in other reference modem ports.
AT#XRECV=10
#XRECV: 7
Test OK
OK
Is it possible to make use “#XRECV” to implement buffer access mode socket receive function in your modem port? Please take a look and feedback further question.