hi I have some questions for KW24 SMAC send API
In PhyPlmeData.c API PhyPdDataRequest
1: phyPacket_t frameLength, Dose this frameLength include FCS ?
2: phyPacket_t data, Should data[0] be frameLength which will be written to KW24 PB buffer ? Just as below description:
for MC1324xDrv_PB_SPIBurstWrite in PhyPdDataRequest, the Written length should be frameLength ? or frameLength + 1 <include the first byte -> "frame length">
3: For Freescale Test Tool which is running on PC
Dose RAW frame captured by USB dongle include two FCS bytes ?
Thanks!
Hello Haidong,
To send data over the air using SMAC you should MCPSDataRequest() instead, which automatically calls PhyPdDataRequest() and takes care of the rest of size calculations and other bytes added. Before such call, the MCPSDataRequest uses SmacFormatTxPacket(psTxPacket) to format the packet and add the FCS bytes to the frame length as bellow:
packetToPhy->frameLength += 2; //Add 2 for FCS
Therefore, the frameLength parameter in PhyPdDataRequest already includes the FCS. I would recommend you to use the MCPS API to send data since it is how the SMAC expects. Moreover, the raw data in protocol analyzer should show the MAC integrity code, which would be the FCS.
Regards,
AngelC
hi AngeIC:
Some one try to integrate KW24D5 and Contiki, this require directly using PHY layer code not SMAC.
Hello Haidong,
Based in the MCPSDataRequest(), the frameLength in phyPacket_t includes the FCS bytes but not the frameLength byte itself. Therefore, you should write the frame length and then the corresponding length of bytes including FCS.
Regards,
AngelC
gogoer can you let me know the customer name related with this case?