<?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>Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64863/simultaneous-execution-of-extended-advertisement-and-scanning</link><description>I am developing software with the following features. 
 
 
 Communicates between two boards with nRF52840, nRF5 SDK 15.3.0, and its S140 
 Activate both extended advertising and scanning on each node Parameters: BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 10 Jan 2021 23:58:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64863/simultaneous-execution-of-extended-advertisement-and-scanning" /><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/288285?ContentTypeID=1</link><pubDate>Sun, 10 Jan 2021 23:58:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bd84c9c-7b52-4027-b642-2d0946d6ef45</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The example will demonstrate the extended advertising by the device name I believe.&lt;/p&gt;
&lt;p&gt;If you have a, i.e phone that supports ext. adv. you can see the entire RSCS example device name.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/287814?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 01:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d11c52e-7e02-4649-8433-a5d6f9c80649</guid><dc:creator>Seno</dc:creator><description>&lt;p&gt;Hi.&lt;br /&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;Regarding the API sd_ble_gap_adv_set_configure, in my application, when I send data 148 bytes long, I get another error NRF_ERROR_INVALID_DATA.&lt;br /&gt;To solve this problem, I need to understand exactly how to program extended advertising that you recommend.&lt;/p&gt;
&lt;p&gt;You recommended in the last comment to refer to the RSCS example.&lt;br /&gt;In my response to this, I referred to the following files.&lt;/p&gt;
&lt;p&gt;&amp;lt;File: nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_rscs\main.c&amp;gt;&lt;/p&gt;
&lt;p&gt;(line: 160) BLE_ADVERTISING_DEF(m_advertising); /**&amp;lt; Advertising module instance. */&lt;br /&gt;(line: 848) init.config.ble_adv_extended_enabled = true;&lt;br /&gt;(line: 852) err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;lt;File: nRF5_SDK_15.3.0_59ac345_original\components\ble\ble_advertising\ble_advertising.c&amp;gt;&lt;/p&gt;
&lt;p&gt;(line 431) uint32_t ble_advertising_init(ble_advertising_t * const p_advertising,&lt;br /&gt;(line 461) if (p_advertising-&amp;gt;adv_modes_config.ble_adv_extended_enabled == true)&lt;br /&gt;(line 462) {&lt;br /&gt;(line 463) #ifdef BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED&lt;br /&gt;(line 464) p_advertising-&amp;gt;adv_data.adv_data.len = BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED;&lt;br /&gt;(line 465) #else&lt;br /&gt;(line 466) p_advertising-&amp;gt;adv_data.adv_data.len = BLE_GAP_ADV_SET_DATA_SIZE_MAX;&lt;br /&gt;(line 467) #endif // BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED&lt;br /&gt;(line 468) }&lt;br /&gt;(line 474) ret = ble_advdata_encode(&amp;amp;p_init-&amp;gt;advdata, p_advertising-&amp;gt;enc_advdata, &amp;amp;p_advertising-&amp;gt;adv_data.adv_data.len);&lt;br /&gt;(line 505) ret = sd_ble_gap_adv_set_configure(&amp;amp;p_advertising-&amp;gt;adv_handle, NULL, &amp;amp;p_advertising-&amp;gt;adv_params);&lt;/p&gt;
&lt;p&gt;&amp;lt;File nRF5_SDK_15.3.0_59ac345_original\components\softdevice\s140\headers\ble_gap.h&amp;gt;&lt;/p&gt;
&lt;p&gt;(line 250) #define BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED (238) /**&amp;lt; Maximum supported data length for an extended connectable advertising set. */&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The following are my understanding.&lt;/p&gt;
&lt;p&gt;1) The example which you recommend seems to support extended advertising.&lt;br /&gt; If BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED is defined, the data length is extended to 238 bytes.&lt;/p&gt;
&lt;p&gt;2) The API ble_advdata_encode is called.&lt;/p&gt;
&lt;p&gt;3) However, the API sd_ble_gap_adv_set_configure is called by setting NULL to the second parameter.&lt;br /&gt; I understand that this example supports extensions, but no extended data is set.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Is my understanding above correct?&lt;br /&gt;If so, please show me how to modify the above RSCS example to send 148 bytes of our application-dependent data.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/278751?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 10:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebb11dbd-5a2b-46be-9733-45c19584b0e2</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry about the delay. I&amp;#39;ve been out of office a while.&lt;/p&gt;
&lt;p&gt;From what I can see, you are able to send 185 bytes in your advertising packet? Which means that you have sucessfully enabled extended advertising.&lt;/p&gt;
&lt;p&gt;You can refer to the RSCS example for an example on how to use extended advertising.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/276995?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 00:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6b22fd5-c6a7-474a-84cf-6d421199433f</guid><dc:creator>Seno</dc:creator><description>&lt;p&gt;Dear msromero,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;br /&gt;Below is a summary of my latest questions/requests.&lt;/p&gt;
&lt;p&gt;&amp;lt;My latest question/requirement&amp;gt;&lt;br /&gt;What is required of my software is to send and receive up to 255 bytes of data over long range broadcasts. Because of this requirement, I chose CodedPhy and extended advertising in nRF5_SDK_15.3.0 for nRF52840.&lt;br /&gt;Initially, I searched for a suitable example, but couldn&amp;#39;t find an example that fits perfectly.&lt;br /&gt;Therefore, I developed my own software by referring to some examples.&lt;/p&gt;
&lt;p&gt;My current software can send up to 236 bytes as described in the past, but if I try to send more data than this, the API sd_ble_gap_adv_set_configure will return NRF_ERROR_INVALID_LENGTH as an error.&lt;br /&gt;Please tell me the cause of this error and how to improve it and send up to 255 bytes long.&lt;br /&gt;I thought my problem could be solved if you could provide a good example of sending up to 255 bytes.&lt;/p&gt;
&lt;p&gt;&amp;lt;My past comments you wondered&amp;gt;&lt;br /&gt;In actual operation, it is unknown what value will be sent.&lt;br /&gt;Therefore, I want to avoid getting an error when sending a value that meets certain conditions.&lt;/p&gt;
&lt;p&gt;&amp;lt;Intent of the above comment&amp;gt;&lt;br /&gt;From Joakim I received the reply that the above error would occur if the format allowed by BLE was violated.&lt;br /&gt;And I was advised to check the BLE specification etc. about what format is acceptable.&lt;br /&gt;However, the BLE specification is difficult for me, and I don&amp;#39;t understand what value is acceptable and what value is rejected as an error.&lt;/p&gt;
&lt;p&gt;Currently my software seems to be able to successfully send up to 236 bytes.&lt;br /&gt;However, the combination of data that can be tested is limited.&lt;br /&gt;In the future, when it sends a specific value, it may get a format error.&lt;br /&gt;Such risks/concerns should be avoided by the time the software is officially released.&lt;/p&gt;
&lt;p&gt;&amp;lt;Status of my first questions&amp;gt;&lt;br /&gt;I have asked two questions, [Question 1] and [Question 2] so far.&lt;br /&gt;Of these, [Question 1] has been resolved but [Question 2] has not yet been resolved.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/276363?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2020 08:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32812423-2d08-494d-bad3-5093fa736119</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply. Joakim has been out of office on vacation. I am trying to see if I understand your question but I don&amp;#39;t understand what you mean with the following:&lt;/p&gt;
[quote user="Seno"]In actual operation, it is unknown what value will be sent.&lt;br /&gt;Therefore, I want to avoid getting an error when sending a value that meets certain conditions.[/quote]
&lt;p&gt;&amp;nbsp;And the example you are reffering to is not an example, but a guide to migrate to the newest version of Softdevice S140 from older versions.&lt;/p&gt;
&lt;p&gt;Can you explain more in detail what you are struggling with?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/272837?ContentTypeID=1</link><pubDate>Sun, 04 Oct 2020 00:11:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c0b30cd-0b29-4b83-811b-ce42ffe7f623</guid><dc:creator>Seno</dc:creator><description>&lt;p&gt;Dear Jakobsen,&lt;/p&gt;
&lt;p&gt;Thank you for providing information.&lt;br /&gt;I tried to understand the specifications based on the information you recommend, but it was too difficult for me to understand.&lt;/p&gt;
&lt;p&gt;So I want to change the question.&lt;br /&gt;All I want to do is broadcast long data with unlimited values in the following modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CodedPhy&lt;/li&gt;
&lt;li&gt;BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Could you please introduce your recommended example that meets this condition?&lt;br /&gt;I want to send as long a data as possible, but it doesn&amp;#39;t have to be 255 bytes.&lt;/p&gt;
&lt;p&gt;In actual operation, it is unknown what value will be sent.&lt;br /&gt;Therefore, I want to avoid getting an error when sending a value that meets certain conditions.&lt;br /&gt;As I&amp;#39;ve already explained, my source code is similar to the example in the document below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nRF5_SDK_15.3.0_59ac345/components/softdevice/s140/doc/s140_nrf52_6.1.0_migration-document.pdf&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But, as you say, this method seems to return an error depending on the value we send.&lt;br /&gt;So I&amp;#39;d like to try another method that doesn&amp;#39;t cause an error no matter what value I send.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/271896?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 23:20:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cea40f3-82dc-48e8-8312-85ae627fd730</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry about the delay.&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t found the information you were looking for here, you can find detailed information about almost everything related to BLE in the official Bluetooth Core Specification; &lt;br /&gt;&lt;a href="https://www.bluetooth.com/specifications/bluetooth-core-specification/"&gt;https://www.bluetooth.com/specifications/bluetooth-core-specification/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also find a lot of information in our online documentation: &lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp"&gt;https://infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/269961?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 01:04:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94cde023-ee51-4915-bec8-8f63894581c1</guid><dc:creator>Seno</dc:creator><description>&lt;p&gt;Dear Joakim,&lt;/p&gt;
&lt;p&gt;Thank you for providing valuable information.&lt;/p&gt;
&lt;p&gt;Can you give me the format information about where the following three fields you pointed out correspond to in the raw data? It is enough to introduce the corresponding web page that describes it.&lt;/p&gt;
&lt;p&gt;- Len field&lt;br /&gt;- Flags length field&lt;br /&gt;- Length fields&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Additionally, in my source code, the API ble_advdata_encode is not called, following the example on page 4 of &amp;quot;nRF5_SDK_15.3.0_59ac345/components/softdevice/s140/doc/s140_nrf52_6.1.0_migration-document.pdf&amp;quot;.&lt;br /&gt;Please check if there is no problem with this method.&lt;/p&gt;
&lt;p&gt;* The raw extended advertising data I send starts with 4 bytes of fixed data {0x89, 0xF6, 0xA2, 0x3D}.&lt;br /&gt;The next 1-byte upper 4 bits and lower 4 bits can be any value from 0 to 3.&lt;br /&gt;After that, the data to be actually sent is placed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/269831?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2020 11:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26acd7af-7c5d-4402-999f-24c36bf98218</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;The SoftDevice checks the validity of the advertising data. So it can return&amp;nbsp;NRF_ERROR_INVALID_LENGTH in several situations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;len field is 0 or &amp;gt; max (depends on extended or not).&lt;/li&gt;
&lt;li&gt;Flags length field is other than 2 (always 1 octet AD type, 1 octet AD data)&lt;/li&gt;
&lt;li&gt;Length fields in packet add up to be more than the packet length.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/269270?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 02:11:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb143be0-7db9-4bcc-a733-2d3e5c6454bf</guid><dc:creator>Seno</dc:creator><description>&lt;p&gt;Dear Joakim,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for your reply. And I&amp;#39;m sorry for my late reply.&lt;br /&gt;With your help, my development is progressing.&lt;/p&gt;
&lt;p&gt;However, there is one point that makes me wonder.&lt;br /&gt;That is, the byte length that can be sent in an advertisement is limited to 236 bytes. &lt;br /&gt;If I fill the buffer with 237 bytes data and send it, API sd_ble_gap_adv_set_configure returns NRF_ERROR_INVALID_LENGTH.&lt;/p&gt;
&lt;p&gt;As I&amp;#39;ve already seen last time, I set the advertise buffer size to BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED(means 255). &lt;br /&gt;Then, before sending it by calling sd_ble_gap_adv_start, I call sd_ble_gap_adv_set_configure after filling this buffer with application-dependent data, and it works fine up to a data length of 236 bytes, but from 237 bytes, the above error occurs.&lt;/p&gt;
&lt;p&gt;So far, 236 bytes is long enough for my application, so this issue doesn&amp;#39;t hinder my development.&lt;br /&gt;But I want to understand why it&amp;#39;s technically an error.&lt;/p&gt;
&lt;p&gt;I would appreciate it if you could give me some advice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Simultaneous execution of extended advertisement and scanning</title><link>https://devzone.nordicsemi.com/thread/265709?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44cb74ca-91ff-47bb-a2ce-2902780607d2</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Q1.&lt;/p&gt;
&lt;p&gt;From the ticket you linked to; It is true that there is a limitation that the device cannot advertise and scan simultaniously. The radio will have to swap between advertising and scanning, due to the fact that there is only one radio.&lt;/p&gt;
&lt;p&gt;Q2.&lt;/p&gt;
&lt;p&gt;From what I can see you have already enabled extended advertising. Using extended advertising allows you to advertise up to 255 bytes of data.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>