<?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>UART with coded PHY</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100547/uart-with-coded-phy</link><description>Greetings All, 
 I&amp;#39;m merging the UART examples with the hr_coded examples to build a long range UART bridge. 
 I&amp;#39;m having trouble getting the BT_UUID_NUS_VAL added to the bt_le_ext_adv_set_data() function to set up coded advertising, without some sort</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Jun 2023 13:19:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100547/uart-with-coded-phy" /><item><title>RE: UART with coded PHY</title><link>https://devzone.nordicsemi.com/thread/432539?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 13:19:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:570bfed9-3c53-4d76-b2fa-b0cea95cfa24</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="domko99"]I have the same problem, it is not possible to set data to be used in scan response (bt_data sd) in function&amp;nbsp;bt_le_ext_adv_set_data, I dont know why really.[/quote]
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/domko99"&gt;domko99&lt;/a&gt;&amp;nbsp;This is due to it not being allowed by the spec:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38982/scan_rsp-in-extended-advertisement/151672"&gt;RE: SCAN_RSP IN EXTENDED ADVERTISEMENT&lt;/a&gt;&amp;nbsp;explains this as well as&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Bluetooth Core Specification Version 5.3 | Vol 4, Part E section 7.8.53: LE Set Extended Advertising Parameters command:&lt;/p&gt;
&lt;p&gt;(page 2450 in the Bluetooth Core Specification Version 5.3)&lt;/p&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;If extended advertising PDU types are being used (bit 4 = 0) then:
    The advertisement shall not be both connectable and scannable.
    High duty cycle directed connectable advertising (≤ 3.75 ms
    advertising interval) shall not be used (bit 3 = 0).&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So a minor correction is that it if extended advertising is used, it can&amp;#39;t be both connectable and scannable (Scannable meaning you have a scan response packet).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So just be vary that if you break the spec, you also might break any future qualifications. I recommend that you create a new case on Devzone to follow this up if you have any additional questions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/j-ellyson"&gt;J Ellyson&lt;/a&gt;&amp;nbsp;It looks like this case fell in between two chairs since my previous reply. Have you had any more luck in solving your issue since then? I can also add that if you don&amp;#39;t use scan response in your solution, then the previous mentioned comment regarding domko99s suggestion should not apply to your case, as you advertise on secondary channels instead of in the scan response data (explained here:&amp;nbsp;&lt;a href="https://novelbits.io/bluetooth-long-range-how-to-achieve-results-over-1km/"&gt;https://novelbits.io/bluetooth-long-range-how-to-achieve-results-over-1km/&lt;/a&gt;)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART with coded PHY</title><link>https://devzone.nordicsemi.com/thread/432490?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 10:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd77971b-a2c9-4c10-a253-775c362d1eb6</guid><dc:creator>domko99</dc:creator><description>&lt;p&gt;I have the same problem, it is not possible to set data to be used in scan response (bt_data sd) in function&amp;nbsp;bt_le_ext_adv_set_data, I dont know why really. The solution for me was to add scan response data (bt_data sd) to scan advertisement data (bt_data ad):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const struct bt_data ad[] = {
	BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
	BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
	BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_NUS_VAL)
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then modify the function&amp;nbsp;bt_le_ext_adv_set_data:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), NULL, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This should be working, at least it does for me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART with coded PHY</title><link>https://devzone.nordicsemi.com/thread/430269?ContentTypeID=1</link><pubDate>Fri, 09 Jun 2023 13:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:434cd90d-2eef-4b7a-8e24-8b34bd536ace</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There shouldn&amp;#39;t be anything in the way of setting up an UART service on Coded PHY. Unfortunately I haven&amp;#39;t found anything more constructive for you w.r.t how to do this in nRF Connect SDK other than to investigate the official samples (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/central_hr_coded/README.html"&gt;Central&lt;/a&gt;/&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_hr_coded/README.html#peripheral-hr-coded"&gt;Peripheral &lt;/a&gt;Coded samples, and the central/peripheral UART samples.&lt;/p&gt;
&lt;p&gt;However, the error you see indicates that you attempt to call bt_le_ext_adv_set_data with something that is not supported, as err-134 is &amp;quot;not supported&amp;quot;. The issue might be here, where the data set might be too large to advertise (I have not verified this, so you will have to check up on this speculation)&lt;/p&gt;
&lt;p&gt;I will get back to investigating how to do this in more detail after the weekend&lt;/p&gt;
&lt;p&gt;In the meanwhile let me know if you puzzle together a solution, and I&amp;#39;ll keep you updated on my end.&lt;/p&gt;
&lt;p&gt;Kind regards&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART with coded PHY</title><link>https://devzone.nordicsemi.com/thread/430081?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2023 22:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1844ea8-a7b5-4596-a9f2-d6d0162acdc1</guid><dc:creator>J Ellyson</dc:creator><description>&lt;p&gt;[&lt;/p&gt;
&lt;p&gt;Greetings AHaug,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using nRF Connect for Desktop v2.1.1 with VS Code&lt;br /&gt;nRF52840DK and nRF52840_Dongle.&lt;/p&gt;
&lt;p&gt;//if I use these 2 snippets from peripheral UART example&lt;br /&gt;static const struct bt_data ad[] = {&lt;br /&gt; BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),&lt;br /&gt; BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;static const struct bt_data sd[] = {&lt;br /&gt; BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_NUS_VAL),&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// and change this snippet from hrs_coded sample&lt;br /&gt;err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), NULL, 0);&lt;br /&gt; if (err) {&lt;br /&gt; printk(&amp;quot;Failed to set advertising data (err %d)\n&amp;quot;, err);&lt;br /&gt; return err;&lt;br /&gt; }&lt;br /&gt;// to this&lt;br /&gt;err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));&lt;br /&gt; if (err) {&lt;br /&gt; printk(&amp;quot;Failed to set advertising data (err %d)\n&amp;quot;, err);&lt;br /&gt; return err;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;// I get this for output&lt;/p&gt;
&lt;p&gt;[00]*** Booting Zephyr OS build v3.1.99-ncs1 ***&lt;br /&gt;Starting Nordic UART service example&lt;br /&gt;I: 4 Sectors of 4096 bytes&lt;br /&gt;I: alloc wra: 0, fd0&lt;br /&gt;I: data wra: 0, 1c&lt;br /&gt;I: SoftDevice Controller build revision: &lt;br /&gt;I: f2 e7 5f 6f 23 a2 f3 e8 |.._o#...&lt;br /&gt;I: 10 2f c3 35 9e d7 1d fe |./.5....&lt;br /&gt; |..B. &lt;br /&gt;I: HW Platform: Nordic Semiconductor (0x0002)&lt;br /&gt;I: HW Variant: nRF52x (0x0002)&lt;br /&gt;I: Firmware: Standard BlueBuild 4087489391&lt;br /&gt;I: No ID address. App must call settings_load()&lt;br /&gt;I: Identity: CE:59:8B:15:C7:C8 (random)&lt;br /&gt;I: HCI: version 5.3 (0x0c) revision 0x11a7, manufacturer 0x0059&lt;br /&gt;I: LMP: version 5.3 (0x0c) subver 0x11a7&lt;br /&gt;Created adv: 0x2...&lt;br /&gt;I: 10 2f c3 35 9e d7 1d fe |./.5....&lt;br /&gt;I: 8f 80 00020e0&lt;br /&gt;Failed to set advertising data (err -134)&lt;br /&gt;Advertising failed to create (err -134)&lt;br /&gt;[00][00][00]&amp;rsquo;[0E][01]&amp;euml;[00][00][00][00][01][00][00][00][04]&lt;/p&gt;
&lt;p&gt;// If I use the advertising functions from the hrs_coded sample unaltered,&lt;br /&gt;// it starts and connects without error, but there is no UART activity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART with coded PHY</title><link>https://devzone.nordicsemi.com/thread/430058?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2023 17:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4a4b358-da26-48e2-bf1a-52cac9c324aa</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you state which SDK and which version of the SDK you&amp;#39;re working with and paste the errors you&amp;#39;re observing so we might narrow down the issue you&amp;#39;re observing? I will also have a look around to see if I can find any unofficial samples that may illustrate how to do what you&amp;#39;re aiming to do&lt;/p&gt;
&lt;p&gt;Kind regards,&amp;nbsp;&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>