<?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>bt_gatt_discover() always returns empty attribute argument to callback function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123163/bt_gatt_discover-always-returns-empty-attribute-argument-to-callback-function</link><description>Hello! I&amp;#39;ve been trying to do the same project for about a month now - just a simple keyboard adapter that takes the input from a keyboard and translates it into HID signals to my laptop. Right now, I&amp;#39;m trying to read the GATT characteristics of the keyboard</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Jul 2025 08:26:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123163/bt_gatt_discover-always-returns-empty-attribute-argument-to-callback-function" /><item><title>RE: bt_gatt_discover() always returns empty attribute argument to callback function</title><link>https://devzone.nordicsemi.com/thread/543440?ContentTypeID=1</link><pubDate>Thu, 24 Jul 2025 08:26:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0bd91d3-44d7-43b8-8024-2c74628d4bcb</guid><dc:creator>Orlin</dc:creator><description>&lt;p&gt;Also of note - despite it not being documented anywhere, the start_handle and end_handle members need to be set explicitly, otherwise the callback immediately gets attr NULL and exits. If unsure which handles you&amp;#39;d be looking for, you can use the macros BT_ATTR_FIRST ATTRIBUTE_HANDLE and BT_ATTR_LAST_ATTRIBUTE_HANDLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bt_gatt_discover() always returns empty attribute argument to callback function</title><link>https://devzone.nordicsemi.com/thread/543402?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 19:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9966db3-799a-4bb0-90b2-74889a21a7af</guid><dc:creator>Orlin</dc:creator><description>&lt;p&gt;The problem is in the way I was trying to access the service handles and any other information. After finding this stackoverflow post:&amp;nbsp;&lt;a id="" href="https://stackoverflow.com/questions/78816822/discover-custom-uuid-services-characteristics-and-cccds-with-zephyr-rtos-as-a"&gt;https://stackoverflow.com/questions/78816822/discover-custom-uuid-services-characteristics-and-cccds-with-zephyr-rtos-as-a&lt;/a&gt;&amp;nbsp;, it turns out you can (and should at least from what little i can find) just access the members of the attr struct directly.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>