<?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>Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83523/turn-standard-4-bit-uuid-into-2-16-bit-uuids</link><description>I am writing a program for a Garmin Edge which needs to connect to a power meter via Bluetooth, some of the characteristic / service UUIDs are 4 digits which cannot be used when coding for Garmin products. For example, this is the code to connect to one</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jan 2022 13:16:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83523/turn-standard-4-bit-uuid-into-2-16-bit-uuids" /><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347172?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 13:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe50d7c6-38e1-4134-a9e3-5fa81091368d</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;Ah okay, that&amp;#39;s great thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347170?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 13:14:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d41a7513-d70e-4efd-9605-eb542896bbf8</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The same applies to all UUIDs. Service UUIDs and characteristic UUIDs alike. As long as it is a Bluetooth SIG 16 bit UUID, that is the way to convert it to a 128 bit UUID, using that base UUID that I mentioned.&lt;/p&gt;
&lt;p&gt;Please note that byte endianness might trip you off, so you might have to consider byte (and bit) ordering. However, if it works for one type of UUID, it should work for all of them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347161?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:52:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b122f4c-9c2a-4525-97c5-8c937baae692</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;For example, one of the characteristic UUIDs for the power measurement is 2A63 so you couldn&amp;#39;t just pass it in as&amp;nbsp;&lt;span&gt;00002A63-0000-1000-8000-&lt;/span&gt;&lt;span&gt;00805F9B34FB?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347159?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b2e6f67-03e4-43a8-a55a-9f061dad373c</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;Just to clarify - a service UUID such as 1800 would convert to:&amp;nbsp;&lt;span&gt;00001800-0000-1000-8000-&lt;/span&gt;&lt;br /&gt;&lt;span&gt;00805F9B34FB&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But for characteristics, you need to generate Bluetooth SIG UUIDs?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347153?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:26:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:accb20a1-a22f-4007-b627-02ea8ac54776</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;Thanks, you&amp;#39;ve been a great help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347152?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:24:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a388ff83-f6f0-4fdf-8f8c-448deaba15d0</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That is a standard 16 bit UUID from Bluetooth SIG, yes.&lt;/p&gt;
&lt;p&gt;Ref. the Bluetooth Core Specification 5.2, Vol 3, Part B, section 2.5.1 UUID:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;quot;The first UUID in this pre-allocated range is known as the&lt;br /&gt;Bluetooth Base UUID and has the value 00000000-0000-1000-8000-&lt;br /&gt;00805F9B34FB&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;(...)&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;The full 128-bit value of a 16-bit or 32-bit UUID may be computed by a simple&lt;br /&gt;arithmetic operation.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;128_bit_value = 16_bit_value * 2^96 + Bluetooth_Base_UUID&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;br /&gt;128_bit_value = 32_bit_value * 2^96 + Bluetooth_Base_UUID&amp;quot;&lt;/p&gt;
&lt;p&gt;What it means in practice, is that you take a &amp;quot;base UUID&amp;quot; of 0000xxxx-0000-1000-8000-&lt;br /&gt;00805F9B34FB, and replace the x-es with the 16 bit UUID.&lt;/p&gt;
&lt;p&gt;I do not know how that maps to the BluetoothLowEnergy.longToUuid() call. For that you must consult the documentation for the paraticular library that you use. With some luck, there is also an API call for generating Bluetooth SIG UUIDs from 16 bit (and from 32 bit) numbers.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347149?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:13:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0985541f-5361-47dd-a2f8-7f623d1e328e</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;I am trying to connect to a power meter via Bluetooth so I&amp;#39;m looking for the UUIDs for all the service/characteristics on NRF connect:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1641903124413v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But as you can see some of the values are 16 bit which I cant use when attempting to specify their profile.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347145?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:857520e5-6c08-4d94-a4f9-3360090f8b2c</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;The service UUID for generic access is 1800 which I belive is pretty standerd&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347143?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2c941bc-edfb-4d73-8804-c54ff898dea6</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks! Slight race condition wrt my previous answer here (did not spot this comment that you posted one minute prior to me posting my answer.)&lt;/p&gt;
&lt;p&gt;Are we talking about standard 16 bit UUIDs as specified from Bluetooth SIG, or are we talking about 16 bit UUIDs from a third party (such as e.g. Garmin.)? Do you have the specification for the UUIDs that you need to use?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347142?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:01:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5168f2eb-2bf4-4fa7-8db1-c6cebe6a83fa</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;Hi, thanks for the reply.&lt;/p&gt;
&lt;p&gt;The language I&amp;#39;m programming in is Monkey C which is the language you use to develop apps for Garmin devices. You are correct I should have said 16 bit UUID to 128 bit UUID or to be more accurate 16 bit to two 64 bit UUIDs as you can see from the code above that you need to provide the starting&amp;nbsp;and end UUIDs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347138?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f21fceb-e3dc-4f76-8f75-7a6a95ba76c4</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you provide some more detail about the Bluetooth connection code? It is not from nRF Connect SDK. What language, SDK/library, etc. does it come from?&lt;/p&gt;
&lt;p&gt;Do you have examples of the UUIDs in question? Is it for particular BLE services / characteristics?&lt;/p&gt;
&lt;p&gt;When you write &amp;quot;4 digits&amp;quot;, what is the base of the number (hexadecimal? decimal? binary?) I suspect that we are either talking about the 16 bit UUIDs defined by Bluetooth SIG, or we are talking about 16 bit UUIDs to&amp;nbsp; be combined with a &amp;quot;base UUID&amp;quot; to generate a full 128 bit UUID?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn standard 4 bit UUID into 2 16 bit UUIDs</title><link>https://devzone.nordicsemi.com/thread/347137?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0c96064-7eb0-42e5-8f40-159eb730b029</guid><dc:creator>EuanW</dc:creator><description>&lt;p&gt;Apologies I meant to say 16 bit into 128 bit&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>