<?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>How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116796/how-to-pair-connect-with-a-mac-address</link><description>I need to connect to other units according to their MAC address. I&amp;#39;m assuming that this: 
 
 
 BT_SCAN_FILTER_TYPE_ADDR 
 
 Is the thing to use in this: 
 
 
 
 bt_scan_filter_add 
 
 So instead of this: 
 
 
 
 err = bt_scan_filter_add ( BT_SCAN_FILTER_TYPE_UUID</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Dec 2024 08:52:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116796/how-to-pair-connect-with-a-mac-address" /><item><title>RE: How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/thread/512891?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 08:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81361976-b8b4-404f-9250-bae81f099124</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;Hi. I didn&amp;#39;t specifically raise another ticket. There was a discussion going on a parallel issue and I mentioned that I wanted to try connecting with a MAC address instead and I was waiting for an answer. &lt;br /&gt;&lt;br /&gt;Sorting that has enabled me to move on to the next problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can close this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/thread/512877?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 06:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b89d6458-9967-4784-ac87-463a7a1ce905</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Seems like you got the assistance you needed from my colleague Vidar in your other ticket:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/116797/can-connect-to-uart_peripheral-by-uuid-but-can-t-connect-to-a-non-zephyr-product"&gt;Can connect to uart_peripheral by UUID, but can&amp;#39;t connect to a non-Zephyr product&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the future, try to keep to one ticket per subject, or let us know if you have multiple, so we can confer/discuss internally to avoid any miscommunication.&lt;/p&gt;
&lt;p&gt;Let me know if you have any further questions here or if this case can be closed.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/thread/512631?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 15:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a99970d4-8812-4856-8f89-d71d3fa19ca4</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;no valid text here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/thread/512629?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 15:35:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad1ac184-e140-44ac-a9dc-13d0049283aa</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;&lt;br /&gt;Thanks for that, but it&amp;#39;s not answering my question in terms of the syntax for the mac address.&amp;nbsp; I guess this:&lt;br /&gt;&lt;br /&gt;target_mac_addr&lt;br /&gt;&lt;br /&gt;is where the mac address itself is stored, but what type of variable is this?&lt;br /&gt;&lt;br /&gt;So , for example is it a string of hie kind of format:&lt;br /&gt;&lt;br /&gt;45:67:A5:76:AA:FF&lt;/p&gt;
&lt;p&gt;Or just a hex number such as &lt;br /&gt;&lt;br /&gt;4567A576AAFF&lt;/p&gt;
&lt;p&gt;Or...?&lt;br /&gt;&lt;br /&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pair/connect with a MAC address</title><link>https://devzone.nordicsemi.com/thread/512602?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 14:14:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71682de0-fa21-4e3b-af62-c0d01167783b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Try something like this (assuming there are no conflicting filters already set in your project:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Set up a filter for the MAC address you&amp;#39;re interested in connecting to:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = nrf_ble_scan_copy_addr_to_sd_gap_addr(&amp;amp;m_mac_filter, target_mac_addr);
err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_ADDR_FILTER, &amp;amp;m_mac_filter);
m_mac_filter.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Enable the address filter:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_ADDR_FILTER, false);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Setting up and enabling a filter should be done before you start scanning.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>