about KW24 SMAC send API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

about KW24 SMAC send API

1,647 Views
haidong_zheng
NXP Employee
NXP Employee

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">

pastedImage_1.png

3: For Freescale Test Tool which is running on PC

   Dose RAW frame captured by USB dongle include two FCS bytes ?

Thanks!

Labels (1)
0 Kudos
Reply
4 Replies

1,447 Views
AngelC
Senior Contributor I

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

1,447 Views
haidong_zheng
NXP Employee
NXP Employee

hi AngeIC:

Some one try to integrate KW24D5 and Contiki, this require directly using PHY layer code not SMAC.

1,447 Views
AngelC
Senior Contributor I

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

0 Kudos
Reply

1,447 Views
karina_valencia
NXP Apps Support
NXP Apps Support

gogoer​ can you let me know the customer name related with this case?

0 Kudos
Reply