<?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>Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29122/connection-between-two-hidden-nrf51822-modules</link><description>Hello 
 First of all, I would like to apologize if a similar question was already asked but all this BLE matter is so broad that it defeats me.
I am planning to put two NRF51822 devices into my project. I want one of the devices to pull one of the GPIO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jan 2018 15:49:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29122/connection-between-two-hidden-nrf51822-modules" /><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115678?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 15:49:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feeec667-be02-4642-9544-c40eccd45cc4</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can use the random resolvable address type, then only trusted/bonded device will be able to resolve your address and recognize you. Again, please add a new question for this...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115679?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 11:07:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aca3da27-5c34-4a83-8170-5998074a5dfd</guid><dc:creator>Matej</dc:creator><description>&lt;p&gt;Petter thank you for rsp... I solved the problem - problem was that returned status was somehow not checked correctly...&lt;/p&gt;
&lt;p&gt;I have additional question... I choose filter policy BLE_GAP_ADV_FP_FILTER_BOTH and it seems that it works as it should... but is somehow possible to achieve that my device could not be detect by observer/scanner on devices which are not whitelisted?&lt;/p&gt;
&lt;p&gt;There is option with direct advertising - but it works only for 15 minutes, because of changing mac address... Any suggestion?&lt;/p&gt;
&lt;p&gt;Thank you for info!&lt;/p&gt;
&lt;p&gt;BR,
Matej&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115677?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 13:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c14c1503-5430-40ed-914b-43bec2cdff4c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you don&amp;#39;t see any advertising at all you are probably constantly resetting or something else. I think you should add a new question and describe your setup in detail. Of course link to this question if it is relevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115676?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 11:27:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2ea37b2-a18f-400a-9948-9de08e5ddf66</guid><dc:creator>Matej</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have similar problem... I&amp;#39;m using nrf51822, s130 and sdk 12.3.0... once I retrieve whitelist and set it to adv_params whitelist, then advertise messages are sent out only when I set fp (filter policy) to any...&lt;/p&gt;
&lt;p&gt;In case that i set it to scan/conn/both filter I won&amp;#39;t see any advertise message on phone... there is no message also on sniffer... any suggestions?&lt;/p&gt;
&lt;p&gt;Is it possible to get any additional example for BLE_GAP_ADV_FP_FILTER_SCANREQ and BLE_GAP_ADV_FP_FILTER_BOTH options? I could found only for BLE_GAP_ADV_FP_ANY and BLE_GAP_ADV_FP_FILTER_CONNREQ&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;BR,
Matej&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115675?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 15:06:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b139db83-bfcb-4639-8e97-9bc7e1de2602</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;ble_app_multilink_central example will not connect to ble_app_template example, it will connect to the ble_app_blinky example.&lt;/p&gt;
&lt;p&gt;I recommend you to use ble_app_hrs and ble_app_hrs_c as starting points. ble_app_hrs_c will try to connect to ble_app_hrs.&lt;/p&gt;
&lt;p&gt;Also, I think BLE_GAP_ADDR_TYPE_PUBLIC is incorrect, it should be BLE_GAP_ADDR_TYPE_RANDOM_STATIC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115674?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d39b9d1-ff18-4a77-962b-122f1bab1c45</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;Unfortunately, those two devices do not connect. Is the whole idea wrong?&lt;/p&gt;
&lt;p&gt;EDIT.
I just removed all whitelists from both devices and they still do not connect... even though I can connect to the advertiser with nrfConnect. Seems like central device is a problem now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115673?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfb7bddd-3ea1-447f-a92a-9df5759bfb80</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;So basically the peripheral has address of the cental in its whitelist
and central has address of peripheral in its whitelist.&lt;/p&gt;
&lt;p&gt;The only modification I made to ble_app_multilink_central example was this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ble_gap_whitelist_t  whitelist;
  ble_gap_addr_t *p_whitelist_addr[1];
  ble_gap_addr_t  whitelist_addr =
  {
		BLE_GAP_ADDR_TYPE_RANDOM_STATIC,
		{0xdb, 0x3d, 0x9d, 0xd6, 0xc6, 0x3b}
   } ; //MAC addres of pheripheral
/** @brief Scan parameters requested for scanning and connection. */
static const ble_gap_scan_params_t m_scan_params =
{
    .active   = 1, //0
    .interval = SCAN_INTERVAL,
    .window   = SCAN_WINDOW,
    .timeout  = SCAN_TIMEOUT,

    #if (NRF_SD_BLE_API_VERSION == 2)
        .selective   = 1,	//0
        .p_whitelist = &amp;amp;whitelist, // NULL,
    #endif

    #if (NRF_SD_BLE_API_VERSION == 3)
        .use_whitelist  = 0,
        .adv_dir_report = 0,
    #endif
};
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115672?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95e4ac08-ce3f-4c21-a46c-24c9076d638c</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;You are right. The type was BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE and it seems like my Android won&amp;#39;t try to connect with any other type.
So I decided to use another nrf51822 device to scan and to connect instead of nrfConnect.
I made one modification to the code I attached one answer ago. I changed whitelist of the advertiser to public.
ble_gap_addr_t  whitelist_addr = {&lt;strong&gt;BLE_GAP_ADDR_TYPE_PUBLIC&lt;/strong&gt;,{0xfc, 0x45, 0x92, 0x76, 0xc4, 0x0c}} ;&lt;/p&gt;
&lt;p&gt;Then I opened examples\ble_central\ble_app_multilink_central\pca10028\s130 as it seems to be the easiest example to modify. The comment says &lt;em&gt;Start scanning for peripherals and initiate connection to devices which advertise.&lt;/em&gt; so I assumed that adding the whitelist to the central device will result in connecting to the device which address is pointed by the whitelist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115669?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2017 15:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:138e04b1-c137-49ad-ac29-cd4d734426c9</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I tested your code. Seems to be working fine. Are you sure that also the address type is correct? You can check by letting the CAT connect (when you advertise without whitelist) and check&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr_type; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;when you get the BLE_GAP_EVT_CONNECTED event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115671?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2017 22:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00525cc0-3738-406e-8534-2865c25f9150</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;I am connecting to a smartphone. CAT S60 (Android 6.01) using nrfConnect. I also just checked it with another one also with no success. The address is correct. Here you&amp;#39;ll find the project &lt;a href="https://files.fm/u/fx4ttyy2"&gt;Click&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115670?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2017 14:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b390a954-87dc-4117-a949-426e1f75f789</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Looks correct. You are connecting to a smart phone? What kind? Are you sure the address is correct? And the type? If you can upload your complete project I can try to test it here, if you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115668?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2017 19:03:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25b87f9e-e631-4e8d-a7fb-2b2359606f6c</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;in on_adv_evt new lines are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	ble_gap_addr_t whitelist_addr = 
	{
		BLE_GAP_ADDR_TYPE_RANDOM_STATIC,
		{0xfc, 0x45, 0x92, 0x76, 0xc4, 0x0c}  //my BT phone MAC address again
	};
	ble_gap_addr_t *p_whitelist_addr = &amp;amp;whitelist_addr;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;				case BLE_ADV_EVT_WHITELIST_REQUEST:
					err_code = ble_advertising_whitelist_reply(p_whitelist_addr, 1, NULL, 0);
					APP_ERROR_CHECK(err_code);
					break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;when options.ble_adv_whitelist_enabled = true; it does not conect even though ble_advertising_whitelist_reply returns with NRF_SUCCESS
When options.ble_adv_whitelist_enabled = false it connects...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115667?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2017 18:57:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a271f4d-f5e5-443b-aa4e-2f79bc83bd9c</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;Still no success.....&lt;/p&gt;
&lt;p&gt;I added below lines to the definition of advertising_start() function.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_gap_whitelist_t  whitelist;
	ble_gap_addr_t *p_whitelist_addr[1];
	ble_gap_addr_t  whitelist_addr = {BLE_GAP_ADDR_TYPE_RANDOM_STATIC,{0xfc, 0x45, 0x92, 0x76, 0xc4, 0x0c}} ; //MAC addres of my phone
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and after memset(&amp;amp;adv_params, 0, sizeof(adv_params)); I added this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;
	adv_params.p_peer_addr = NULL; 
	adv_params.fp   = BLE_GAP_ADV_FP_ANY;
	
	p_whitelist_addr[0] = &amp;amp;whitelist_addr;

	whitelist.addr_count = 1;
	whitelist.pp_addrs = p_whitelist_addr;
	whitelist.irk_count = 0;
	whitelist.pp_irks = NULL;
	
	adv_params.p_whitelist = &amp;amp;whitelist;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115666?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2017 15:51:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f5777c-0b72-4aa3-bc3a-707ba5380d78</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;sd_ble_gap_whitelist_set() is not supported by S130.&lt;/p&gt;
&lt;p&gt;The whitelist has be set when you start to advertise:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief GAP advertising parameters.*/
typedef struct
{
  uint8_t               type;                 /**&amp;lt; See @ref BLE_GAP_ADV_TYPES. */
  ble_gap_addr_t       *p_peer_addr;          /**&amp;lt; For @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND mode only, known peer address. */
  uint8_t               fp;                   /**&amp;lt; Filter Policy, see @ref BLE_GAP_ADV_FILTER_POLICIES. */
  ble_gap_whitelist_t  *p_whitelist;          /**&amp;lt; Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used. */
  uint16_t              interval;             /**&amp;lt; Advertising interval between 0x0020 and 0x4000 in 0.625 ms units (20ms to 10.24s), see @ref BLE_GAP_ADV_INTERVALS.
                                                   - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for high duty cycle directed advertising.
                                                   - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, set @ref BLE_GAP_ADV_INTERVAL_MIN &amp;lt;= interval &amp;lt;= @ref BLE_GAP_ADV_INTERVAL_MAX for low duty cycle advertising.*/
  uint16_t              timeout;              /**&amp;lt; Advertising timeout between 0x0001 and 0x3FFF in seconds, 0x0000 disables timeout. See also @ref BLE_GAP_ADV_TIMEOUT_VALUES. If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for High duty cycle directed advertising. */
  ble_gap_adv_ch_mask_t channel_mask;         /**&amp;lt; Advertising channel mask. See @ref ble_gap_adv_ch_mask_t. */
} ble_gap_adv_params_t;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also let the advertising module handle it.&lt;/p&gt;
&lt;p&gt;Add options.ble_adv_whitelist_enabled = true; in advertising_init().&lt;/p&gt;
&lt;p&gt;Then you need to handle the BLE_ADV_EVT_WHITELIST_REQUEST event that you get in on_adv_evt(), by replying with ble_advertising_whitelist_reply().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115664?ContentTypeID=1</link><pubDate>Sun, 26 Nov 2017 22:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4709adae-7479-401b-8c4f-a60ebcccba16</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;Anyway. I am stuck at point 1 of my list...
I am using SDK_12.2.0, S130
I work with examples/ble_peripheral/ble_app_template and nRF Connect on my mphone.&lt;/p&gt;
&lt;p&gt;After adding sd_ble_gap_whitelist_set function when I try to build the project I get:
Error: L6218E: Undefined symbol sd_ble_whitelist_set (referred from main.o).
Is it sdk_config.h? If so I cannot find anything that would enable that function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115663?ContentTypeID=1</link><pubDate>Sun, 26 Nov 2017 22:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e2f39d0-b1bc-4c71-bd6e-008ba7908838</guid><dc:creator>vldzero</dc:creator><description>&lt;p&gt;Thanks Petter
The device will be a simple wirelessly controlled relay. While the slave is in range of central one the relay controlled by the master will energize. It is all part of a bigger system but BLE will play an essential role.
With your input and my tiny knowledge about BLE, I simplified the list.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The slave will advertise with a whitelist. I won&amp;#39;t use random resolvable address for now since it would take me too much time. When the device is functional I will have time to improve the safety.&lt;/li&gt;
&lt;li&gt;Slave will run service where an ID will be stored. If the ID is accepted by the master it will energize the relay.&lt;/li&gt;
&lt;li&gt;If the device is out of range master will de-energize the relay.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115662?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2017 16:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72ecfeea-202f-43ba-b9fb-ed51dde444f3</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;So I would do something like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use random resolvable address, don&amp;#39;t put confidential information into the advertising packet. Advertise with whitelist to reject connection requests from unknown masters.&lt;/li&gt;
&lt;li&gt;Figure out how to pair and bond safely. Only allow the one central to bond.&lt;/li&gt;
&lt;li&gt;Use a big advertising interval on the peripheral to save power, use aggressive scanning on the central if you want short latency on establishing connection. You should tune this.&lt;/li&gt;
&lt;li&gt;After connection is established, use the RSSI to estimate the range between the devices.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection between two hidden NRF51822 modules</title><link>https://devzone.nordicsemi.com/thread/115665?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2017 16:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ba24260-6848-4556-b314-699e4cfd2c42</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what you mean by undiscoverable, the peripheral/slave has to advertise for the central/master to know that it is there.&lt;/p&gt;
&lt;p&gt;The central/master doesn&amp;#39;t advertise, it scans, the peripheral/slave advertise.&lt;/p&gt;
&lt;p&gt;You can use a private resolve address in the peripheral to enforce privacy. Then if it bonds with the central only the central will be able to resolve the address and recognize the peripheral.&lt;/p&gt;
&lt;p&gt;What you need to figure out is how to pair. Can you pair these devices in a safe environment? Do they have any inputs or output? Can they use a preshared key? It is a bit difficult to recommend something when I know so little about your application, maybe you can explain a bit more?&lt;/p&gt;
&lt;p&gt;The only option for measuring estimating the range is by using RSSI, Received Signal Strength Indication, so you can look into that. Many questions in here about that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>