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.

CCS: Xbee header file (xbee.h) for MSP430f5529

Tool/software: Code Composer Studio

Hii.. I'm Currently working on a project designed it for a industrial purposes. But i have some issue with xbee normal mode. so i planned to change it to the api mode..

if anyone have the header file for the xbee.. tell me it will be useful for my project

  • Hi Birla,

    I'm not aware of any xbee header files for MSP430 but a quick search of the E2E forum uncovered the following two links that I think you may be interested in. Can you take a look at them and let me know if they help you out?

    e2e.ti.com/.../84063
    www.add.ece.ufl.edu/.../Interfacing_XBEE_K_Hale.pdf

    Best regards,
    Caleb Overbay
  • Thank you responding me... Actually problem is sending the data from the client to server using api mode. and i already interfaced with transparant mode. Thats the solution to receive the data from server to client..  

    but interface using api mode is now giving me a problem

  • Hi Birla,

    I tried searching for other projects using an MSP430 with xbee but there isn't much out there. If you could provide more specifics about what is going wrong, I could try guiding you through the debug effort.

    Best regards,
    Caleb Overbay
  • Actually I solved this issue. Have any changes or suggestion in this code tell me please... codes are below

    unsigned char gbee_api(volatile char *ptr)
    {
    gbee_format format;
    unsigned int m=0;
    unsigned char i=0;
    unsigned char j=0;
    //13unsigned char l=0;
    unsigned char z=0;
    unsigned int length =0;
    length =0x0E + t_l;

    format.delimiter = 0x7e;
    api_frame[z] = format.delimiter; // Start byte for the format (delimiter)
    z++;
    format.length[0] = length & 0xFF00;
    api_frame[z] = format.length[0]; // MSB byte of the length(length of the format data
    z++;

    format.length[1] = length & 0x00FF;
    api_frame[z] = format.length[1]; // LSB byte of the length
    z++;

    format.frame_type = 0x10;
    api_frame[z] = format.frame_type; // type of the frame
    z++;

    format.frame_id = 0x01;
    api_frame[z] = format.frame_id; // ID for the frame
    z++;

    format.dest_addr64[0]= (mac_address >> (8*7)) & 0xff; // mac address of the destination 64 bit
    format.dest_addr64[1] = (mac_address >> (8*6)) & 0xff;
    format.dest_addr64[2] = (mac_address >> (8*5)) & 0xff;
    format.dest_addr64[3] = (mac_address >> (8*4)) & 0xff;
    format.dest_addr64[4] = (mac_address >> (8*3)) & 0xff;
    format.dest_addr64[5] = (mac_address >> (8*2)) & 0xff;
    format.dest_addr64[6] = (mac_address >> (8*1)) & 0xff;
    format.dest_addr64[7] = (mac_address >> (8*0)) & 0xff;
    for( i=0; i<8;i++)
    {
    m += format.dest_addr64[i];
    api_frame[z] = format.dest_addr64[i]; // TX -> data
    z++;

    }
    format.dest_addr16[0] = 0xFF; // destination address 16 bit
    format.dest_addr16[1] = 0xFE;
    for(j=0; j<2;j++)
    {
    m +=format.dest_addr16[j];
    api_frame[z] = format.dest_addr16[j]; // TX -> data
    z++;

    }
    format.brod_rad = 0x00; //
    api_frame[z] = format.brod_rad; // TX -> data
    z++;

    format.option = 0x00;
    api_frame[z] =format.option; // TX -> data
    z++;

    //strcpy(*j->rf_data, ptr);
    volatile unsigned int k;
    for (k=0; k<=(t_l-1); k++)
    {
    format.rf_data[k] = ptr[k];
    m += format.rf_data[k];
    api_frame[z] = format.rf_data[k]; // TX -> data
    z++;

    // format.length++;
    }
    //format.rf_data[t_l]='\0';


    m=m+format.frame_id + format.frame_type + format.brod_rad + format.option;


    m = 0xFF & m;
    format.cheksum = 0xFF - m;
    api_frame[z] = format.cheksum; // TX -> data
    z++;
    for(i=0;i<z;i++)
    {
    char data;
    data=api_frame[i];
    while (!(UCA0IFG&UCTXIFG));
    UCA0TXBUF = data; // TX -> data
    }


    return 0;

    }

  • Hi Birla,

    I'm glad to hear you were able to solve the issue. I'm not familiar with xbee and it's protocol so I can't guarantee the correctness of your code but thank your for posting it so others may benefit. Could you describe what the issue was and what you changed to fix it as well?

    Best regards,
    Caleb Overbay

**Attention** This is a public forum