<?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 example on coded PHY</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44103/uart-example-on-coded-phy</link><description>Hi 
 
 I am playing around with ble_app_uart example from SDK, it works perfectly fine together with ble_app_uart_c. Now I want to modify it so that it would work in long range mode (or coded PHY). I tried adding these two lines to advertising_init function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jul 2020 09:34:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44103/uart-example-on-coded-phy" /><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/260513?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2020 09:34:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:909c0145-aa5d-4662-be35-2b9a23a4a74c</guid><dc:creator>destiny98</dc:creator><description>&lt;p&gt;Hi, I tried to implement the main.c over to the UART Central example in debug mode and I got this error:&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/longrange.png" /&gt;&lt;/p&gt;
&lt;p&gt;Am I suppose to change tis&amp;nbsp;&amp;nbsp;uint8_t&amp;nbsp; scan_buffer_data[NRF_BLE_SCAN_BUFFER]; to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;uint8_t&amp;nbsp; &amp;nbsp;scan_buffer_data[BLE_GAP_SCAN_BUFFER_EXTENDED_MIN];&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/240503?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2020 16:40:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:485fea3c-1a13-41a5-b4df-2a236de00b6d</guid><dc:creator>kunal1234</dc:creator><description>&lt;p&gt;@peterS the&amp;nbsp;NRF_BLE_SCAN_BUFFER macro is in sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/227158?ContentTypeID=1</link><pubDate>Wed, 01 Jan 2020 12:35:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91040fe1-e0a8-4cdb-a679-99b40ac26b18</guid><dc:creator>peterS</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have the same problem, can you tell me where to change the &lt;strong&gt;NRF_BLE_SCAN_BUFFER&lt;/strong&gt; to &lt;strong&gt;BLE_GAP_SCAN_BUFFER_EXTENDED_MIN&lt;/strong&gt;. i can find it in main.c&lt;/p&gt;
&lt;p&gt;Peter Stam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/219861?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 10:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e311c279-0228-4b6d-88ac-15c5a75e3e3e</guid><dc:creator>AlexIsMe</dc:creator><description>&lt;p&gt;Guys, thanks for this samples, its made my day! Was fighting incorrect parameters for whole day. Good luck with projects!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/176675?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2019 11:55:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b0c4092-5604-4992-8c3d-37cf622ba93f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Glad to hear. Good luck with your project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/175364?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 14:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92735c9c-2bcd-4960-8e3a-f2c94783f762</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have tried changing this &lt;strong&gt;NRF_BLE_SCAN_BUFFER &lt;/strong&gt;to &lt;strong&gt;BLE_GAP_SCAN_BUFFER_EXTENDED_MIN&lt;/strong&gt; as you suggested and I can confirm that everything is working now as expected.&lt;/p&gt;
&lt;p&gt;Thank you very much AndreasF and Susheel Nuguru for your help, it was much appreciated. I would never have figured this out on my own.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/175292?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 11:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef66c4bf-9aa6-48cb-8bc1-218196b60c4d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When using CODED_PHY you need to enabled the extended bit when scanning, which you did.&lt;/p&gt;
&lt;p&gt;But then &lt;span&gt;NRF_BLE_SCAN_BUFFER&amp;nbsp;&lt;/span&gt;should be set to&amp;nbsp;BLE_GAP_SCAN_BUFFER_EXTENDED_MIN which is 255.&lt;/p&gt;
&lt;p&gt;Can you please try this and see if the scanner goes through?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/174444?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 07:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e81c2f1-1e06-4a4e-94d8-fd0cf8a11e54</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi Andreas&lt;/p&gt;
&lt;p&gt;Yes, no problem, if you would take the example project ble_app_uart_c from SDK 15.2 and copy over this main.c from the attachment, you would basically have the same project.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1325.ble_5F00_app_5F00_uart_5F00_c_5F00_modified_5F00_main.7z"&gt;devzone.nordicsemi.com/.../1325.ble_5F00_app_5F00_uart_5F00_c_5F00_modified_5F00_main.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/174316?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 14:39:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b624ff05-79a7-4c95-9be1-622bc2491138</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Luka.&lt;/p&gt;
&lt;p&gt;Could you share your project so I could take a look at it?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/174248?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 12:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3838202-22df-418f-94de-03c7e2f6765d</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I tried changing the &lt;strong&gt;scan_init()&lt;/strong&gt; with the one provided above, but I had no luck with this. When I tried to run it, it crashed again and what could be read on SEGGER RTT Viewer was this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: BLE UART central example started.
&amp;lt;error&amp;gt; ble_scan: sd_ble_gap_scan_start returned 0x9
&amp;lt;error&amp;gt; app: Fatal error&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;According to nrf_error.h, code 0x9 means &lt;strong&gt;NRF_ERROR_INVALID_LENGTH&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If I commented out the lines that enable coded PHY and extended, everything worked. But if I enabled back the extended, the same error occured. But if I enabled only coded PHY without extended, I got slightly different error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: BLE UART central example started.
&amp;lt;error&amp;gt; ble_scan: sd_ble_gap_scan_start returned 0x7
&amp;lt;error&amp;gt; app: Fatal error&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The error code 0x7 according to nrf_error.h means &lt;strong&gt;NRF_ERROR_INVALID_PARAM&lt;/strong&gt;, which makes sense, since coded PHY requiers extended. But why didn&amp;#39;t it work with extended enabled and what is this code &lt;strong&gt;NRF_ERROR_INVALID_LENGTH&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173690?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 11:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c079612-d4ff-4f87-8857-a2e430e5914a</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Its ok with this question, since it is related to the issue.&lt;/p&gt;
&lt;p&gt;I dont know if you might get in trouble with not using &lt;strong&gt;NRF_BLE_SCAN&lt;/strong&gt; before interval, window and timeout, and maybe extended should be set as true.&lt;/p&gt;
&lt;p&gt;Here is my &lt;strong&gt;scan_init()&lt;/strong&gt; function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void scan_init(void)
{
    ret_code_t            err_code;
    nrf_ble_scan_init_t   init_scan;
    ble_gap_scan_params_t scan_params;

    memset(&amp;amp;scan_params, 0, sizeof(ble_gap_scan_params_t));

    scan_params.active        = 1;
    scan_params.interval      = NRF_BLE_SCAN_SCAN_INTERVAL;
    scan_params.window        = NRF_BLE_SCAN_SCAN_WINDOW;
    scan_params.timeout       = NRF_BLE_SCAN_SCAN_DURATION;
    scan_params.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL;
    scan_params.scan_phys     = BLE_GAP_PHY_CODED;
    scan_params.extended      = true;

    memset(&amp;amp;init_scan, 0, sizeof(init_scan));

    init_scan.connect_if_match = true;
    init_scan.conn_cfg_tag     = APP_BLE_CONN_CFG_TAG;
    init_scan.p_scan_param     = &amp;amp;scan_params;

    err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_UUID_FILTER, &amp;amp;m_nus_uuid);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_UUID_FILTER, false);
    APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173672?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 10:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b6096c7-bccd-49ad-b65e-6cd7e4f1e35b</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, I can confirm now that this is working, so from what I have seen now, the scan response data should not be defined and extended mode has to be enabled in order for the coded PHY to work. If I do that in my code now, everything works.&lt;/p&gt;
&lt;p&gt;Thank you very much for your help.&lt;/p&gt;
&lt;p&gt;But, hovewer, can I ask for one more hint (or should I open another ticket) also for the central side? I modified scan parameters accordingly to what was set now in the peripheral example, so my scan parameters look like that:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** @brief Parameters used when scanning. */
static ble_gap_scan_params_t const m_scan_params =
{
    .active           = 0,
    .interval         = SCAN_INTERVAL,
    .window           = SCAN_WINDOW,
    .timeout          = SCAN_DURATION,
    .scan_phys        = BLE_GAP_PHY_CODED,
    .filter_policy    = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .extended         = 1,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now the same thing as before (&lt;strong&gt;NRF_ERROR_INVALID_PARAM&lt;/strong&gt;) happens when the function &lt;strong&gt;sd_ble_gap_scan_start() &lt;/strong&gt;is called. Again I am using the same example from SDK 15.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173630?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 08:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:143c61de-0cff-47b1-b5f4-6f8f241f6d93</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve spotted the error.&lt;/p&gt;
&lt;p&gt;Try using this code snippet as &lt;strong&gt;advertising_init(): &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = false;
    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

    init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_complete.p_uuids  = m_adv_uuids;

    init.config.ble_adv_fast_enabled      = true;
    init.config.ble_adv_fast_interval     = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout      = APP_ADV_DURATION;
    init.config.ble_adv_primary_phy       = BLE_GAP_PHY_CODED;
    init.config.ble_adv_secondary_phy     = BLE_GAP_PHY_CODED;
    init.config.ble_adv_extended_enabled  = true;
    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This worked for me.&lt;/p&gt;
&lt;p&gt;I think the problem was that the UUID was defined as scan response data.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173502?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 14:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:105a2326-a839-435f-8176-e05368a3e0c6</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I just wanted to let you know that I&amp;#39;m still looking into the issue, sorry for the delay.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173339?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 23:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa2d911b-5ccb-4203-9481-3b2c2e419ab7</guid><dc:creator>Bob Recny</dc:creator><description>&lt;p&gt;As expected, the same happens with SDK v15.3.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173334?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 22:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9a0e295-73f8-42a0-90ab-d0f325334114</guid><dc:creator>Bob Recny</dc:creator><description>&lt;p&gt;I have the same issue. When I try the changes to ble_advertising.c, though, both this edit and the original one for main.c give error_code = 0x7. SDK 15.2.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173249?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 13:31:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3cefd8-60f9-4527-8a2f-b8e6dcb572f7</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, I can confirm that if I do this, the system does not crash. But I cannot confirm that it is operating in Coded PHY mode, since I can see the device advertising with nRF Connect application on an iPhone. These phones don&amp;#39;t support coded PHY, do they? So if it is really advertising in Coded PHY I shouldn&amp;#39;t be able to see it, correct?&lt;/p&gt;
&lt;p&gt;So is there any way to really put it into the Coded PHY mode?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173233?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 12:45:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab5ad23f-4d1f-45b0-ab1b-06bb9b19fefd</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Luka.&lt;/p&gt;
&lt;p&gt;I noticed that the UART example uses the &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/lib_ble_advertising"&gt;Advertising Module&lt;/a&gt;, not SoftDevice API calls directly. So the lines i proposed first would not work then.&lt;/p&gt;
&lt;p&gt;Can you try this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;In &lt;strong&gt;main.c, &lt;/strong&gt;use this as &lt;strong&gt;advertising_init&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = false;
    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

    init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.srdata.uuids_complete.p_uuids  = m_adv_uuids;

    init.config.ble_adv_fast_enabled  = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;
    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then you have to edit the implementation of &lt;strong&gt;ble_advertising_init()&lt;/strong&gt;, which you can find in &lt;strong&gt;ble_advertising.c &lt;/strong&gt;(located in \components\ble\ble_advertising\ble_advertising.c).&lt;/p&gt;
&lt;p&gt;Edit the last part so that it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // Configure a initial advertising configuration. The advertising data and and advertising
    // parameters will be changed later when we call @ref ble_advertising_start, but must be set
    // to legal values here to define an advertising handle.

    p_advertising-&amp;gt;adv_params.primary_phy = BLE_GAP_PHY_CODED;
    p_advertising-&amp;gt;adv_params.secondary_phy = BLE_GAP_PHY_CODED;
    p_advertising-&amp;gt;adv_params.duration        = p_advertising-&amp;gt;adv_modes_config.ble_adv_fast_timeout;
    p_advertising-&amp;gt;adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED;
    p_advertising-&amp;gt;adv_params.p_peer_addr     = NULL;
    p_advertising-&amp;gt;adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    p_advertising-&amp;gt;adv_params.interval        = p_advertising-&amp;gt;adv_modes_config.ble_adv_fast_interval;

    ret = sd_ble_gap_adv_set_configure(&amp;amp;p_advertising-&amp;gt;adv_handle, NULL, &amp;amp;p_advertising-&amp;gt;adv_params);
    VERIFY_SUCCESS(ret);

    p_advertising-&amp;gt;initialized = true;
    return ret;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This worked for me.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173152?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 05:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a67afb87-8f69-41fa-8f31-9c4c23811d64</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;No problem, just open unmodified version of ble_app_uart and in main.c in function advertising_init() after the line that says&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;insert these two lines of code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    init.config.ble_adv_primary_phy = BLE_GAP_PHY_CODED;
    init.config.ble_adv_secondary_phy = BLE_GAP_PHY_CODED;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s more or less everything that I did. But alternately you can also open unmodified project and replace main.c with what I have in the big code window in my original post.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173060?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 14:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74cae382-4650-4c60-82a3-8b75255cd31a</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have the latest version. Could you explain to me what you have done compared to an unmodified version of &lt;strong&gt;ble_app_uart&lt;/strong&gt;? So that I can try to recreate it in Segger Embedded Studio?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173057?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 14:07:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1511b753-d126-4a53-940a-3a14e07a5d44</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have version 8.32.2 and it builds just fine for me, in fact I tried even now extracting the archive I provided and cleanning and building it and it works just fine.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/173053?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 13:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c74ae77d-c51a-447f-a1bc-48bfa097a05b</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Which version of IAR Workbench does it work on? I cannot compile it with my version.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/172966?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 09:12:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f02a3478-d67f-4aa5-bdd3-b745862b5d17</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It&amp;#39;s no problem sharing the project right now, as it is only the SDK 15.2 project in that stage with changed power setting for adveretising.&lt;/p&gt;
&lt;p&gt;This is Eclipse project with configured IAR toolchain (I use IAR compiler) and the original IAR project is still inside and it also works. So this works either with Eclipse and IAR plugin or the original IAR Workbench. The whole project files are in the attachment.&lt;/p&gt;
&lt;p&gt;But also - what I have changed is basically the main.c from the project, which is in my original post anyway.&lt;/p&gt;
&lt;p&gt;And by the way - UART pins are configured here a bit funny, because I am using the Fanstel development board, which has UART pins somewhere else.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_uart_5F00_pca10056_5F00_s140.7z"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_pca10056_5F00_s140.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/172955?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 08:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3374d290-5444-4675-adba-e0c684ce1a5b</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you share your project so I can take a look at it?&lt;/p&gt;
&lt;p&gt;I can make this ticket private if you do not want to share the project with anyone else but me and other Nordic employees :-)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example on coded PHY</title><link>https://devzone.nordicsemi.com/thread/172919?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 06:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abaa8720-2aca-44b4-b18b-d6fc0cd684df</guid><dc:creator>Luka Fercec</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, I am using SDK 15.2.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ble_advertising_init() &lt;/strong&gt;returns 0, which is &lt;strong&gt;NRF_SUCCESS&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ble_advertising_start()&lt;/strong&gt; doesn&amp;#39;t return NRF_ERROR_INVALID_STATE, which is 8, but I see it return number 7, which is &lt;strong&gt;NRF_ERROR_INVALID_PARAM&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If I change only primary PHY to coded, also the same thing happens, there is no difference.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>