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.

SimpliciTI - Multiple Links in End Devices

Other Parts Discussed in Thread: SIMPLICITI

Hi, I have a question about an application I want to implement.

Using the example that SimpliciTI provides for the eZ430-RF2500 devices, the Simple Peer-to-Peer project works fine.
Now I want to implement something similar with two Listerners, where a board is programmed with the application LinkTo and another two boards with the application LinkListen (all of them with different addresses). Thus, the board with the app LinkTo is linked to the other two boards through different links, such that at every time it decides whom to send a message. Is this possible? If so, can I base my code on the example "Access Point as Data Hub", or those features (frequency agility) are not supported for End Devices?.

Also, I have checked the code for the Access Point from the application "Access Point as Data Hub", and I want something similar but instead of the Access Point being listening for links, I want it to be the one looking for links (ie, similar to what the function LinkTo does in the End Devices). Is that possible?


Note that I don't want to send the same message to all the listeners, such one of the application from SimpliciTI examples does.

Hope someone can help me, thanks.

Regards,
Gustavo.

  • Hi Gustavo,

    Did you find any reply to your answers? I have a similiar conditions in which one end device must connect to two other nodes and push them messages. The first test I did is to use the Sensor Monitor demo application that you can find in the installation CD of eZ430-RF2500. I deployed two nodes with Access Point (using USB FET debugger) that use LinkListen() to accept connections from peers, and when I run the End device (which invokes link() ), both nodes accept the incoming connection request and start plotting the result. From the end device point of view, I have only one linkId to use and when I send messages over that link, both AP receive and plot the message.

    How can I exactly address one node in the link() phase to make a p2p connection (and not a one to many) ?

    Fabio

  • Hi Fabio,

    I didn't get any answer for my problem, but what I finally implement is the following:

    I need all three the nodes to be end-devices, one listenTo and two Listeners, such that between the ListenTo there exists a different link for each Listeners. The only way to make it possible was to setting each link at different frequency channel. The transceiver of the Listeners are set to an specific frequency channel, and when the ListenTo wants to link to them or send them messages it has to be in their respective frequency channel.

    To change the frequency channel of the transceiver using SimpliciTI, I found the following code:

      freqEntry_t freq;
      static uint8_t sChannel = 0;

      ......// more code

      freq.logicalChan = sChannel;
      rc = nwk_setChannel(&freq);

    where the variable sChannel is the index of the frequency you are using (I am setting for example sChannel=0, 1, 2, 3, or 4; for five different channels). Also to use the code I wrote you have to modify the file nwk_freq.h and the variable NWK_FREQ_TBL_SIZE (to the number of different channels you want to use).

    I am not sure if this is the optimal way to implement what I need but at least works fine. I hope it works for your needs.

    Gustavo.

  • I have only been using SimpliciTI for a couple of weeks, so keep that in mind.  I wanted to answer this question since I needed the answer for the last couple of days and could not find it.  

    You can have multiple links with one end device.  Here is the code I am using to set up two links on an ED. You do not need to switch frequencies.

    /* Listen for link forever... */
    BSP_TURN_OFF_LED1();
    BSP_TURN_ON_LED2();
    while (SMPL_LinkListen(&sInLinkID) != SMPL_SUCCESS)
    {
    BSP_TOGGLE_LED2();
    }

    /* Turning on LED2 to show that we have link*/
    BSP_TURN_ON_LED2();

    /* Try to set outgoing link until success */
    while (SMPL_SUCCESS != SMPL_Link(&sOutLinkID))
    {
    BSP_TOGGLE_LED1();
    }

    /* Turning on LED1 to show that we have out link*/
    BSP_TURN_ON_LED1();

    Once the links are established I just use sInLinkID or sOutLinkID, depending on which device I want to communicate with.  For example, here is the code I am using to forward packets from the InLink device to the OutLink device

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

    while (1)

       if( sSemaphore ) /* Packet received that needs forwarding */
       {
           /* Radio IDLE to save power */
          //SMPL_Ioctl( IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_RXIDLE, 0);
          SMPL_Receive(sInLinkID, radioMsg, &len);
          sSemaphore = 0;

          /* Forward packet to outLink */
          SMPL_Send(sOutLinkID, radioMsg, len);

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

    The key is you have to change DNUM_CONNECTIONS in the smpl_config.dat file.  When using the smpl_link example DNUM_CONNECTIONS defaults to 1 and you will not be able to establish multiple links unless you change the value.  

    Your application must keep track of which link ID goes with which device so that the correct messages are sent.  I manage this in my simple test network by establishing the links in a preset order so I know which linkID goes to which device, but you could implement something more sophisticated by using the devices address or some other scheme.

  • hi,

       What is rc in the line rc = nwk_setChannel(&freq)