<?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>Discovery DIS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77045/discovery-dis</link><description>Hello, 
 I use nrf52840-dk as central_hr and nrf52833-dk as peripheral_hr, examples from NRF Connect SDK. 
 It works well, but I want to implement reading Device Information like Model Number String on my central device. 
 I can read it on my phone, using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jul 2021 08:11:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77045/discovery-dis" /><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/319947?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 08:11:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bcf6cbe-53f7-4ef6-bca6-78c9e3f47834</guid><dc:creator>anSolo</dc:creator><description>&lt;p&gt;I&amp;#39;ve created message on zephyr mailing list&lt;/p&gt;
&lt;p&gt;I write here, If any updates&lt;/p&gt;
&lt;p&gt;Thank you for the help!&lt;/p&gt;
&lt;p&gt;Please, keep&amp;nbsp;me updated If nordic developers find a solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/319798?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 12:55:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9afeea5e-98ca-4fb0-a7c3-c5d44f2dd3e1</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It seems like most of the developers are on vacation. Can you forward the question to any of these places:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/guides/getting-help.html#asking-for-help"&gt;Zephyr - Asking for help&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you find a solution, would you be able to share it here, so other people can benefit?&lt;/p&gt;
&lt;p&gt;However, I think a workaound is to run&amp;nbsp;&lt;code&gt;bt_gatt_read()&lt;/code&gt; &lt;strong&gt;two&lt;/strong&gt; times, with&amp;nbsp;&lt;code&gt;dis-&amp;gt;read_params.handle_count&amp;nbsp; = 1;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/319625?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 14:13:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b4e0a7f-bae3-4bbc-a417-0d17aecc9d9e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m able to reproduce it. I&amp;#39;m not sure how to go about this, so I have forwarded the question internally. I will keep you updated.&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: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/319316?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 09:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b9935d3-786d-456c-81e8-e749a7eb9e90</guid><dc:creator>anSolo</dc:creator><description>&lt;p&gt;I do the same as in the example you provide,&lt;/p&gt;
&lt;p&gt;Maybe I didn&amp;#39;t describe it correctly,&lt;/p&gt;
&lt;p&gt;the problem is that&amp;nbsp;in multiply read I get one callback and one length for all values,&lt;br /&gt;and I don&amp;#39;t understand how to split it, and what value for what characteristic is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/319105?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 09:23:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a9c24b9-c818-4c14-a245-e2a8272016e5</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I took a brief look at it yesterday, but I would need some more time to understand this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One option is to run&amp;nbsp;bt_gatt_read with a single handle two times.&lt;/p&gt;
&lt;p&gt;You could also take a look at &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/7c0e0b97d5bae1c3c51c540c8d14aca33437785f/subsys/bluetooth/shell/gatt.c#L341-L349"&gt;zephyr/subsys/bluetooth/shell/gatt.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/318881?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 06:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e78beeed-ebd9-4110-93dc-93fc4d07b54c</guid><dc:creator>anSolo</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/central_5F00_and_5F00_peripheral.rar"&gt;devzone.nordicsemi.com/.../central_5F00_and_5F00_peripheral.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here you can see my code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/318749?ContentTypeID=1</link><pubDate>Tue, 06 Jul 2021 09:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc9f1ef4-1227-4124-89e8-cd2190be4bb1</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you upload the code for&amp;nbsp;&lt;span&gt;central_hr and peripheral_hr in zipped format, so I can better understand what you&amp;#39;re trying to do?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/318555?ContentTypeID=1</link><pubDate>Mon, 05 Jul 2021 07:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aecd69b-b74e-4387-a168-d405860b57c4</guid><dc:creator>anSolo</dc:creator><description>&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;I tried it and it works!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I have question about&amp;nbsp;&lt;strong&gt;bt_gatt_read&lt;/strong&gt;&lt;span&gt;().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;dis-&amp;gt;read_params.func = gatt_read_cb;
dis-&amp;gt;read_params.handle_count  = 2;
dis-&amp;gt;read_params.handles = dis_handles;
err = bt_gatt_read(dis-&amp;gt;conn, &amp;amp;(dis-&amp;gt;read_params));&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;nbsp;read two values,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BT_UUID_DIS_MODEL_NUMBER, which is &amp;quot;Model&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and&amp;nbsp;BT_UUID_DIS_SERIAL_NUMBER, with value &amp;quot;serial&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here you can see part of my log,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;gatt read cb

data length 11

data = Modelserial

gatt read cb

data length 0

empty data&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1)Is it OK that I get common length for two values, and values are not separated?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How could I split them?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2)Is it OK that I get extra callback with zero length?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery DIS</title><link>https://devzone.nordicsemi.com/thread/318482?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 15:01:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f82c1fa-cfff-48fe-a61d-c3f0e54a965f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi anSolo,&amp;nbsp;&lt;br /&gt;I haven&amp;#39;t tried on my own to discover and read DIS characteristic, but you can refer to the&amp;nbsp;bt_bas_handles_assign to do something similar.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So you need to make a similar function and instead of assign the BAS service , you call&amp;nbsp;&lt;br /&gt;if (bt_uuid_cmp(gatt_service-&amp;gt;uuid, &lt;strong&gt;BT_UUID_DIS&lt;/strong&gt;)) {&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After that you need to&amp;nbsp;look for the characteristics inside the DIS service, for BAS it&amp;#39;s handled in&amp;nbsp;bt_bas_handles_assign()&lt;/p&gt;
&lt;p&gt;So instead of&amp;nbsp;bt_gatt_dm_char_by_uuid(dm, BT_UUID_BAS_BATTERY_LEVEL); you can call&amp;nbsp;&lt;span&gt;bt_gatt_dm_char_by_uuid(dm, BT_UUID_DIS_MODEL_NUMBER); After that you need to get the characteristic handle using&amp;nbsp;bt_gatt_dm_desc_by_uuid()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After you get the characteristic handle, you can do a read of the characteristic using&amp;nbsp;&lt;strong&gt;bt_gatt_read&lt;/strong&gt;(). Note that the DIS service doesn&amp;#39;t support notification, so unlike the BAS service, you don&amp;#39;t enable notification, you do a read instead.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>