This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

problem with broadcasting messages using simpliciti

Other Parts Discussed in Thread: MSP430F2274

hi,

i am trying to create a wireless chat program between multiple computers using the ez430-rf2500. i am not able to understand why the broadcast messages is not being recieved..this is my code:

#include <string.h>
#include "bsp.h"
#include "mrfi.h"
#include "bsp_leds.h"
#include "bsp_buttons.h"
#include "nwk_types.h"
#include "nwk_api.h"
#include "nwk_frame.h"
#include "nwk.h"
#include "virtual_com_cmds.h"
#include "msp430f2274.h"

uint8_t index_output = 0;

int main( void )
{
uint8_t msg[MAX_APP_PAYLOAD], len,i;
P3SEL |= 0x30; // P3.4,5 = USCI_A0 TXD/RXD
UCA0CTL1 = UCSSEL_2; // SMCLK
UCA0BR0 = 0x41; // 9600 from 8Mhz
UCA0BR1 = 0x3;
UCA0MCTL = UCBRS_2;
UCA0CTL1 &= ~UCSWRST; // Initialize USCI state machine
IE2 |= UCA0RXIE;
BSP_Init();
SMPL_Init(0);
TXString( "\r\nInitializing Network....", 26 );

TXString( "Done\r\n", 6);

index_output=0;
SMPL_Ioctl(IOCTL_OBJ_RADIO,IOCTL_ACT_RADIO_AWAKE,NULL);
SMPL_Ioctl(IOCTL_OBJ_RADIO,IOCTL_ACT_RADIO_RXON,NULL);
while(1)
{
if (SMPL_SUCCESS == SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len))
{
TXString((char*)msg,len);
P1OUT ^= 0x03;

}
if (SMPL_TX_CCA_FAIL == SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len))
{

P1OUT ^= 0x03;

}
if (SMPL_NO_FRAME == SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len))
{

P1OUT ^= 0x02;

}

}
}

#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
{
uint8_t msg[20];
char rx = UCA0RXBUF;
uint8_t i;
msg[index_output]=rx;
index_output++;
if (rx=='\r' || index_output==20)
{
if(SMPL_SUCCESS==SMPL_Send(SMPL_LINKID_USER_UUD,msg,sizeof(msg)))
{
index_output=0;
P1OUT ^= 0x01;
}
else
{
P1OUT = 0x02;}}
TXString(&rx, 1);
}
void TXString( char* string, int length )
{
int pointer;
for( pointer = 0; pointer < length; pointer++)
{
volatile int i;
UCA0TXBUF = string[pointer];
while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
}
}

the broadcast messages are not being recieved...