Hi ,
like i was discussing in this thread http://e2e.ti.com/support/low_power_rf/f/158/p/17310/169314.aspx#169314
i am having problem to send menssage from coordinator to end device (or router) or like i realised, the probel is to receive message from the coordinator.
using the packet sniffer and the Daintree Network Analiser, i realised that i am sending the message correct (from 0x000 to broadcast), but it seems that i am not receiving it.
I' m using the genericapp in this testing.
Im using the MessageMSGCB function, but it not working.
void GenericApp_MessageMSGCB( afIncomingMSGPacket_t *pkt )
{
HalLcdWriteScreen( (char*)pkt->cmd.Data, "msg received" );
switch ( pkt->clusterId )
{
case GENERICAPP_CLUSTERID:
// "the" message
#if defined( LCD_SUPPORTED )
HalLcdWriteScreen( (char*)pkt->cmd.Data, "rcvd" );
#elif defined( WIN32 )
WPRINTSTR( pkt->cmd.Data );
#endif
break;
}
}
Do i need to use another interrupt, and not AF_INCOMING_MSG_CMD?
case AF_INCOMING_MSG_CMD:
GenericApp_MessageMSGCB( MSGpkt );
break;
Or i need to send different from coordinator?
void GenericApp_SendTheMessage( void )
{
char theMessageData[] = "Chikibumparatapau Giria de Pirata";
GenericApp_DstAddr.addrMode = AddrBroadcast;
GenericApp_DstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
if ( AF_DataRequest( &GenericApp_DstAddr, &GenericApp_epDesc,
GENERICAPP_CLUSTERID,
(byte)osal_strlen( theMessageData ) + 1,
(byte *)&theMessageData,
&GenericApp_TransID,
AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
{
osal_set_event(GenericApp_TransID, GENERICAPP_SEND_MSG_EVT);
HalLcdWriteScreen( "WOOOOOW", "hehehhehe" );
// Successfully requested to be sent.
}
else
{
HalLcdWriteScreen( "WOOOOOW", "ti peguei" );
// Error occurred in request to send.
}
}
Thanks for your attention