<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Accelerometer streaming rate is 2x faster than configured (Flic Duo)]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I'm using AccelerometerStreamingConfig on a Flic Duo button (Android SDK) with outputDataRate = 1, which the javadoc says maps to 1.6Hz per the LIS2DW12 datasheet, table 29. But when I measure the actual data arriving over BLE, it consistently comes in at about double that rate — and the burst size is also about 4x bigger than the samplesPerBurst value I requested.</p>
<p dir="auto">Measured examples:</p>
<ul>
<li>samplesPerBurst = 8 requested → I receive bursts of 32 samples, about every 10.2s</li>
<li>samplesPerBurst = 2 requested → I receive bursts of 8 samples, about every 2.55s</li>
</ul>
<p dir="auto">Both cases work out to ~3.14 samples/second delivered — exactly double 1.6Hz, regardless of the requested burst size.<br />
I tried toggling lowNoise (true/false) and got identical results either way, so that doesn't seem to be the cause.<br />
Is this expected behavior? Is there some other parameter (lowPowerMode, mode, bandwidthFilter?) that affects the actual delivery rate independently of outputDataRate, or is there a known firmware reason the button delivers roughly double the configured rate? Any insight would be appreciated.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://community.flic.io/topic/18637/accelerometer-streaming-rate-is-2x-faster-than-configured-flic-duo</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 23:27:10 GMT</lastBuildDate><atom:link href="https://community.flic.io/topic/18637.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Sep 2026 14:34:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Tue, 22 Sep 2026 14:22:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/5460">@estebanvalverde67</a> Please try the new 2.1.1 version of the sdk.</p>
]]></description><link>https://community.flic.io/post/22199</link><guid isPermaLink="true">https://community.flic.io/post/22199</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Tue, 22 Sep 2026 14:22:13 GMT</pubDate></item><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Tue, 22 Sep 2026 13:19:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Following up on your question about a duplicate listener - you were right to ask. We found and fixed a real bug on our side, and the mystery is resolved.</p>
<p dir="auto">Root cause: our test phone had more than one Flic button paired (from earlier testing). Our code guarded against re-registering a listener on the same button by comparing against a single "last processed button" variable. Since the list of known buttons gets iterated twice, through two separate code paths, the second pass would reach an already-registered button again - but by then that single-value guard had already moved on to a different button in the list, so the comparison no longer matched, and the listener got registered a second time on that same physical button.</p>
<p dir="auto">We confirmed this precisely by tagging each registered listener instance with an incrementing ID and logging it on every callback: two different listener instances (not one instance firing twice) were both receiving every accelerometer burst.</p>
<p dir="auto">We fixed it (now tracking a set of already-registered button addresses instead of a single last-seen button) and re-ran the exact same test as before (outputDataRate=1, samplesPerBurst=8). With the duplicate registration gone, we now see exactly 16 samples every ~10 seconds - matching your own measurement exactly. No rate doubling at all. The only real discrepancy left is the x2 size you already confirmed and are fixing in the packet writer.</p>
<p dir="auto">Sorry for the noise, and thanks for pointing us in the right direction. One small, low-priority thing we noticed while re-testing: those 16 samples still arrive split across several small packets (e.g. eight 1-sample bursts, one 3-sample, one 5-sample) instead of a single 16-sample packet. Doesn't affect the total count or rate, just how they're spaced out - not urgent, just mentioning it in case it's a known/expected detail on your end.</p>
<p dir="auto">Thanks again!</p>
]]></description><link>https://community.flic.io/post/22198</link><guid isPermaLink="true">https://community.flic.io/post/22198</guid><dc:creator><![CDATA[estebanvalverde67]]></dc:creator><pubDate>Tue, 22 Sep 2026 13:19:20 GMT</pubDate></item><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Tue, 22 Sep 2026 13:02:27 GMT]]></title><description><![CDATA[<p dir="auto">Good catch - we actually found and fixed a real bug on our side: our button listener registration was comparing Flic2Button objects by reference (===) instead of by bdAddr, and the SDK appears to sometimes hand back a different object instance for the same physical button depending on the code path (reconnect on service start vs. re-init after binding). That allowed addListener() to be called twice in some cases.</p>
<p dir="auto">We fixed that (now comparing by bdAddr) and re-tested with the exact same config as before (outputDataRate=1, samplesPerBurst=8). However, the duplication is still there even with registration now guaranteed to happen exactly once:</p>
<ul>
<li>onReady still fires twice, ~5ms apart, on the very first connection after a fresh install/launch.</li>
<li>Every onAccelerometerStreamingData burst still arrives as an identical pair (same sample count, same or ~1ms-apart timestamp) - e.g. 3 samples immediately followed by another 3 samples, then 5 samples followed by another 5 samples.</li>
</ul>
<p dir="auto">Given the ~5ms gap on onReady is far too tight to be explained by our own app code (two independent code paths racing would typically be tens-hundreds of ms apart, not 5ms), this looks like it's happening below our listener - either in the SDK's internal event dispatch or in how the button/BLE stack delivers the notification. Does that match anything you're aware of on your end?</p>
<p dir="auto">Full config used (unchanged from before):</p>
<p dir="auto">lowPowerMode = 0<br />
mode = 0<br />
outputDataRate = 1        // 1.6Hz<br />
bandwidthFilter = 0<br />
fullScaleSelection = 1    // +/-4G<br />
filterDatatypeSelection = 0<br />
lowNoise = true<br />
highPassRefMode = false<br />
samplesPerBurst = 8<br />
onlyWhilePressed = false</p>
<p dir="auto">Thanks in advance !!</p>
]]></description><link>https://community.flic.io/post/22197</link><guid isPermaLink="true">https://community.flic.io/post/22197</guid><dc:creator><![CDATA[estebanvalverde67]]></dc:creator><pubDate>Tue, 22 Sep 2026 13:02:27 GMT</pubDate></item><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Tue, 22 Sep 2026 11:18:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/5460">@estebanvalverde67</a> When testing this:</p>
<pre><code>button.enableAccelerometerStreaming(new AccelerometerStreamingConfig(0, 0, 1, 0, 1, 0, true, false, 8, false), new EnableAccelerometerStreamingCallback() { ... });
</code></pre>
<p dir="auto">I notice that the <code>samplesPerBurst</code> is wrong by a factor 2x (this is due to a bug in the packet writer, which will be fixed), but not by the factor 4, nor that the sample rate of delivered events is doubled. That is, I see 16 samples arrive every 10 seconds. With 8 replaced by 2 above, I see 4 samples arrive every 2.5 seconds. Can you confirm this? Maybe you have registered a listener twice or something?</p>
]]></description><link>https://community.flic.io/post/22196</link><guid isPermaLink="true">https://community.flic.io/post/22196</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Tue, 22 Sep 2026 11:18:38 GMT</pubDate></item><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Mon, 21 Sep 2026 19:43:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/57">@Emil</a> said in <a href="/post/22194">Accelerometer streaming rate is 2x faster than configured (Flic Duo)</a>:</p>
<blockquote>
<p dir="auto">could you post your full configuration?</p>
</blockquote>
<p dir="auto">Sure! Here's the full AccelerometerStreamingConfig used in both test cases (Android SDK), field by field:</p>
<p dir="auto">lowPowerMode          = 0                                                                                                                   mode                  = 0                                                                                                                   outputDataRate        = 1        // 1.6Hz (LIS2DW12 table 29)                                                                               bandwidthFilter       = 0                                                                                                                   fullScaleSelection    = 1        // ±4G                                                                                                     filterDatatypeSelection = 0      // low-pass                                                                                                lowNoise              = true                                                                                                                highPassRefMode       = false                                                                                                               samplesPerBurst       = 8   (or 2 in the second test — everything else identical)                                                           onlyWhilePressed      = false</p>
<p dir="auto">I also re-ran the samplesPerBurst = 8 case with lowNoise = false and got an identical result (same burst size, same timing), so that parameter doesn't seem to be the cause. Everything else (lowPowerMode, mode, bandwidthFilter, filterDatatypeSelection, onlyWhilePressed) was left at the most conservative/default value in both tests. Full-scale was ±4G in both cases.</p>
]]></description><link>https://community.flic.io/post/22195</link><guid isPermaLink="true">https://community.flic.io/post/22195</guid><dc:creator><![CDATA[estebanvalverde67]]></dc:creator><pubDate>Mon, 21 Sep 2026 19:43:41 GMT</pubDate></item><item><title><![CDATA[Reply to Accelerometer streaming rate is 2x faster than configured (Flic Duo) on Mon, 21 Sep 2026 18:22:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/5460">@estebanvalverde67</a> hmm could you post your full configuration?</p>
]]></description><link>https://community.flic.io/post/22194</link><guid isPermaLink="true">https://community.flic.io/post/22194</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Mon, 21 Sep 2026 18:22:09 GMT</pubDate></item></channel></rss>