<?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>nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46433/nrf840---s140-how-to-fetch-mac-addresses-of-surrounding-mobile-devices-during-nrf52840-scanning-using-bluetooth-5</link><description>Hello Nordic Team, We are using nRF52840 ble chip with S140 nordic stack and SDK 15.2.0 on the SEGGER IDE installed on the Windows OS. We want nRF52840 chip to detect surrounding mobile devices and also nRF52840 can fetch MAC addresses of mobile devices</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jun 2019 06:54:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46433/nrf840---s140-how-to-fetch-mac-addresses-of-surrounding-mobile-devices-during-nrf52840-scanning-using-bluetooth-5" /><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/190418?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 06:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7149888-0b26-4e07-90e4-3a9353f200cb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Bharat,&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]We found that peer manager is using fstorage for storing of the peer data.[/quote]
&lt;p&gt;The peer manager uses &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds.html?cp=5_1_3_55"&gt;FDS&lt;/a&gt;, which is a simple file system. It reserves a configurable number of flash pages, and use that to store records of information. The FDS in turn use &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fstorage.html?cp=5_1_3_56"&gt;fstorage&lt;/a&gt; for low-level flash access. Fstorage is just a library that allows you to access low-level flash operations (write and erase) in a simple way and abstracts away differences when using SoftDevice or not.&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Can we store password at any fixed location using fstorage&amp;nbsp; ??[/quote]
&lt;p&gt;Yes, that is no problem. However, you need to make sure that there is no conflict with any other users of the flash. If you want to be able to update it, you should probably reserve a flash page for it. Alternatively, you can use FDS.&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]We tried storing password at fixed location using fstorage but program execution is stopped.[/quote]
&lt;p&gt;If program execution was affected that could indicate that you are overwriting parts of the flash that is used for something else. Have you debugged to see what happens? Do you get an error form a fstorage API call, or something else? Are you sure you are writing to a part of flash that is unused by?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/190404?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 05:00:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16609ede-8d38-41c7-9a4d-2e944a4045bd</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for your support.&lt;/p&gt;
&lt;p&gt;We want a nRF52 flash fixed location where we can store Password and which can not be disturbed by any part of the code.&lt;/p&gt;
&lt;p&gt;We found that peer manager is using fstorage for storing of the peer data.Can we store password at any fixed location using fstorage&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;We tried storing password at fixed location using fstorage but program execution is stopped.&lt;/p&gt;
&lt;p&gt;We have taken nRF_App_Proximity example as a reference and added NUS service.&lt;/p&gt;
&lt;p&gt;It would be grateful if you could suggest for the same.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185828?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 06:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbffeaa7-27ad-4d77-8e43-e8b6d7aaddc5</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;sd_ble_gap_disconnect() returns&amp;nbsp;BLE_ERROR_INVALID_CONN_HANDLE, then it means just what the name of the error code indicates: you have not provided a valid connection handle. You get the connection handle when you get the&amp;nbsp;BLE_GAP_EVT_CONNECTED event, and with any other BLE events that are used for this connection. You must keep this handle somehow (for instance in a static variable of some sort, and provide it to sd_ble_gap_disconnect() to&amp;nbsp;close the connection. Also note that this handle is no longer valid if the connection has been closed, since then it does not exist anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185822?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 05:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e0b265-454d-4c20-89b3-a1d47d402b2e</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;Thanks for the support.&lt;/p&gt;
&lt;p&gt;We are checking condition whether smart phone is connected or not and also peer address is resolved or not in the main loop.&lt;/p&gt;
&lt;p&gt;Now, if address of connected smart phone is not resolved then we are disconnecting the connection using the function &lt;span class="tL8wMe EMoHub" style="text-align:left;" id=":3i.co" dir="ltr"&gt;err_code = sd_ble_gap_disconnect(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION)&amp;nbsp; .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;However, this function returns &lt;span class="tL8wMe EMoHub" style="text-align:left;" id=":45.co" dir="ltr"&gt;ERROR:&amp;nbsp;BLE_ERROR_INVALID_CONN_HANDLE and nRF52840 gets reset.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;Could you please tell us what is reason for this cause and how to resolve it.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;Regards&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;Bharat&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tL8wMe EMoHub" style="text-align:left;" dir="ltr"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185428?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 10:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:929d6f93-f79f-4736-bdf3-a5fe63d2737e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Bharat,&lt;/span&gt;&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Can we differentiate between process trying to connect with nRF52840 is from nRF Connect application or from bluetooth pairing on the smart phone at time of&amp;nbsp; event ble_gap_evt_connected().[/quote]
&lt;p&gt;&lt;span&gt;I cannot think of any way you can distinguish between&amp;nbsp;app is used on the phone when you get the&amp;nbsp;BLE_GAP_EVT_CONNECTED event. Essentially all the information you get is what you can see in &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/structble__gap__evt__connected__t.html?cp=3_4_2_1_2_1_4_21"&gt;ble_gap_evt_connected_t&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Our application requires&amp;nbsp; decision&amp;nbsp; whether user is trying to connect from nRF Connect App or bluetooth settings(pairing or bonding)&amp;nbsp; in the phone.[/quote]
&lt;p&gt;I think the only way to do this is to send some data (write to a characteristic) from nRF Connect (or perhaps your custom app in the future), indicating that this is what have connected. If this magic data is not written, you can assume that the user is using the native Bluetooth support in the phone (via the settings app).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185330?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 06:27:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:736c5924-a004-4b10-87d6-bd70604f6a6f</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for the support.&lt;/p&gt;
&lt;p&gt;Can we differentiate between process trying to connect with nRF52840 is from nRF Connect application or from bluetooth pairing on the smart phone at time of&amp;nbsp; event ble_gap_evt_connected().&lt;/p&gt;
&lt;p&gt;Our application requires&amp;nbsp; decision&amp;nbsp; whether user is trying to connect from nRF Connect App or bluetooth settings(pairing or bonding)&amp;nbsp; in the phone.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185038?ContentTypeID=1</link><pubDate>Fri, 03 May 2019 06:53:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddf2310e-6087-4de0-905f-2fc320a812cf</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Bharat,&lt;/p&gt;
&lt;p&gt;The sd_ble_gap_disconnect() function will return&amp;nbsp;NRF_ERROR_INVALID_STATE if there is no active connection. See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=3_4_2_2_2_1_2_18#ga4031d0e4034c6f5900ad6d35b763fb0d"&gt;sd_ble_gap_disconnect()&amp;nbsp; API doc&lt;/a&gt;&amp;nbsp;for details. If you know that you have an active connection, then the reason could be that the conn_handle you have provided is not for the connection you indented.&lt;/p&gt;
&lt;p&gt;The fact that the system is reset is just due to the error handling in your application. The SDK error handler in the SDK examples reset by default on any error, unless you have built the application with DEBUG defined (for instance by selecting the Debug build configuration if you are using SES). This is because resetting is often a sensible way to recover from an error that should not have occurred.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/185025?ContentTypeID=1</link><pubDate>Fri, 03 May 2019 04:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df6f78d1-856d-47b1-ae2f-7aedcd213396</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;Our application needs that when address is not resolved at that time nRF52840 must be&amp;nbsp; able to disconnect with smart phone.&lt;/p&gt;
&lt;p&gt;we are using function sd_ble_gap_disconnect in the ble_evt_handler with the case BLE_GAP_EVT_CONNECTED&amp;nbsp; , however when&amp;nbsp; this function executes, it disconnects with smart phone and it gives following error.&lt;/p&gt;
&lt;p&gt;Error 8 [NRF_ERROR_INVALID_STATE]&lt;/p&gt;
&lt;p&gt;Fatal error and System Reset.&lt;/p&gt;
&lt;p&gt;Can you please suggest us possible reason behind this ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184815?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 09:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b97a8843-ecfb-4704-a715-66f8794b3ecb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Bharat,&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Can we get IRK key from smart phone directly without bonding with nRF52840&amp;nbsp; ??[/quote]
&lt;p&gt;I am not aware of any way of obtaining the RK from smart phones (iOS or Android) without bonding.&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Is this possible or not ?&amp;nbsp; if not can you please suggest any other alternatives for the same ?[/quote]
&lt;p&gt;This is application specific and I do not have a full overview of your application. It is possible to transfer the list of IRK&amp;#39;s and MAC address when scanning to the RPi. From my perspective it does not matter much if you resolve the IRK on the nRF and report back to the RPi if it is known or not, or if you send both the IRK and MAC to the RPi. The advantage of doing it on the nRF is perhaps that you have it working already using the Peer manager, so it might save you some time. On the other hand, it might give you more flexibility to do it on the RPi, but I cannot say which is more sensible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184658?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 04:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37301152-5617-4ecd-8c51-990622704c48</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thank you very much for your inputs.&lt;/p&gt;
&lt;p&gt;Can we get IRK key from smart phone directly without bonding with nRF52840&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;In our application, nRF52840 is connected to Raspeberry pi controller using UART. We are using nRF52840&amp;nbsp; for authentication purpose only.&lt;/p&gt;
&lt;p&gt;Now, We are able to resolve address using peer manager&amp;nbsp; but we are having concern that how Raspeberry pi controller can decide who is authenticated mobile or not. For that we can put authenticated IRK list in the software so that when rasprberry pi controller receives IRK from nRF52840, it can compare with the predefined list and take the decision.&lt;/p&gt;
&lt;p&gt;Is this possible or not ?&amp;nbsp; if not can you please suggest any other alternatives for the same ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184442?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 07:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71f67a16-5b00-41e2-9319-a4347c9962dd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Bharat,&lt;/p&gt;
&lt;p&gt;Using the S132 on the nRF52840 is not recommended or supported. We do not test it, nor does it support any of the additional features of the nRF52840. Lastly it is not Bluetooth qualified together with the nRF52840.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184425?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 04:08:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f60f4a35-9aed-4ed0-a52a-01d17f68b882</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;Can we use S132 SoftDevice&amp;nbsp; for the&amp;nbsp; nRF52840&amp;nbsp; as we are planning to use it on the Arduino IDE&amp;nbsp; since we could not find S140 SoftDevice for the Arduino IDE.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184250?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2019 09:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fab4da80-59cf-453e-b1e5-b64b2a132945</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]IRK for bonded device is fixed or variable&amp;nbsp; ??[/quote]
&lt;p&gt;The IRK is typically fixed for the lifetime of a device. It is possible to change it, but in that case any already bonded devices will not be able to resolve the address any more (since it is derived from a new IRK that is different from what they got during the bonding procedure).&lt;/p&gt;
&lt;p&gt;[quote user="bharatg@lumiumdesign.com"][/quote]&lt;/p&gt;
&lt;p&gt;Can you please tell us more about working of resolving process using&amp;nbsp; these&amp;nbsp; functions pm_address_resolve() and pm_peer_id_list().&lt;/p&gt;
&lt;p&gt;If possible, can you please share the document related to this procedure.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We do not have any documentation that describes it, but it is quite straight-forward:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get the MAC address you want to resolve (typically from a advertising packet in this case).&lt;/li&gt;
&lt;li&gt;Check that the MAC address type is a private resolvable address. If no, then just use the MAC address as is. This is indicated by the most significant bits in the address.&lt;/li&gt;
&lt;li&gt;If the MAC address is resolvable, iterate over the IRK&amp;#39;s you have by using&amp;nbsp;pm_peer_id_list(). Call&amp;nbsp;pm_address_resolve() with the MAC address you want to resolve and a IRK, and iterate through the list of IRK&amp;#39;s until you get a match or the end of the list. If you get a match, stop as you have already resolved it. If you don&amp;#39;t get a match you know that this address was derived from an IRK which you don&amp;#39;t have, so you cannot resolve it.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/184201?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2019 04:26:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:253b7b96-e804-4b85-81ab-90c6ac5ec5da</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;IRK for bonded device is fixed or variable&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;Can you please tell us more about working of resolving process using&amp;nbsp; these&amp;nbsp; functions pm_address_resolve() and pm_peer_id_list().&lt;/p&gt;
&lt;p&gt;If possible, can you please share the document related to this procedure.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183843?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 13:32:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd2230d7-b140-4010-9a8a-cbf0779922d6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;If you use whitelist scanning, then this can be handled by the AAR peripheral, but it would filter out any other advertising packets, so this is probably not what you want if I understood your use case correct (track any BLE advertisers in range). Therefor you probably want to use&amp;nbsp;pm_address_resolve(), and iterate over all IRK you have in the list of bonded devices.&amp;nbsp;You can get a list of all bonds using&amp;nbsp;pm_peer_id_list().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183802?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:476c4058-02b6-4441-b8cb-d737fa627193</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Could you please elaborate resolving process for the peer address&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;If peer address changes and if we resolves it again&amp;nbsp; then how can we come conclude that it is same peer&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;where can we get the IRK&amp;nbsp; in the stack ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183793?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:10:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8408189-c01a-45e2-9678-f88b37bce5a1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You cannot get the MAC address of the peer from the IRK directly. However,&amp;nbsp;you can resolve the MAC address based on the IRK. That is: when you have obtained both the IRK and a MAC address of the peer you can verify that the MAC address is derived from the IRK. So, when the MAC address change, you can resolve it again and know that even if it changed, it was from the same peer (same IRK).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183778?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 11:46:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40344738-8e76-4242-a7a3-3ec468f962df</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;This way we get an private resolvable address of the connected device but how we can get public address(MAC) using IRK and peer manager.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183755?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 11:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:242359aa-c9d2-49cd-b7ef-6f7f18abea86</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are acting as peripheral&amp;nbsp;you will get the MAC address of the connected central in the BLE event handler (ble_evt_handler() in most SDK examples) when it handles the&amp;nbsp;BLE_GAP_EVT_CONNECTED event. You should find it as something like&amp;nbsp;p_ble_evt-&amp;gt;gap_evt.connected.peer_addr.addr, as a 6 byte uint8_t array.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183714?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 09:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53ba999-466c-419d-af20-0a4cfd2c2bbd</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Thanks for the suggestions.&lt;/p&gt;
&lt;p&gt;We have gone through ble_app_proximity example for understanding of peer manager and found that pm_evt_handler is event handler during bonding.&lt;/p&gt;
&lt;p&gt;How can we get MAC address of the connected device from this event handler&amp;nbsp;&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183519?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 13:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17728df7-3274-455c-bad7-0d5c2e901491</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]What coud be possible reason for this&amp;nbsp; ??[/quote]
&lt;p&gt;On the nRF side, you sould get a disconnect reason indicating why. A typical reason for the nRF or phone to disconnect when you use bonding is if you have deleted bonding information on one side. In that case, you will either see that the peer attempts to encrypt the link, but the bond does not exist on the other side. Alternatively the peer with no bonding information will try to bond, but the peer will refuse bonding as it is allready bonded. You should make sure to delete bonding information on both sides in this case, or alternatively configure the nRF to allow repairing.&lt;/p&gt;
&lt;p&gt;[quote user="bharatg@lumiumdesign.com"][/quote]&lt;/p&gt;
&lt;p&gt;2. In ble_app_uart&amp;nbsp; pheripheral example, Device manager is used instead of peer manager. can you guide us for implementing peer manager in place of device manager&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;It would be helpful if you could guide us for the above.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The device manager is legacy software and is no longer supported, and should not be used. It does not exist in any SDK with production support for nRF52840 (&amp;gt;= 15.0.0).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183506?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 13:25:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4c95fd9-cdda-41d0-8583-dfece1bfe065</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for your support.&lt;/p&gt;
&lt;p&gt;1 . We have tried peer manager&amp;nbsp; programs like ble_app_proximity and ble_app_hids_keyboard, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , however it connects initially and disconnects immediately.&lt;/p&gt;
&lt;p&gt;We are using nRF UART v2.0 to connect with nRF52840.&lt;/p&gt;
&lt;p&gt;What coud be possible reason for this&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;2. In ble_app_uart&amp;nbsp; pheripheral example, Device manager is used instead of peer manager. can you guide us for implementing peer manager in place of device manager&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;It would be helpful if you could guide us for the above.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183331?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 07:59:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c66a3c3-2638-4f2c-bd74-e05da5a866b6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Where bonding initiated by smart phone is detected in the stack&amp;nbsp; ?[/quote]
&lt;p&gt;When acting as a peripheral, the nRF has to start connectable advertising. Then a central can connect, which is signaled to the device (see &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___c_o_n_n___m_s_c.html?cp=3_4_2_1_2_1_3_8"&gt;Peripheral Connection Establishment and Termination&lt;/a&gt;). Subsequently pairing/bonding can be initiated by either peer, in several ways. See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___p_e_r_i_p_h___s_e_c___m_s_c.html?cp=3_4_2_1_2_1_3_10"&gt;Peripheral Security Procedures&lt;/a&gt;. Handling pairing and bonding is quite complex, so I do not recommend that you use the&amp;nbsp;SoftDevice APIs directly. Instead, you should use the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_peer_manager.html?cp=5_0_3_2_7"&gt;peer manager&lt;/a&gt;, as is also done in all&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/examples_ble_peripheral.html?cp=5_0_4_2_2"&gt;BLE peripheral examples&lt;/a&gt;&amp;nbsp;in the SDK that support connections.&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Let&amp;#39;s assume that android phone is bonded with nRF52840, How we can get IRK from the event handler&amp;nbsp; ??[/quote]
&lt;p&gt;The IRK is exchanged during the bonding procedure and stored in flash by the peer manager, and can be obtained from there.&amp;nbsp;The Peer manager also supports resolving MAC addresses, so that you can see if the MAC represents the device you are searching for (pm_address_resolve()). This can also be done in HW by the radio&amp;nbsp;if you use whitelisting, but that does not seem sensible in a product where you want to scan and track any device.&lt;/p&gt;
[quote user="bharatg@lumiumdesign.com"]Can we channge bluetooth range from 9 meters to 5 meters&amp;nbsp; ?[/quote]
&lt;p&gt;You cannot determine the range on such exact levels. Rang depends on a lot of of the product which you can control &lt;em&gt;fairly&lt;/em&gt; good: PCB layout, antenna, antenna matching, housing etc. There is also a significant chip-to-chip variation. Then there is factors that is difficult to control. How is the product positioned in the environment? Is it covered by a human some times? is there line of sight, or are there reflections? This tends to change all the time in a real world situation.&lt;/p&gt;
&lt;p&gt;However, you can influence the range of transmitted signals by selection a lower TW power. For receiving signals (as this case is about a device scanning for mobile phones which are advertising), you have no such method. However the scan report from the SoftDevice will include the RSSI, which is the power of the received signal. You can chose to filter out signals with a low RSSI in your application based on that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183088?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 11:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60bdfecd-2a55-42e3-b303-feec59d2fa74</guid><dc:creator>Bharat</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;Thank you very much for your support.&lt;/p&gt;
&lt;p&gt;Where bonding initiated by smart phone is detected in the stack&amp;nbsp; ? and which stack nRF52840 should use either peripheral or central ?&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s assume that android phone is bonded with nRF52840, How we can get IRK from the event handler&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;Can we channge bluetooth range from 9 meters to 5 meters&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Bharat&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF840 - S140 : How to fetch MAC addresses of surrounding  mobile devices during nRF52840 scanning using Bluetooth 5.</title><link>https://devzone.nordicsemi.com/thread/183077?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 10:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e1a8742-e1ab-4283-b633-5b40fdb9267f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Modern phones will typically always use&amp;nbsp;Random private resolvable address for privacy reasons (prevent tracking), so you cannot obtain a public MAC address. The phones will change the resolvable address regularly, and when it does you cannot know that it is the same phone as before, unless you have the Identity Resolving Key (IRK). Moreover, the IRK cannot be obtained by passively listening to advertising packets, and the only standardized way to obtain the IRK is to bond with the device.&lt;/p&gt;
&lt;p&gt;In a nutshell it seems like you want to implement something similar to tracking, and that is effectively prevented by the privacy feature of BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>