<?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 not creat my own characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2189/can-not-creat-my-own-characteristic</link><description>HI ALL
i have successfully creat my own service referring to the example ble_app_lbs and reference nAN-36.
but when i tried to creat my own characteristic in my service, it did not wrok(the device became unable to advertise, and the reason is that sd_ble_gatts_characteristic_add</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 May 2014 13:37:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2189/can-not-creat-my-own-characteristic" /><item><title>RE: can not creat my own characteristic</title><link>https://devzone.nordicsemi.com/thread/9277?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 13:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:528d87e2-b30e-4026-8c54-8f64fe10bdd2</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You could easily find the actual value that is assigned to ble_uuid by entering debug mode and putting a breakpoint after the assigment. Then you could compare both implementations and see the difference.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/639/how-can-i-use-a-vendor-specific-uuid/"&gt;This&lt;/a&gt; question may also be helpful. I would also recommend you to read sections 2.2.3 and 2.2.4 in nAN-36.&lt;/p&gt;
&lt;p&gt;In ble_lbs_init() you have the function sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;p_lbs-&amp;gt;uuid_type); This sets the uuid_type to 0x02, which is BLE_UUID_TYPE_VENDOR_BEGIN (see ble_types.h) It defines that the UUID is vendor specific, with your own base UUID, not the Bluetooth SIG base UUID.&lt;/p&gt;
&lt;p&gt;BLE_UUID_BLE_ASSIGN() sets the uuid_type to 0x01, which is BLE_UUID_TYPE_BLE. This defines that the UUID is defined by the Bluetooth SIG, and is to be used together with the Bluetooth SIG base UUID.&lt;/p&gt;
&lt;p&gt;In the LED Button example vendor specific UUIDs are you be used, since the service is not a standard service defined by the Bluetooth SIG, but something we have created on our own.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can not creat my own characteristic</title><link>https://devzone.nordicsemi.com/thread/9276?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2014 13:22:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:262ce75f-fc88-4e13-b72b-3897da585314</guid><dc:creator>kk</dc:creator><description>&lt;p&gt;Sorry,everyone,i think i find out the problem.
the problem is:
If i use the following codes:
//     ble_uuid.type = p_myservice-&amp;gt;uuid_type;
//     ble_uuid.uuid = MYDATA_UUID_CHAR;
my device will came out the problem i have said above
but if i replace them with this code:
//		BLE_UUID_BLE_ASSIGN(ble_uuid, MYDATA_UUID_CHAR);
the problem sloved !&lt;/p&gt;
&lt;p&gt;i really do not konw why, can someone explain it? thank you for your time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>