<?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>Discovering and connecting to BLE devices with custom 128 bit UUIDs using Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67963/discovering-and-connecting-to-ble-devices-with-custom-128-bit-uuids-using-zephyr</link><description>I have created a couple of custom BLE services and characteristics in a peripheral application. It shows up in the nRF Connect app and can read the values from sensors connected to the characteristics of these services. I am struggling to discover and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Nov 2020 11:31:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67963/discovering-and-connecting-to-ble-devices-with-custom-128-bit-uuids-using-zephyr" /><item><title>RE: Discovering and connecting to BLE devices with custom 128 bit UUIDs using Zephyr</title><link>https://devzone.nordicsemi.com/thread/278421?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 11:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d28a8f-f594-4c1b-8540-e2ca1cf805d2</guid><dc:creator>JPSvanderWalt</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;&lt;span&gt;&amp;nbsp;I was not sure if the Discovery Manager differentiates between different sizes of UUIDs.&amp;nbsp; I will see if I can get it up and running.&amp;nbsp; Your help is much appreciated&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovering and connecting to BLE devices with custom 128 bit UUIDs using Zephyr</title><link>https://devzone.nordicsemi.com/thread/278402?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 10:15:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1308c2a7-e71c-4fa2-8c85-8b5284a1f46d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;There&amp;#39;s no difference between 16-bit and 128-bit UUIDs with regards to the Discovery Manager&amp;#39;s API:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You declare the custom UUID with:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define MY_SERVICE_UUID 0xd4, 0x86, 0x48, 0x24, 0x54, 0xB3, 0x43, 0xA1, \
			            0xBC, 0x20, 0x97, 0x8F, 0xC3, 0x76, 0xC2, 0x75
			            
#define BT_UUID_MY_SERVICE      BT_UUID_DECLARE_128(MY_SERVICE_UUID)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And call:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;bt_gatt_dm_start(conn, BT_UUID_MY_SERVICE, &amp;amp;discovery_cb, NULL);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The second parameter of bt_gatt_dm_start is of type&amp;nbsp;bt_uuid:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** @brief This is a &amp;#39;tentative&amp;#39; type and should be used as a pointer only */
struct bt_uuid {
	u8_t type;
};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You are however supposed to pass any of the following types:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct bt_uuid_16 {
	struct bt_uuid uuid;
	u16_t val;
};

struct bt_uuid_32 {
	struct bt_uuid uuid;
	u32_t val;
};

struct bt_uuid_128 {
	struct bt_uuid uuid;
	u8_t val[16];
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>