MarcB,
The Mcps-data.request has changed a bit. the msdu shall first be set up at as a pointer, before you start putting in data.
Please look at the new MyWirelessApp OR in the MACPHY reference manual.
Here is a small example:
void SendMyName(void) {
uint8_t Mads[] = "Mads";
nwkToMcpsMessage_t *pMsg;
pMsg = MSG_Alloc(sizeof(nwkToMcpsMessage_t) + sizeof(Mads));
if (pMsg == NULL)
return;
pMsg->msgType = gMcpsDataReq_c;
/* initialize pointer to Msdu */
pMsg->msgData.dataReq.pMsdu = (uint8_t*)(&(pMsg->msgData.dataReq.pMsdu)) + sizeof(uint8_t*);
FLib_MemCpy(pMsg->msgData.dataReq.pMsdu, Mads, sizeof(Mads));
FLib_MemCpy(pMsg->msgData.dataReq.dstAddr, mCoordInfo.coordAddress, 8);
FLib_MemCpy(pMsg->msgData.dataReq.srcAddr, maMyAddress, 8);
FLib_MemCpy(pMsg->msgData.dataReq.dstPanId, mCoordInfo.coordPanId, 2);
FLib_MemCpy(pMsg->msgData.dataReq.srcPanId, mCoordInfo.coordPanId, 2);
pMsg->msgData.dataReq.dstAddrMode = mCoordInfo.coordAddrMode;
pMsg->msgData.dataReq.srcAddrMode = mAddrMode;
pMsg->msgData.dataReq.msduLength = sizeof(Mads);
pMsg->msgData.dataReq.txOptions = gTxOptsAck_c;
pMsg->msgData.dataReq.msduHandle = mMsduHandle++;
/* Send the Data Request to the MCPS */
(void)MSG_Send(NWK_MCPS, pMsg);
}
BR,
Mads