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.

LP-CC2652RB: How to make sending data from ZED_SW to ZC_LIGHT more frequently?

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: Z-STACK

Hello everyone,

 

in our project we would like to control the LED brightness depending on the value of an analogue sensor. If sensor value exceeds a threshold, then the values should be sent from ED to coordinator. For this we use example project ZED_SW as a dimmer and ZC_LIGHT to control the LED brightness. Reading of the ADC and sending the sensor values from the end device to the coordinator works perfectly. However, the values are only transmitted one time every 10 seconds. This is too slowly for our purposes. My question is: how to make the data sending more frequently?

In our project we use:

  • LP-CC2652RB
  • CCS 10.4.0
  • Simplelink SDK 5.30

 

Thanks!

  • I suppose it's your own application having a periodic event to transmit every 10 seconds. You should revise the event timer to change the period.

  • Hello YiKai,

    Thank you very much.

    How can i revise event timer? Are there code examples?

  • Hello Andreas,

    10 seconds reminds me of the default zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t->maxReportInt for the temperature sensor project.  If you are using BDB_REPORTING then you could reduce the maximum reporting interval.  Otherwise, the timing depends on your application as mentioned by YK so I suppose you could debug the project by putting a breakpoint at AF_DataRequest and reviewing the call stack to discover where the message is sent and why this function occurs every 10 seconds.  The util_timer APIs used in the default Z-Stack projects *initialize timeouts in units of milliseconds, thus you could search your code to determine whether 10000 is ever referenced.

    Regards,
    Ryan

  • Hello Ryan,

    Hello YK,

     

    thank you very much for the tips. The changes in code 10000 (0x2710) to other values had no effect. After the debug of the project I think that the problem is due to CUI. Is it possible to change CUI update time?

     

    Best

    Andreas

  • The CUI is updated based on events set by a timer expiration.  Please review zclsampleApp_ui_event_loop in the zcl_sampleapps_ui.c for more information.  Basically, SAMPLEAPP_UI_BDB_NWK_LINE_UPDATE_EVT should be set when the uiBdbNwkLineUpdateClk expires every UI_AUTO_REFRESH_INTERVAL_INFO_LINE milliseconds (default 1000) and calls uiRaiseBdbNwkLineUpdateEvt.  I suppose you should make sure that the correct UI line is updated at this time.

    Regards,
    Ryan