JN5169 transmit data

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
784件の閲覧回数
LUIPS
Contributor I

Hi All:

i am learning to use JN5169 in IEEE 802.15.4 to develop a project.

My project is based on JN-AN-1174. I have already realized the data transmission from EndDevice to Coordinator,but now i am failed to transmit data form Coordinator to EndDevice.Although the template offer the function of data transmission,it doesn't tell me how and where to call the function.

so i need you help to tell me how to correctly realize the data transmission between EndDevice and Coordinator

Thanks.

タグ(2)
0 件の賞賛
返信
1 解決策
741件の閲覧回数
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

You can refer to IEEE 802.15.4 Stack User Guide (section 4.2 and 4.3) to check how a typical set-up and operation is used for these nodes.

And also, you can refer to the Application Note 802.15.4 Home Sensor Demonstration for JN516x (JN-AN-1180).

 

Regards,

Ricardo

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
761件の閲覧回数
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

If you already have a transmission from ED to Coordinator, it should be added in a very similar way from Coordinator to ED. Are you having some problem while calling the function?

 

Also, we highly recommend moving to the JN5189 Wireless MCU for Zigbee® and Thread, as is our focus part for ZigBee/Thread. It is supported by our MCUXpresso IDE and MCUXpresso SDK. There are several SDK examples, like driver examples (GPIO, UART, SPI, I2C), RTOS examples, and Wireless examples (ZigBee and Thread).

 

Regards,

Ricardo

0 件の賞賛
返信
757件の閲覧回数
LUIPS
Contributor I

Thanks for your reply,I've write the transmission function like this:

PRIVATE void vTXDataPacket( uint8 u8Len, uint16 u16DestAdr)
{
MAC_McpsReqRsp_s sMcpsReqRsp;
MAC_McpsSyncCfm_s sMcpsSyncCfm;
uint8 *pu8Payload, i = 0;

/* Create frame transmission request */
sMcpsReqRsp.u8Type = MAC_MCPS_REQ_DATA;
sMcpsReqRsp.u8ParamLength = sizeof(MAC_McpsReqData_s);
/* Set handle so we can match confirmation to request */
sMcpsReqRsp.uParam.sReqData.u8Handle = 1;
/* Use short address for source */
sMcpsReqRsp.uParam.sReqData.sFrame.sSrcAddr.u8AddrMode = 2;
sMcpsReqRsp.uParam.sReqData.sFrame.sSrcAddr.u16PanId = PAN_ID;
sMcpsReqRsp.uParam.sReqData.sFrame.sSrcAddr.uAddr.u16Short = COORDINATOR_ADR;
/* Use short address for destination */
sMcpsReqRsp.uParam.sReqData.sFrame.sDstAddr.u8AddrMode = 2;
sMcpsReqRsp.uParam.sReqData.sFrame.sDstAddr.u16PanId = PAN_ID;
sMcpsReqRsp.uParam.sReqData.sFrame.sDstAddr.uAddr.u16Short = u16DestAdr;
/* Frame requires ack but not security, indirect transmit or GTS */
sMcpsReqRsp.uParam.sReqData.sFrame.u8TxOptions = MAC_TX_OPTION_ACK;

pu8Payload = sMcpsReqRsp.uParam.sReqData.sFrame.au8Sdu;

pu8Payload[0] = sCoordinatorData.u8TxPacketSeqNb++;

for (i = 1; i < (u8Len + 1); i++)
{
//pu8Payload[i] = *pu8Data++;
pu8Payload[i] = 0x00;
}

/* Set frame length */
sMcpsReqRsp.uParam.sReqData.sFrame.u8SduLength = i;

/* Request transmit */
vAppApiMcpsRequest(&sMcpsReqRsp, &sMcpsSyncCfm);
vPutStrs((uint8*)"Request transmit\n");
}

Now,i am confused with where to call the function, vProcessIncomingMlme(MAC_MlmeDcfmInd_s *psMlmeInd),or PRIVATE void vProcessIncomingMcps(MAC_McpsDcfmInd_s *psMcpsInd).

I've tried to print whether the transmission is successful on the serial port.When i transmit the data from  ED to Coordinator ,it shows the "Data transmission successful",but when i tried to transmit data from Coordinator ,it always shows  "Data transmission failed".

PRIVATE void vHandleMcpsDataDcfm(MAC_McpsDcfmInd_s *psMcpsInd)
{

if (psMcpsInd->uParam.sDcfmData.u8Status == MAC_ENUM_SUCCESS)
{
vPutStrs((uint8*)"Data transmission successful \n");
}
else
{
vPutStrs((uint8*)"Data transmission failed\n");
}
}

0 件の賞賛
返信
742件の閲覧回数
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

You can refer to IEEE 802.15.4 Stack User Guide (section 4.2 and 4.3) to check how a typical set-up and operation is used for these nodes.

And also, you can refer to the Application Note 802.15.4 Home Sensor Demonstration for JN516x (JN-AN-1180).

 

Regards,

Ricardo

0 件の賞賛
返信