<?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>Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35278/toggle-1mbit-phy-and-codedphy</link><description>Hi. 
 I want to advertise switching 1Mbit PHY and CodedPHY every 5 seconds. 
 I designed it like this based on nrf52 ble app uart long range example. 
 advertising_start(coded)--&amp;gt;5s--&amp;gt;BLE_GAP_TIMEOUT_SRC_ADVERTISING{advertising_start(1MbpsPHY)}--&amp;gt;5s </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Jun 2018 02:22:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35278/toggle-1mbit-phy-and-codedphy" /><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/136823?ContentTypeID=1</link><pubDate>Wed, 20 Jun 2018 02:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a019c5a2-a887-48b5-811f-86a80f558bbe</guid><dc:creator>saka4849</dc:creator><description>&lt;p&gt;I can switch with this code!!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void advertising_start(void)
{
    static ble_gap_adv_params_t adv_params = {0};

    adv_params.properties.connectable = 1;
    adv_params.properties.scannable = 0;
    adv_params.p_peer_addr   = NULL;
    adv_params.fp            = BLE_GAP_ADV_FP_ANY;
    adv_params.interval      = APP_ADV_INTERVAL;
    adv_params.duration      = APP_ADV_TIMEOUT_IN_SECONDS * 100;
    if(adv_coded){
      
      //printf(&amp;quot;BLE_GAP_PHY_1MBPS\r\n\r\n&amp;quot;);
      adv_params.properties.legacy_pdu = 1;
      adv_params.properties.scannable = 1;
      adv_params.primary_phy   = BLE_GAP_PHY_1MBPS;
      adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
      adv_coded = false;
    }
    else{
      //printf(&amp;quot;BLE_GAP_PHY_CODED\r\n\r\n&amp;quot;);
      adv_params.properties.legacy_pdu = 0;
      adv_params.properties.scannable = 0;
      adv_params.primary_phy   = BLE_GAP_PHY_CODED;
      adv_params.secondary_phy = BLE_GAP_PHY_CODED;
      adv_coded = true;
    }

    sd_ble_gap_adv_start(BLE_GAP_ADV_SET_HANDLE_DEFAULT, &amp;amp;adv_params, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;br /&gt;It worked after adding scannable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/136041?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 06:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89a4dd48-c407-4b75-be3c-098f1eedce83</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Legacy pdu can not be combined with coded. coded must use extended advertising.&lt;/p&gt;
&lt;p&gt;I would recommend looking at SDK 15, and perhaps modify the BLE UART example there to suit your needs. Instead of using the alpha version you are currently using. (There could be bugs).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135814?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 23:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08caab89-de39-4c7d-8fa2-13b9d7f2f085</guid><dc:creator>saka4849</dc:creator><description>&lt;p&gt;I was misunderstanding. . .&lt;br /&gt;I added the item of legacy_pdu!!&lt;/p&gt;
&lt;p&gt;However, it did not appear on my phone too.&lt;br /&gt;And after advertise of Coded, advertise came to stop.&lt;/p&gt;
&lt;p&gt;If I add legacy_pdu = 1 to Coded, no longer advertise too...&lt;/p&gt;
&lt;p&gt;Is there anything else I should change?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135728?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 11:38:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e9f4ec7-442c-44b3-8dd6-b5d702b01b4d</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Extended advertising can be used for coded, 1mbps and 2mbps.&lt;/p&gt;
&lt;p&gt;Coded advertising must use advertising extensions, but advertising extensions can aslo be used for 1mbps and 2mbps.&lt;/p&gt;
&lt;p&gt;When using advertising extensions, the advertising data is not in the original advertising packet, instead we use the advertising (on an advertising channel) to &amp;quot;point&amp;quot; to the advertising data (now on a data channel instead). Older phones do not support this feature, and many new phones are still waiting for support. Coded advertising uses extended advertising because the packets are to long for the &amp;quot;normal&amp;quot;/legacy advertising.&lt;/p&gt;
&lt;p&gt;I suspect that the Xperia phone can only see the &amp;quot;legacy&amp;quot; advertising, and not extended advertising&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;   adv_params.p_peer_addr = NULL;
    adv_params.fp         = BLE_GAP_ADV_FP_ANY;
    adv_params.interval   = APP_ADV_INTERVAL;
    adv_params.duration   = APP_ADV_TIMEOUT_IN_SECONDS * 100;
    if (adv_coded)
    {
        adv_params.properties.legacy_pdu = 1;
        adv_params.primary_phy           = BLE_GAP_PHY_1MBPS;
        adv_params.secondary_phy         = BLE_GAP_PHY_1MBPS;
        adv_coded = false;
    }
    else
    {
        adv_params.properties.legacy_pdu = 0;
        adv_params.primary_phy           = BLE_GAP_PHY_CODED;
        adv_params.secondary_phy         = BLE_GAP_PHY_CODED;
        adv_coded = true;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135713?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 10:13:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ead10f94-8622-47be-affc-d0b4d80cc18d</guid><dc:creator>saka4849</dc:creator><description>&lt;p&gt;Sorry, I&amp;#39;m letting you misunderstand...&lt;/p&gt;
&lt;p&gt;I want to recieve 1Mbps advertising at my phone.&lt;br /&gt;I do not want to receive Coded advertising at it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135703?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 09:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9097a2c-230a-4d94-95a7-c8b1d88e94e2</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Are you sure your phone supports extended advertising? There are not many phones on the market that already support advertising extensions. I suspect this is the problem for your Xperia.&lt;/p&gt;
&lt;p&gt;Also, if you are using the ble uart long range example from github that could mean you are using an alpha of the SoftDevice. If so, it could be wise to update to a production version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135642?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 23:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cf71eba-f547-43f5-b7e5-1a88ce599dcf</guid><dc:creator>saka4849</dc:creator><description>&lt;p&gt;Coded receiver is Nordic Device. (nRF52840 PDK)&lt;/p&gt;
&lt;p&gt;My using App are nRF Connect and iBeaconDetector.&lt;br /&gt;I always use them to confirm BLE.&lt;/p&gt;
&lt;p&gt;Of course, it support.&lt;br /&gt;It is displayed if it is an ordinary uart sample.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135559?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 11:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0ff5ea5-79fd-4a14-82c1-17557add984e</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Ok, so the coded receiver is a Nordic device? or another phone?&lt;/p&gt;
&lt;p&gt;What sort of app are you using on the phone? nRF Connect?&lt;/p&gt;
&lt;p&gt;Does the phone support Bluetooth Low Energy?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135535?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 10:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a1cb1fa-2632-452c-8c49-ff96958450b5</guid><dc:creator>saka4849</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;H&amp;aring;vard,&lt;/p&gt;
&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also scanning with receiverfor Coded.&lt;br /&gt;It has been received for 5 seconds and stopped for 5 seconds.&lt;/p&gt;
&lt;p&gt;Yes, my Xperia is for 1 Mbps.&lt;br /&gt;I want to receive alternately with Xperia and Coded receiver.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggle 1Mbit PHY and CodedPHY</title><link>https://devzone.nordicsemi.com/thread/135524?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 09:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2720051d-02a2-451a-b794-8543a3194919</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;saka4849,&lt;/p&gt;
&lt;p&gt;You say it does not display 1MBPS phy, and that CODED phy works. are you sure it was not the other way around? 1MBPS phy should definetly work. CODED may not be supported, depending on you phone. Also, I think the current android version will always use 1MBPS are primary phy, so it may fail to see your CODED advertising&lt;/p&gt;
&lt;p&gt;Is your Xperia new? Are you sure it supports BLE5?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>