<?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>Can a peripheral retrieve a phone&amp;#39;s name after connected?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112058/can-a-peripheral-retrieve-a-phone-s-name-after-connected</link><description>Hi, We have a device configured as a peripheral and want to provide the user with the peer device name typically connected to it, like the device name. Typically a phone will connect to our device. Is this possible? If so, do you have any examples in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Jun 2024 15:58:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112058/can-a-peripheral-retrieve-a-phone-s-name-after-connected" /><item><title>RE: Can a peripheral retrieve a phone's name after connected?</title><link>https://devzone.nordicsemi.com/thread/489585?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 15:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c043a12-e523-4fb9-9ce4-5e44dda3d7b3</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi kpreiss,&lt;/p&gt;
&lt;p&gt;Sorry, this took a while.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I understand your concern correctly, it&amp;#39;s&amp;nbsp;that you cannot control when the 3rd party device will initiate service discovery, and thus simultaneous discoveries might happen, correct?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;I could only go into a little depth with the NCS-based Peripheral. I cannot comment on the capability of the Central. I can only say that the Bluetooth Spec does not forbid&amp;nbsp;simultaneous discovery.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;For the Peripheral app here, the Zephyr Bluetooth Host allocates a new buffer each time there is a new GATT request.&amp;nbsp;So, the failure&amp;nbsp;conditions are somewhat like mallocs, where a lot of requests have been queued up.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Meanwhile, the remote Client can send at most one request at a time, and the app&amp;#39;s own Discovery will also only queue one request at a time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Additionally, the Central&amp;#39;s GATT Server usually contains just the bare minimum GAP characteristics, so the discovery of the Central&amp;#39;s Server will complete quickly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Considering all of that, as&amp;nbsp;long as EATT is not being used and the application does not perform other requests while performing the discovery&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span dir="ltr"&gt;, it shouldn&amp;#39;t be an issue.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;I setup a slightly modify pair of Peripheral UART and Central UART samples,&amp;nbsp;where both devices try to discovery service as soon as they are connected. It&amp;nbsp;works fine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/c328916_5F00_concurrent_5F00_discovery.zip"&gt;devzone.nordicsemi.com/.../c328916_5F00_concurrent_5F00_discovery.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please remember that this is meant to be a demonstration and&amp;nbsp;not a representative for all cases. Thorough testing of your system is always necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can a peripheral retrieve a phone's name after connected?</title><link>https://devzone.nordicsemi.com/thread/488751?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 20:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db929a45-ca18-408f-8513-b517594d75a0</guid><dc:creator>kpreiss</dc:creator><description>&lt;p&gt;Thank you Hieu,&lt;br /&gt;&lt;br /&gt;The simultaneous discovery is a requirement because we already have 3rd party developers who are querying the GATT server in the peripheral.&amp;nbsp; &amp;nbsp;If it&amp;#39;s not supported, would an error be returned informing the higher level application to retry characteristic discovery?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can a peripheral retrieve a phone's name after connected?</title><link>https://devzone.nordicsemi.com/thread/488750?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 20:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21d091eb-f6f4-46da-bde0-46721a0f73a9</guid><dc:creator>Hieu</dc:creator><description>[quote user="kpreiss"]What is the process for finding the central&amp;#39;s server characteristics?[/quote]
&lt;p&gt;The process for the Peripheral discovering the Central&amp;#39;s GATT Server is exactly the same as the one for&amp;nbsp;the Central discovering the Peripheral&amp;#39;s GATT Server.&lt;/p&gt;
[quote user="kpreiss"]Can the central be discovering the characteristics in the peripheral GATT server at the same time the peripheral is discovering the characteristics in the central GATT server?[/quote]
&lt;p&gt;I am not actually very sure myself. Is this&amp;nbsp;simultaneous discovery an important requirement? Discovering a Central&amp;#39;s GATT Server is usually very fast, because&amp;nbsp;such server usually only has the GAP Service.&lt;/p&gt;
[quote user="kpreiss"]Do you have nrf Connect SDK examples of this?[/quote]
&lt;p&gt;You can just refer to the GATT Client code in Central samples.&lt;/p&gt;
[quote user="vthieu"]I am trying to&amp;nbsp;understand the spec to see if the GATT Server is always required. I will get back to you on that soon.[/quote]
&lt;p&gt;A colleague helped me found that the spec does require that the Central has a GATT Server.&amp;nbsp;You can expect to find the GAP Service and Device Name Characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can a peripheral retrieve a phone's name after connected?</title><link>https://devzone.nordicsemi.com/thread/488716?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 14:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5490e8ee-75b3-40d8-b63d-545deab3dba6</guid><dc:creator>kpreiss</dc:creator><description>&lt;p&gt;Ok, thank you.&amp;nbsp; What is the process for finding the central&amp;#39;s server characteristics?&amp;nbsp; Can the central be discovering the characteristics in the peripheral GATT server at the same time the peripheral is discovering the characteristics in the central GATT server?&amp;nbsp; Do you have nrf Connect SDK examples of this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can a peripheral retrieve a phone's name after connected?</title><link>https://devzone.nordicsemi.com/thread/488682?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 13:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a689b81-654e-4fe3-bef6-acceba9871df</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi kpreiss,&lt;/p&gt;
&lt;p&gt;If the central device hosts a GATT Server, there will be a mandatory GAP Service, where the Device Name can be read (refer to Bluetooth Specification, Vol 3, Part C, Section 12).&lt;/p&gt;
&lt;p&gt;I am trying to&amp;nbsp;understand the spec to see if the GATT Server is always required. I will get back to you on that soon.&lt;/p&gt;
&lt;p&gt;Similarly, the GATT Server could also include an optional &lt;a href="https://www.bluetooth.com/specifications/specs/device-information-service-1-1/"&gt;Device Information Service&lt;/a&gt;, where the Device Name is also a characteristic.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>