<?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>Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11280/multilink-advertising-packets-while-connecting</link><description>I&amp;#39;m experimenting with BLE multilink central S120 softdevice on pca10028 and several of my custom BLE devices based on S110 softdevice. 
 Is S120 multilink central capable of receiving advertising packets from BLE devices while establising connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Jan 2016 09:43:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11280/multilink-advertising-packets-while-connecting" /><item><title>RE: Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/thread/42432?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 09:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a90ad59-3ab2-4cc0-9ab7-2c0be04b15cf</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;With quite long advertising period (10 secs) of our peripheral devices, the short timeout (short = &amp;lt;1 sec) is not possible... We would need to decrease advertising period.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/thread/42433?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 09:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9617a37c-1a66-4b44-8e74-88efcd769917</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;What you could do is to have a short timeout on the connect, and if you receive a timeout you can alternate between scanning and connecting&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/thread/42431?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 09:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:550a498a-401a-4419-a262-31a00e854cb9</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;I can think of a solution where there will be actually two S120 centrals in our &amp;quot;central&amp;quot; physical device. One will act as advertising receiver, the second one as the device which establishes connections to peripherals. But that&amp;#39;s not optimal solution of course. Software solution would be much better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/thread/42434?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 09:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff4b1c05-10cd-4c46-83f0-5aa7c48959d1</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;Hi Pal, thank you, I&amp;#39;ll give it a try later today. Is there any solution to &amp;quot;Once the sd_ble_gap_connect have been called, you will stop receiving advertising packets.&amp;quot;? Minimizing the loss of advertising packets is quite important in our application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink advertising packets while connecting</title><link>https://devzone.nordicsemi.com/thread/42430?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 08:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a5f8143-5285-463f-8428-e9f962cb4138</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;Hi gaminn,&lt;/p&gt;
&lt;p&gt;Once the sd_ble_gap_connect have been called, you will stop receiving advertising packets.&lt;/p&gt;
&lt;p&gt;To start connection procedure to multiple devices at one time, you would have to use the whitelist instead of specifying a device to connect to.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_gap_addr_r dev_1 = {{0}, {0x55, 0x44, 0x33, 0x22, 0x11, 0x00}}; // Public device with address 0x001122334455
ble_gap_addr_r dev_2 = {{1}, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}; // Random Static device with address 0x554433221100
ble_gap_addr_t *pp_addrs[] = {&amp;amp;dev_1, &amp;amp;dev_2};

ble_gap_whitelist_t whitelist;
memset(&amp;amp;whitelist, 0, sizeof(whitelist));
whitelist.pp_addrs   = pp_addrs;
whitelist.addr_count = sizeof(pp_addrs)/sizeof(void *);

ble_gap_scan_params_t scan_params;
memset(&amp;amp;scan_params, 0, sizeof(scan_params));
scan_params.selective   = 1;
scan_params.p_whitelist = &amp;amp;whitelist;
scan_params.interval    = ...
scan_params.window      = ...
scan_params.timeout     = ...

uint32_t errcode = sd_ble_gap_connect(NULL, &amp;amp;scan_params, &amp;amp;conn_params);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;something like this might work, I have not compiled or tested it, so there might be errors&lt;/p&gt;
&lt;p&gt;[update] when you have received the first connection event, you would have to call the same connect again, but would have to remove the device that connected from the whitelist in case it continues to advertise with the same address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>