<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115614/nrf52-observer-scanning-intervals-erratic-in-nrf-connect-2-7-when-connected-as-peripheral</link><description>I have a device that acts as a peripheral with a connecting interval of 100-150mS and also as an observer listening for beacons. When I get a beacon I update the scan interval from an interval of 100mS with a window of 20mS to an interval of 500mS with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Oct 2024 12:53:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115614/nrf52-observer-scanning-intervals-erratic-in-nrf-connect-2-7-when-connected-as-peripheral" /><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/508152?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 12:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73cb9422-c935-4aa3-9cb6-e233bad88c51</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Edward,&amp;nbsp;&lt;br /&gt;Indication should have a confirm in 30 seconds. This could be the reason why you saw a lock up in 30 seconds.&amp;nbsp;&lt;br /&gt;If it&amp;#39;s the case, then the issue can be with the peer device, not the one who sends the indication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to capture &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/"&gt;a sniffer trace&lt;/a&gt; when you test with indication ? The trace would provide the information about what cause the issue.&amp;nbsp;&lt;br /&gt;Please also capture a trace when you do notification, we can check if it&amp;#39;s hitting the max bandwidth. This can explain error -12 when doing notification.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507991?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 18:14:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6183212d-8932-4a00-952f-4c4c8792abdf</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;It does not lock up if I change to an notify i see an error that should probably be in the indicate as well but it seems to lock up. Since the -12 is ENOMEM.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;buf = bt_att_create_pdu(conn, BT_ATT_OP_INDICATE, len);
	if (!buf) {
		LOG_WRN(&amp;quot;No buffer available to send indication&amp;quot;);
		bt_att_req_free(req);
		return -ENOMEM;
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error&lt;/p&gt;
&lt;p&gt;[00:00:37.726,409] &amp;lt;wrn&amp;gt; hfrCentral: Armed MSG Filters matched. Address: EC:C0:85:69:36:93 (random) RSSI: -57 dRSSI 1412&lt;br /&gt;[00:00:37.726,562] &amp;lt;wrn&amp;gt; bt_conn: Unable to allocate buffer within timeout&lt;br /&gt;[00:00:37.726,562] &amp;lt;err&amp;gt; bt_att: Unable to allocate buffer for op 0x1b&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507988?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 17:48:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f2b1b80-c916-4c26-a00c-f3c1242ffdf5</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;The scan window. it works but is basically a flat line which is fine for now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729878467889v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507970?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 13:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:529477f0-191c-45c4-8fdf-788fab45b980</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Edward,&amp;nbsp;&lt;br /&gt;Please clarify what you changed ? You meant to change to notification or to change the scan window=scan interval.&amp;nbsp;&lt;br /&gt;Anyway, please try to capture a sniffer trace and try to reproduce on a sample.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507960?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 13:29:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06b389e2-3440-412d-9f3d-690aafbf4f26</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I have done that and it does not affect the indicate that is the same either way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507959?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 13:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97466d15-7215-4bf9-a8e1-80626ee90fa9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&amp;nbsp;&lt;br /&gt;I&amp;#39;m not 100% sure about switching to notification can solve the issue. Because I&amp;#39;m not 100% sure if error -12&amp;nbsp;was caused by an ongoing indication or something else. Please try to test with the notification to see if you get the same error.&amp;nbsp;&lt;br /&gt;If you can reproduce the issue with indication on a sample, it would be great.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to test with scan window = scan period to see if it improves.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507940?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 12:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf3c8eb6-d5b8-494d-8234-1e3ae2a62adc</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;Also if I do the same&amp;nbsp;scan interval and window it looks to stay in RX the entire time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507939?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 12:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5b4e387-9bf9-4267-acd2-1d9d5871e4a8</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;If i were to switch this to a notify would that work better and not hang as it does not require a response or can I look and see if there is a pending indicate.&amp;nbsp; These can be sent at very high rate but don&amp;#39;t need to be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507858?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 07:41:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5cea34e-7e34-4a71-9cc2-67463af3a746</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Edward,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you reproduce the issue with a sample ?&amp;nbsp;&lt;br /&gt;Can you capture a &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/"&gt;sniffer trace &lt;/a&gt;?&amp;nbsp;&lt;br /&gt;You may have error -12 with indication when there is a ongoing indication not confirmed yet. I suspect that it was because there were packet drop due to bad scheduling. A sniffer trace would be able to tell that.&amp;nbsp;&lt;br /&gt;How often do you send the indication ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507759?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 13:05:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:129fa262-8dca-4d17-a809-357ebfc204df</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;It looks like the indicate function if very different in 2.7 as well&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507755?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 13:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32b0e7b0-7e26-4323-a5e2-4c80fe5876f6</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;The indicate is sent out when we receive a broadcast message to the central takes a long time to fail with error -12 it looks like it is locking up for a good 30s and this was also not the case in 2.6 is there a buffer that needs to be increased? a lot of these messages get received.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int rc = bt_gatt_indicate(NULL, &amp;amp;g_armed_char_ind_params);
&amp;#160; &amp;#160; if (rc)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; LOG_WRN(&amp;quot;Armed Indicate failed: %d&amp;quot;, rc);
&amp;#160; &amp;#160; }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:02:36.018,371] &amp;lt;wrn&amp;gt; hfrCentral: Armed MSG Filters matched. Address: EC:C0:85:69:36:93 (random) RSSI: -63 dRSSI 2818
[00:03:05.906,463] &amp;lt;wrn&amp;gt; bt_det: Armed Indicate failed: -12&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507745?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 12:31:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716499ed-e39b-4f6a-bfde-45b7465f248f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Edward,&amp;nbsp;&lt;br /&gt;If you look at the documentation here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.99-cs2/page/nrfxlib/softdevice_controller/doc/scheduling.html"&gt;https://docs.nordicsemi.com/bundle/ncs-2.7.99-cs2/page/nrfxlib/softdevice_controller/doc/scheduling.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729772600970v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can find that the scanner (which windows is not equal to interval) can get 4th priority which is lower than advertising/connection. This is not listed in the documentation in v2.6.0&lt;br /&gt;This may explain why the scheduling looks different between v2.6.0 and v2.7.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Back to your issue, you mentioned &amp;quot;&lt;span&gt;it hangs on indicate events seemingly locking up the devices Bluetooth&amp;quot; could you explain ?&lt;br /&gt;&lt;br /&gt;One suggestion to avoid this issue is to do scan interval = scan windows. This will utilize the timeslot better (any available free timeslot will be used for scanning)&lt;br /&gt;&lt;br /&gt;Could you give some more info about your application ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507714?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 10:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7f495bf-9114-4a6a-8307-ee5d0aebeb89</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;It&amp;#39;s actually the connection causing the issue it is fine while advertising&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507712?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 10:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feddffab-a12c-46bb-99ef-5a5a6313f9a1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Edward,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m taking over the ticket from Håkon.&amp;nbsp;&lt;br /&gt;I have reproduced the issue here. It seems that there is some change in the scheduler algorithm from v2.7.&amp;nbsp;&lt;br /&gt;I am checking internally with the team to see why that happen and if there is anyway you can have the scanner having more priority over the advertiser.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507152?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 13:11:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fb70b21-c420-459f-aae3-44216eeee337</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;Here is the dis peripheral sample with a scanner running with a delayable kwork that switches the interval.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2.7 one interval at 500/250 all others 500/50 or shorter.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729515970986v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2.6.2 500/250ms windows&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729516245968v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_dis_5F00_scan.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_dis_5F00_scan.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/507077?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 08:49:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021b4592-06ed-46c8-b321-80a368461555</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Are you able to show this difference or reproduce this issue with something more minimal, or a sample from the SDK?&amp;nbsp;I would like to reproduce this on my side here.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/506948?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 13:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11c6e4dd-ec11-4316-b198-c6fd20305c70</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I am using sysbuild in the 2.7 build and the child image for 2.6.2.&amp;nbsp; I am running the exact same prj.conf on an nrf52840 and the only difference is the version of the SDK.&amp;nbsp; This code has been working through multiple versions of the SDK for the last several years since my initial release.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/506941?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 13:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6446c538-db8b-4d87-90a8-fd4e7adb4cc2</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Edward,&lt;/p&gt;
&lt;p&gt;So yeah, you are not building using the new &amp;quot;sysbuild&amp;quot; then? And you are not building this directly from the SDK folder (maybe by modifying a sample or something), as that might also make it build using sysbuild?&lt;/p&gt;
&lt;p&gt;I should also mention that the VSC extensions functionality is also a bit limited in 2.7, but if this is an older project that you&amp;#39;ve just copy-pasted a few files to I guess you haven&amp;#39;t modifed any of these files in the VSC GUI either?&lt;/p&gt;
&lt;p&gt;You are using NRF52, &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_2.7.html#samples_and_applications_using_short-range_radio"&gt;so I guess this isn&amp;#39;t relevant either&lt;/a&gt;. I am not really seeing anything &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/releases/release-notes-2.7.0.html"&gt;here either&lt;/a&gt;, but let me know something catches your eye. What nRF52 Soc is it?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 observer scanning intervals erratic in nrf connect 2.7 when connected as peripheral</title><link>https://devzone.nordicsemi.com/thread/506758?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 15:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd4e9e6-a50b-4fcb-9df8-68d7f4e61805</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I can confirm that this is not the code porting to more device tree oriented code as I just used the same project with the old board files and child image build system.&amp;nbsp; This is definitely an issue with the soft device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>