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 make the RE of SimpliciTI sensor/actuator (End Device) functionality with CC1110?

Other Parts Discussed in Thread: SIMPLICITI, CC2511, CC2510

Hello,everyone, 

I wish RE of SimpliciTI can also implement as a END Device, which means that it can relay the information from the other ED as well as  inspect the temperature value and send the value to the AP directly. The temperature is got with the temperature sensor within CC1110.

I have tried some methods but it failed. The SimpliciTI 1.0.5a indicates:"R16. A Range Extender may contain sensor/actuator (End Device) functionality."

How make a CC1110 change beteewn Range Extender and an End Device ? Please tell me if you have some good idea about it.

Thank you very much!

  • Hello.

    You can in fact do what you want. One thing to check is to be sure that the smpl_config.dat file for the Range Extender has NUM_CONNECTIONS set to a non-zero number (probably just 1). The reason for this is that the RE configuration in the SimpliciTI distribution has no End Device object on it so setting NUM_CONNECTIONS to 0 saves resources

    lfriedman

     

  • Hello again.

    There is another reason why there might be a problem using the CC1110 with the AP-as-data-hub scenario. Under some conditions for the CC2510/CC2511 and CC1110/CC1111 the link transaction will fail. This is true for all devices, not just REs with End Device objects on them. This is a known problem and is fixed in the next release.

    There is a workaround for the problem. If you have left MAX_APP_PAYLOAD at the default value of 10, try changing it to 11. This will work around the problem.

  •  Hello,

    Thank you very much,Ifriedman. The method I use now is to change define below for END_DEVICE:
    .
    -DNUM_CONNECTIONS=0

    -DSIZE_INFRAME_Q=2

    -DSIZE_OUTFRAME_Q=2

    -DTHIS_DEVICE_ADDRESS="{0x77, 0x56, 0x34, 0x12}"

    -DRANGE_EXTENDER

     

    to declare them in the procedure:

    int  NUM_CONNECTIONS=0;

    int SIZE_INFRAME_Q=2;

    int SIZE_OUTFRAME_Q=2;

    int THIS_DEVICE_ADDRESS={0x77, 0x56, 0x34, 0x12};

    int RANGE_EXTENDER=0;

     int RX_ALWAYS=0;

    int USE_ADDRESS_FILTERING=0;

    in the procedure,I declare int k=0; first,let it works as RE; then make k=1; and chage the values declare above to :

    int  NUM_CONNECTIONS=2

    int SIZE_INFRAME_Q=2;

    int SIZE_OUTFRAME_Q=2;

    int THIS_DEVICE_ADDRESS={0x77, 0x56, 0x34, 0x12};

    int RANGE_EXTENDER=1;

     int RX_ALWAYS=1;

    int USE_ADDRESS_FILTERING=1;

    make the CC1110 works as a ED by change some other procedures in the project, then change it to a RE and so on.

    It fails again.

  • Hello again,Ifriedman

    I use the method I referred just now.The problem is that it can link but can send. I am still checking the procedure. But I can not make sure that the final

    result will success.

    You referred that change the NUM_CONNECTIONS to none zero and change MAX_APP_PAYLOAD  to 11 can work around the problem.

    But the different object has different define . If I just change the define between theRE and ED,the CC1110 will just choose either RE or ED when compile.

    but it won't change object when running. So I use the method referred just now.But it fails.

    Do you have some idea about how to make the CC1110 change between RE and ED when it is working?

    Thank you very much,Ifriedman!

  • This approach will not work. NUM_CONNECTIONS is a macro whose definition is used throughout the code. For example, it is used to allocate static memory at run time and it is even used to decide what code to include in the build to try and conserve space.. Making it an automatic will not accomplish this. In addition, the join transaction frame sent by a device at SMPL_Init() time places NUM_CONNECTIONS in the frame that is broadcast and processed by the AP. It is the macro definition that is used. You can see this in the nwk_join.c.:nwk_join() method at approximately line 423.
  •  Just as you say,the  NUM_CONNECTIONS is a macro that choose which code to include in the build. And there are other  macro as below

    for RE ,they are: -DNUM_CONNECTIONS=0

    -DSIZE_INFRAME_Q=2

    -DSIZE_OUTFRAME_Q=2

    -DTHIS_DEVICE_ADDRESS="{0x77, 0x56, 0x34, 0x12}"

    -DRANGE_EXTENDER

    for ED, they are:  -DNUM_CONNECTIONS=2

    -DSIZE_INFRAME_Q=2

    -DSIZE_OUTFRAME_Q=2

    -DTHIS_DEVICE_ADDRESS="{0x7c, 0x56, 0x34, 0x12}"

    // device type
    -DEND_DEVICE

    -DRX_ALWAYS


    -DUSE_ADDRESS_FILTERING

    The define of macro can choose which object(RE or ED) do the CC1110 work as  when it is debuged.

    But after debug, the CC1110 won't chage one of the object to the other  when working. I

    f I don't make them as a automatic, how can a device(CC1110) change between RE and ED automatically when it works?

    Can you give some advice about the problem,thank you very much!

     

  • Sorry for the confusion. The idea of an End Device is really just a device that hosts an application and does nothing else. But it is also possible for a device that does do something else, like a Range Extender or Access Point, to also host an application. These are not mutually exclsusive, i.e., and AP or and RE can also host an application. You do not need to define an RE that hosts an application any further.

    Another way to see how this works is to examine the main program of the RE. It simply starts and then enters a 'while (1) ;' loop This keeps it alive so it can function to replay frames. But all that happens in the network layer.

    To add an application simply add the functioanlity in place the while loop. If you add an applciaiton that links (or listens) to a peer, you now have a device with RE functioanlity that also hosts an application. Nothing further is required. Once the link is esablished tthe peers can start messageing. Of course, you need to keep the device awake at all times so it can perform its RE fucntions. These functions are hidden from and independent of the application you write.

     Hope this helps.

     

  • Another, and possibly easier, way to look at this is to start out by creating an ED with the application functionality you desire.  The ED smpl_config.dat file will then contain the required settings for NUM_CONECTIONS, size of the internal frame queues etc.  In order to add RE functionality to this ED, you only need to chance the device type to RANGE_EXTENDER.  The ED/RE will now replay all messages with destination address different than its own address.   Note that you also need to make sure the radio is always in RX mode using the SMPL_Ioctl interface.

    Rgds,
    Stig

  • Hello,  Ifriedman and Stig,

    Thank you very much for your help! I have solved my problem with the method you offer. You really do me a big favour!