3 Replies Latest reply on Dec 10, 2014 7:27 AM by qiwa_2175386

    About the Wiced_sensor.c read sensor time gap

      Hi Community


      I used LightBlue tool to capture the Wiced Smart's data.

      16:39:10.193 — Characteristic (33EF9113-3B55-413E-B553-FEA1EAADA459) notified: <0bffff02 00570045 009dffff feb7ff13 0467fb>

      16:39:10.313 — Characteristic (33EF9113-3B55-413E-B553-FEA1EAADA459) notified: <0bfeff03 00560049 0080ffed fec1ff1e 0470fb>


      from the log we can see the time gap is 120ms between two message.


      My question: Is this 120ms is set by Wiced_sensor.c? Where i can modify it.


      Thanks a lot

        • 1. Re: About the Wiced_sensor.c read sensor time gap

          Hello Jean,


          Yes, this 120msec window is set by the Firmware.


          Please review the short video that goes through the Firmware:


          WICED Sense Firmware Walk-Thru Video




          • 2. Re: About the Wiced_sensor.c read sensor time gap

            There are two ways to modify timing:

            • There is a function "blecm_connectionEventNotifiationEnable" originally called in "wiced_sense_connection_up" (not the right place, but OK). It seems to have a timer value as parameter, "default_period". It seems to be related with which delay the FW checks for next Notification needed to be sent. You can modify here as one place.
            • When Notification has to be sent, in "wiced_sense_tx_opportunity_notice" there are SW counters:
              FW counts per SW how often the need for Notification was there, via "wiced_sense_polls_since_last_hpt": almost all events (fast) are for AGM sensors (fast speed on Accel., Gyro and Compass), some in "between" are for HPT sensors (Hum., Pressure, Temp.). You can change the SW counters here as well.
              BTW: this SW counter determines the speed even more, like a divider on a real timer.
            • 3. Re: About the Wiced_sensor.c read sensor time gap

              Hi userc_6396




              Thanks a lot.


              I think the "wiced_sense_tx_opportunity_notice" not a right place because I need decrease the time gap time.


              To check the wiced_sense_polls_since_last_hpt only can increase the gap time and it is n-tupling of 120ms.




              So maybe the “blecm_connectionEventNotifiationEnable” is right place to decrease it.


              But I don’t know how to set it.


              My param is “blecm_connectionEventNotifiationEnable(*****, 0, 6250/625, 30000/625”, why it is 120ms?