SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Receiving raw socket data is done by calling sl_Recv after successfully opening the transceiver socket. The API return value is the number of bytes received, or a negative value in case of an error. Each receive packet has an 8-byte proprietary header which includes the following parameters:
If the packet is longer than the receive buffer, the remainder of the packet is discarded. The maximum packet size which can be received is 1544 (1536 bytes of data and 8 bytes of proprietary header).
Example:
_i16 NumOfByets;
signed char buf [1000];
_i16 Soc;
_i16 channel = 6;
_i16 len = 1000;
Soc = sl_Socket(SL_AF_RF ,SL_SOCK_RAW, channel);
NumOfByets = sl_Recv(Soc, buf,500,0);