<?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>Direct advertising with unbonded Android phone&amp;#39;s IRK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43054/direct-advertising-with-unbonded-android-phone-s-irk</link><description>I was using NRF52832 and s132 v6.0. 
 I have Android phone&amp;#39;s IRK and I have added the Android phone into the identites list manually. 
 After doing the direct advertising to Android phone.Why can&amp;#39;t nrf52832 be connected ? 
 I have noticed that some comments</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Feb 2019 15:09:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43054/direct-advertising-with-unbonded-android-phone-s-irk" /><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/169771?ContentTypeID=1</link><pubDate>Wed, 06 Feb 2019 15:09:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:881afcb7-2c77-4540-ae18-1c274b87336d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The problem in this case is that the directed advertising packet will not be reported to the application as a normal advertising packet, so the phone would have to know about the device in some other way.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is outside our control since it is handled by the Bluetooth stack in the phone.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/169001?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 09:13:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2b557cb-6c31-44e6-840b-adcdc9eda384</guid><dc:creator>Pureer</dc:creator><description>&lt;p&gt;Hi ovrebekk ,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;In my phone Oneplus3 Android8.0,nrf52832 with direct advertising didn&amp;#39;t show up in nRF Connect&amp;#39;s list, but I didn&amp;#39;t close the device tab ,so I can push the connect button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168990?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 08:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e8ba15-2eff-42fa-81d0-79257b86e84b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How are you scanning for the device on the phone side?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if nRF Connect it set up to show direct advertisers, but I will check with the developer when he is in office.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168963?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 01:51:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cedafb6-10ea-4282-ba56-c5e1236222c9</guid><dc:creator>Pureer</dc:creator><description>&lt;p&gt;ovrebekk,&lt;span&gt;whitelist with manual IRK is working fine,do you know why direct advertising didn&amp;#39;t work with manual&amp;nbsp;IRK? What did I miss in my code above?According to&amp;nbsp;&lt;/span&gt;BT core Vol 6 Part D 5.4 ,it should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168830?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 10:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd71429-c8dc-4040-9572-a1b8f8381df3</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It sounds like white listing is the way to go then. If you include the BLE address and OOB pairing data in the sound wave transmission you can use this information to set up the white list in the peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want the phone to only try to connect to peripherals that have received the sound wave information, you could include some information here that needs to be reflected in the advertise packet sent from the peripheral (for instance you can generate a random number that needs to be included in the advertise packet, and only try to connect to advertisers that include this).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168610?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 07:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06839ab0-5327-48e8-a960-cb55aa558824</guid><dc:creator>Pureer</dc:creator><description>&lt;p&gt;ovrebekk, this is a bit like nfc pairing,I call it sound wave pairing but data is one-way transmission, people take up the phone and close to the&amp;nbsp;&lt;span&gt;peripheral, peripheral will get the IRK. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By the way , whitelist works fine ,direct advertising dosen&amp;#39;t work.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168608?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 07:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45f3a0d0-e4b8-47c4-9f12-3dceed007f80</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Who decides then which phone should be connected to which peripheral, if there is no human to control the procedure?&lt;/p&gt;
&lt;p&gt;Is this controlled from the cloud?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168501?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 14:41:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:737ab8fe-0f27-4fba-a17a-dc3ad3f90914</guid><dc:creator>Pureer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My goal is to &lt;span class="gt-baf-term-text"&gt;&lt;span class="gt-baf-cell gt-baf-word-clickable"&gt;establish a connection without human &lt;span class="tlid-translation translation"&gt;&lt;span class="" title=""&gt;involved. And if there has many p&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="tlid-translation translation"&gt;&lt;span class="" title=""&gt;eripherals,it will take a lot time to find specific &lt;/span&gt;&lt;/span&gt;&lt;span class="gt-baf-term-text"&gt;&lt;span class="gt-baf-cell gt-baf-word-clickable"&gt;&lt;span class="tlid-translation translation"&gt;&lt;span class="" title=""&gt;p&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="tlid-translation translation"&gt;&lt;span class="" title=""&gt;eripheral. So I think direct advertising is a good way.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation"&gt;&lt;span class="" title=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168495?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 14:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:130dd06f-d323-4412-9adb-b68005ec62d4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Why can&amp;#39;t you bond to the phone that you want to connect to?&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t bond with the phone first you don&amp;#39;t have any guarantee that the phone will accept the connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direct advertising with unbonded Android phone's IRK</title><link>https://devzone.nordicsemi.com/thread/168351?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 03:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa6d88c0-38c8-43fc-b35b-092e59f04632</guid><dc:creator>Pureer</dc:creator><description>&lt;p&gt;Below is my code snippets&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//Global var
ble_gap_id_key_t oneplus3_key = {
    .id_addr_info={
        0,
        BLE_GAP_ADDR_TYPE_RANDOM_STATIC,
        {0x76,0x53,0xd6,0xfb,0xee,0xc0},          //one_plus3  android phone
    }
};

//........................
//........................
//........................
//........................
//........................
//........................

void init_advertising(void){
..................................................................
..................................................................
    uint8_t *oneplus3_irk_string = &amp;quot;076b01ad29fcbb56bda76d3c9adb0ec0&amp;quot;;  // adb shell ,/data/misc/bluedroid/bt_config.config grep &amp;quot;LOCAL_IRK&amp;quot;

    uint8_t temp[2];
    uint8_t *ptr = NULL;
    unsigned long ret = 0;

    for (int i = 0,j=0; i &amp;lt; BLE_GAP_SEC_KEY_LEN;i++,j+=2)
    {
        memmove(temp,&amp;amp;oneplus3_irk_string[j],sizeof(uint8_t)*2);
        ret = strtoul(temp, &amp;amp;ptr, 16);

        oneplus3_key.id_info.irk[i] = (uint8_t)ret;
    }
    // The irk is right ,I have test it in fast advertising with pm_address_resolve();
..............................................................
..................................................................



static void on_adv_evt(ble_adv_evt_t ble_adv_evt){
................................................
        case BLE_ADV_EVT_WHITELIST_REQUEST:
        {
            ble_gap_id_key_t* key_list[BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT];
            memset(key_list,0,BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT*sizeof(int));
            key_list[0] =    &amp;amp;oneplus3_key;
            sd_ble_gap_device_identities_set(key_list,NULL,1);

            ble_gap_addr_t const* whitelist_addrs_gap[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];

            ble_gap_addr_t whitelist_addrs[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
            ble_gap_irk_t  whitelist_irks[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
            uint32_t       addr_cnt = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
            uint32_t       irk_cnt  = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;

            whitelist_addrs_gap[0] = &amp;amp;oneplus3_key.id_addr_info;
            memmove(&amp;amp;whitelist_addrs[0],&amp;amp;oneplus3_key.id_addr_info,sizeof(ble_gap_addr_t));
            memmove(&amp;amp;whitelist_irks[0],&amp;amp;oneplus3_key.id_info,sizeof(ble_gap_irk_t));
            addr_cnt = 1;
            irk_cnt = 1;

            err_code = sd_ble_gap_whitelist_set(whitelist_addrs_gap, 1);
            APP_ERROR_CHECK(err_code);

            // Apply the whitelist.
            err_code = ble_advertising_whitelist_reply(&amp;amp;m_advertising,
                                                       whitelist_addrs,
                                                       addr_cnt,
                                                       whitelist_irks,
                                                       irk_cnt);
            APP_ERROR_CHECK(err_code);
        }
        break;
......................................................&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>