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.

How to exchange data from one ez430 chronos watch to other i.e. how to do communication between them ?

Other Parts Discussed in Thread: SIMPLICITI

Hi all,

I am trying to make 2 ez430 chronos watches share data on each othere or 1 as a receiver and the other one as a transmitter.........

I am new to simpliciTi.

anyone suggest me how i can achieve this ?

Thanks for Reading........

  • Hi Vinayak,

    The eZ430-Chronos Wiki page has software packages and multiple projects to help ramp development of your project: processors.wiki.ti.com/.../EZ430-Chronos

    Regards,
    Ryan
  • Thanks for your reply..... 

    I want to use two ez430 chronos watches such that they can communicate with other , can share data  with each other..

    till now i have went through so many projects out of which two projects matches my requiremets

    1. Safe baby

    2. Chronos bike

    here is the link below

    http://processors.wi...ncy_Differences

    in safe baby projects few main file are missing and i looking into chronos bike project in search of few bits to take my project further.

     

    is anyone can help me or anyone has tried it out ?

     

    Thanks for reading.

  • Vinayak,

    The link refers to the FAQ section for 433, 868 & 915 MHz frequency differences, I'm not quite sure how it applies. Do you have a question regarding the frequency bands?

    Most of the referenced projects were created by TI interns for a competition a few years ago and are not maintained by TI, therefore support for these projects is unlikely. You should be able to use any project that communicates with another device wirelessly (via a sub-GHz band) as a starting point and modify it such that communication between two EZ430-CHRONOS watches is possible.

    Regards,
    Ryan
  • Ryan,
    Thank you for your valuable reply....
    I using 433 MHz frequency and able to select it too in CCS.........

    But trying to understand how SimpliciTI protocol works in EZ430 Chronos ? How i can use it to form a communication between two chronos watches ? Trying to understand its API's too.............
    But unable to figure it out till.............
  • >But unable to figure it out till.............
    Try harder :) At least figure out what exactly you don't understand. If you understand nothing then unfortunately it will be very hard to help you somehow
  • Thanks for encouraging me...........about to make them talk to each other..............:-)
  • What I was trying to tell: you will get better _answers_ if you come with _questions_. Something like "tried this, got following results, have question about that", not abrupt statements like "nothing works, please help".
  • Hi Ilmars,
    Thanks you for your advise...........Ill definitely take care of this in the future.
  • Hi all,

    Here is the problem which I am facing currently....
    I am using SMPL_Link() API on 1 watch and SMPL_LinkListen() on other watch.
    if the response from both the functions are positive i.e. SMPL_SUCCESS further send and receive could be done......but it is not.

    my code is as follows......

    on listener side

    int main(void)
    {
    // Init MCU
    unsigned char *My_ID1;
    unsigned char Counter[5];
    My_ID1 = Counter;
    init_application();

    // Assign initial value to global variables
    init_global_variables();

    // Branch to welcome screen
    test_mode();
    BSP_InitBoard();

    #ifdef I_WANT_TO_CHANGE_DEFAULT_ROM_DEVICE_ADDRESS_PSEUDO_CODE
    {
    addr_t lAddr;

    createRandomAddress(&lAddr);
    SMPL_Ioctl(IOCTL_OBJ_ADDR, IOCTL_ACT_SET, &lAddr);
    }
    #endif /* I_WANT_TO_CHANGE_DEFAULT_ROM_DEVICE_ADDRESS_PSEUDO_CODE */

    display_chars(LCD_SEG_L2_4_0, (u8 *) " A", SEG_ON);
    SMPL_Init(Listen_Callback);
    display_chars(LCD_SEG_L2_4_0, (u8 *) " B", SEG_ON);

    // Main control loop: wait in low power mode until some event needs to be processed
    while (1)
    {
    // When idle go to LPM3
    display_chars(LCD_SEG_L2_4_0, (u8 *) " C", SEG_ON);
    idle_loop();
    display_chars(LCD_SEG_L2_4_0, (u8 *) " D", SEG_ON);

    // Process wake-up events
    if (button.all_flags || sys.all_flags)
    wakeup_event();

    // Process actions requested by logic modules
    if (request.all_flags)
    process_requests();

    // Before going to LPM3, update display
    if (display.all_flags)
    display_update();
    display_chars(LCD_SEG_L2_4_0, (u8 *) " E", SEG_ON);
    listen();
    display_chars(LCD_SEG_L2_4_0, (u8 *) " F", SEG_ON);
    }
    }

    static void listen()
    {
    uint8_t msg[2];
    uint8_t pwr;

    /* listen for link forever... */
    display_chars(LCD_SEG_L2_4_0, (u8 *) " G", SEG_ON);
    pwr = IOCTL_LEVEL_2;
    SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SETPWR, &pwr);
    display_chars(LCD_SEG_L2_4_0, (u8 *) " H", SEG_ON);

    while (1)
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " S", SEG_ON);
    NWK_DELAY(1000);
    if (SMPL_SUCCESS == SMPL_LinkListen(&sLinkID1))
    {
    break;
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " R", SEG_ON);
    NWK_DELAY(1000);
    /* Implement fail-to-link policy here. otherwise, listen again. */
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " L", SEG_ON);

    // message that will be sent
    *msg = 0x55;

    /* turn on RX. default is RX off. */
    SMPL_Ioctl( IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_RXON, 0);

    while (1)
    {
    if (sSemaphore)
    {
    // answer to received message with message number 0 (hi earth)
    msg[0] = 0;
    SMPL_Send(sLinkID1, msg, sizeof(msg));
    sSemaphore = 0;
    }
    }
    }

    /* handle received messages */
    static uint8_t Listen_Callback(linkID_t port)
    {
    uint8_t msg[2], len;
    /* is the callback for the link ID we want to handle? */
    if (port == sLinkID1)
    {
    /* yes. go get the frame. we know this call will succeed. */
    if ((SMPL_SUCCESS == SMPL_Receive(sLinkID1, msg, &len)) && len)
    {
    sSemaphore = 1;
    if(msg[0]==0x55)
    {
    display_chars(LCD_SEG_L2_5_0, (u8 *) " PAIR", SEG_ON);
    }
    else
    {
    display_chars(LCD_SEG_L2_5_0, (u8 *) " ERROR", SEG_ON);
    }
    return 1;
    }
    }
    /* keep frame for later handling */
    return 0;
    }

    ************************************and on sender side :**********************************************************************

    int main(void)
    {
    // Init MCU
    unsigned char *My_ID1;
    unsigned char Counter[5];
    My_ID1 = Counter;
    init_application();

    // Assign initial value to global variables
    init_global_variables();

    // Branch to welcome screen
    test_mode();

    // Main control loop: wait in low power mode until some event needs to be processed
    while (1)
    {
    // When idle go to LPM3
    idle_loop();

    // Process wake-up events
    if (button.all_flags || sys.all_flags)
    wakeup_event();

    // Process actions requested by logic modules
    if (request.all_flags)
    process_requests();

    // Before going to LPM3, update display
    if (display.all_flags)
    display_update();
    }
    }

    unsigned char simpliciti_link_to (void)
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " B", SEG_ON);
    BSP_InitBoard();
    display_chars(LCD_SEG_L2_4_0, (u8 *) " C", SEG_ON);
    SMPL_Init(Link_Callback);
    display_chars(LCD_SEG_L2_4_0, (u8 *) " D", SEG_ON);
    uint8_t pwr;
    display_chars(LCD_SEG_L2_4_0, (u8 *) " F", SEG_ON);
    pwr = IOCTL_LEVEL_2;
    SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SETPWR, &pwr);
    display_chars(LCD_SEG_L2_4_0, (u8 *) " G", SEG_ON);

    while(1)
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " H", SEG_ON);
    NWK_DELAY(1000);
    if(SMPL_SUCCESS == SMPL_Link(&sLinkID1))
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " O", SEG_ON);
    simpliciti_data[0]=0x55;
    SMPL_Send(sLinkID1, simpliciti_data, 1);
    NWK_DELAY(10);
    break;
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " L", SEG_ON);
    NWK_DELAY(1000);
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " n", SEG_ON);
    return (1);
    }


    /* handle received frames. */
    static uint8_t Link_Callback(linkID_t port)
    {
    uint8_t len;

    /* is the callback for the link ID we want to handle? */
    display_chars(LCD_SEG_L2_4_0, (u8 *) " o", SEG_ON);
    if (port == sLinkID1)
    {
    /* yes. go get the frame. we know this call will succeed. */
    if((SMPL_SUCCESS == SMPL_Receive(sLinkID1, simpliciti_data, &len)) && len)
    {
    //simpliciti_bike_decode_watch_callback();
    sSemaphore = 1;
    return 1;
    }
    }
    /* keep frame for later handling. */
    return 0;
    }

    void wakeup_event(void)
    {
    //code snipet
    else if (button.flag.up)
    {
    // Call direct function
    ptrMenu_L1->sx_function(LINE1);

    // Set Line1 display update flag
    display.flag.line1_full_update = 1;

    // Clear button flag
    button.flag.up = 0;
    display_symbol(LCD_ICON_BEEPER1, SEG_ON_BLINK_ON);
    display_symbol(LCD_ICON_BEEPER2, SEG_ON_BLINK_ON);
    display_symbol(LCD_ICON_BEEPER3, SEG_ON_BLINK_ON);
    clear_line(LINE2);
    display_chars(LCD_SEG_L2_4_0, (u8 *) " A", SEG_ON);
    if(simpliciti_link_to())
    {
    display_chars(LCD_SEG_L2_5_0, (u8 *) " FOUND", SEG_ON);
    }
    else
    {
    display_chars(LCD_SEG_L2_5_0, (u8 *) " NF", SEG_ON);
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " M", SEG_ON);
    display_symbol(LCD_ICON_BEEPER1, SEG_OFF);
    display_symbol(LCD_ICON_BEEPER2, SEG_OFF);
    display_symbol(LCD_ICON_BEEPER3, SEG_OFF);
    }
    in sender watch...on pressing the up key it will try to link

    in listener watch it is looping in
    while (1)
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " S", SEG_ON);
    NWK_DELAY(1000);
    if (SMPL_SUCCESS == SMPL_LinkListen(&sLinkID1))
    {
    break;
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " R", SEG_ON);
    NWK_DELAY(1000);
    /* Implement fail-to-link policy here. otherwise, listen again. */
    }
    which we can notice by screen continuously changing from S to R and vice versa. and S never appears on Screen

    in senderwatch it is looping in
    while(1)
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " H", SEG_ON);
    NWK_DELAY(1000);
    if(SMPL_SUCCESS == SMPL_Link(&sLinkID1))
    {
    display_chars(LCD_SEG_L2_4_0, (u8 *) " O", SEG_ON);
    simpliciti_data[0]=0x55;
    SMPL_Send(sLinkID1, simpliciti_data, 1);
    NWK_DELAY(10);
    break;
    }
    display_chars(LCD_SEG_L2_4_0, (u8 *) " L", SEG_ON);
    NWK_DELAY(1000);
    }
    which we can notice by screen continuously changing from H to L and vice versa. and O never appears on Screen

    why both the watches are not able to link with each other ?

    Thanks and Regards,
    Vinayak Jadhav
  • Hi all,

    Here is the problem which I am facing currently....
    I am using SMPL_Link() API on 1 watch and SMPL_LinkListen() on other watch.
    if the response from both the functions are positive i.e. SMPL_SUCCESS further send and receive could be done......but it is not.

    why both the watches are not able to link with each other ?

    Thanks and Regards,
    Vinayak Jadhav

  • Hi all,

    The API's(functions) which I am using here are smplStatus_t SMPL_Link(linkID_t *); at 1st chronos watch and
    smplStatus_t SMPL_LinkListen(linkID_t *); at another chronos watch ..
    Both the functions are returning SMPL_TIMEOUT which means No link frame received during listen interval.
    what could be the reason for this ??

    Thanks and Regards,
    Vinayak Jadhav

**Attention** This is a public forum