<?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>ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11008/ble_gap_addr_t-address-is-not-right</link><description>when phone connect to the device, I print the connected address.
However, I find that the bluetooth address is not same with the phone bluetooth address.
here is the debug infomation:
 
 peer_address is:34:40:36:59:18:01, addr_type is:CA 
 the phone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Dec 2015 07:39:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11008/ble_gap_addr_t-address-is-not-right" /><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41157?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 07:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6051903-9d93-4269-8943-110ed202cfb6</guid><dc:creator>qoboty</dc:creator><description>&lt;p&gt;I  use nRF UART V2.0 app in two different phone.
I got different peer_address.addr_type.
how to use the public address (peer_address.addr_type=0) when connect to device ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41156?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 07:34:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bfcf8f3-d0e9-4a13-a838-b61cd8f2a3e4</guid><dc:creator>qoboty</dc:creator><description>&lt;p&gt;how to set type =0  in android app ?
is there  an API ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41155?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 07:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d2155c1-9f3e-4a18-8969-974a5fa0e908</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;The address is right in both cases, when the type is &amp;#39;1&amp;#39; it&amp;#39;s a random static address which isn&amp;#39;t going to be the same as the public static address, because it&amp;#39;s random. In both cases that&amp;#39;s the address the link is using.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41154?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 07:22:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f90bd9c-afd7-4075-995a-a5679c742e32</guid><dc:creator>qoboty</dc:creator><description>&lt;p&gt;when I chang code to below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;peer_address =p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I got the correct bluetooth address sometimes. sometimes I got wrong address,when I debug peer_address.addr_type, I find out, when peer_address.addr_type=0 , peer_address is same with the phone address, when  peer_address.addr_type=1, the address is wong !
how to get the correct address whether peer_address.addr_type is 0 or not?  Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41159?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 06:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6be0f102-20ab-414c-9033-39697cca4bf5</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;@RK: I see. Thank you. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41158?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 06:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9acb99e4-8794-48a5-9b83-57fbb8456d40</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;It&amp;#39;s not a bug  - your code is correct because it gets the correct event type out of the event, his gets the &amp;#39;scan request&amp;#39; structure out, however what&amp;#39;s in there isn&amp;#39;t a scan request, so the data is wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_gap_addr_t address is not right?</title><link>https://devzone.nordicsemi.com/thread/41153?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 06:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a90994f5-e571-4270-8443-b4a93cc1d443</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;I don&amp;#39;t know whether it is a bug or not. But you can avoid this problem with modifying your code like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;peer_address = p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>