<?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>Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62110/multiple-value-in-one-characteristic</link><description>Hello, 
 My project requires me to send acceleration data to phone. So, i have started with Custom BLE app. 
 Since i need to send 3 values, of x, y and z-axis. So i need to send multiple values to same characteristic. Can you guide me regarding this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jun 2020 13:54:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62110/multiple-value-in-one-characteristic" /><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/255053?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 13:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e252e98b-4fea-4891-8b2e-deb8c312b8b8</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Now I see what you mean, you have placed it next to the SES project file.&lt;br /&gt;While this is preferable to my earlier guess, I would still recommend creating a separate directory to contain all your own source code, perhaps next to the main.c file, but this is just a suggestion on my part.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if you should encounter any other issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254774?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 14:25:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2178da7f-3c63-4215-8388-5abc29115f12</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;i have actually kept it along with main file, not mixed with other folders. its in the project folder that i have shared with you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254756?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 13:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e43157d5-96ff-428d-b2ba-e2bfa7375287</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote userid="83701" url="~/f/nordic-q-a/62110/multiple-value-in-one-characteristic/254731"]i followed the tutorial of &lt;a href="https://github.com/NordicPlayground/nRF52-Bluetooth-Course"&gt;https://github.com/NordicPlayground/nRF52-Bluetooth-Course&lt;/a&gt;. Custom BLE tutorial. Is this not from Nordic?&amp;nbsp;[/quote]
&lt;p&gt;Yes it is from Nordic - but be advised that all NordicPlayground repos are officially unsupported.&lt;br /&gt;However, in this case that does not matter, since it is code for a tutorial.&lt;br /&gt;&lt;br /&gt;If you see the structure of the repository from the tutorial, you will notice that the associated ble_cus.* files are both located next to the main.c file - they are not located with the other official BLE services.&lt;br /&gt;&lt;br /&gt;Separating your custom code from the official code is good practice when working with any SDK, as @Awneil mentions.&amp;nbsp;I would even&amp;nbsp;argue it is the best practice, especially if you intend to work with others that are already familiar with the drivers you are modifying.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254731?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 12:38:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9399e00d-8897-48eb-97f0-9bf61d2c50f5</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Hey, Thank you so much, but i followed the tutorial of &lt;a href="https://github.com/NordicPlayground/nRF52-Bluetooth-Course"&gt;https://github.com/NordicPlayground/nRF52-Bluetooth-Course&lt;/a&gt;. Custom BLE tutorial. Is this not from Nordic?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254713?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 11:59:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3a1f2bb-552d-4cd8-8590-52e019f2e72a</guid><dc:creator>awneil</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/62110/multiple-value-in-one-characteristic/254710"]This is of course just a suggestion[/quote]
&lt;p&gt;But a very good suggestion!&lt;/p&gt;
&lt;p&gt;And it is not specific to the Nordic SDK - this would be Good Practice with &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt; &lt;/em&gt;SDK, or any other 3rd-party library, etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254710?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 11:52:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a588183-8973-4eda-944e-30c9d2692441</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Taking a quick look on the code you have shared, it seems to me that the&amp;nbsp;ble_cus_custom_value_update is not part of the main.c project file, which leads me to believe that you have either added it to one of the drivers already included in the SDK, or in a driver you have made yourself - but placed in a location probably close to the other drivers.&lt;br /&gt;&lt;br /&gt;If this is the case, I would like to recommend to you that you do not make changes directly to the drivers included in the SDK(to avoid non-compatibility / breakage of the other examples or drivers).&lt;br /&gt;Instead, I would suggest that you make your own copy of the driver you would like to modify, and rename it to reflect that. Ideally, you would also place your modified / custom code in a separate directory, for easy differentiation. Borrowing naming conventions from the SDK might also lead to confusion.&lt;br /&gt;It will make it easier to share your project in the future, and it will avoid confusion when working with someone already familiar with the unmodified SDK code.&lt;br /&gt;&lt;br /&gt;This is of course just a suggestion, and you may of course organize the project as you would like.&lt;br /&gt;&lt;br /&gt;Have a great weekend!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254702?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 11:43:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c12edf2-9ad9-40ea-871b-8afb56c0bad9</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Nagashree"]Thank you&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl&lt;/a&gt;&amp;nbsp;for your guidance[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="Nagashree"]along with your suggestions, the attribute section also needed to be changed (the max.len) and now it works fine.&amp;nbsp;[/quote]
&lt;p&gt;Could you link exactly where you made the change, and how you changed it?&lt;br /&gt;My apologies for overlooking this. I am happy you were able to resolve the issue!&lt;/p&gt;
[quote user="Nagashree"]Now, my query is, what are the corrections to be made, if i want to send a signed integer of 64 bit, instead of unsigned.&amp;nbsp;[/quote]
&lt;p&gt;Both uint64_t and int64_t consists of exactly 64 bit - the only difference is their range of possible numbers to represent.&lt;br /&gt;As long as your central knows what to expect the approach for sending the value using the Nordic UART example is exactly the same.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Kar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254571?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 18:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42c4b6a3-ca6b-44d9-98dd-bd0b928e3443</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl&lt;/a&gt;&amp;nbsp;for your guidance,along with your suggestions, the attribute section also needed to be changed (the max.len) and now it works fine.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now, my query is, what are the corrections to be made, if i want to send a signed integer of 64 bit, instead of unsigned.&amp;nbsp;&lt;br /&gt;I have attached the project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/sending-packed-data.zip"&gt;devzone.nordicsemi.com/.../sending-packed-data.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/254256?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 12:22:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d615ea83-575c-4554-ad0e-24b7f132b286</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Sorry for my late reply - I was out of office yesterday due to travel.&lt;br /&gt;&lt;br /&gt;Could you show me the declaration of your&amp;nbsp;&lt;em&gt;m_custom_value&amp;nbsp;&lt;/em&gt;variable?&lt;br /&gt;From your description and usage I would guess it is a global uint64_t.&lt;/p&gt;
&lt;p&gt;[quote user="Nagashree"][/quote]&lt;/p&gt;
&lt;p&gt;I tried editing,&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;gatts_value.len&amp;nbsp; &amp;nbsp; &amp;nbsp;= sizeof(uint8_t);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt;&amp;nbsp;&lt;span&gt;gatts_value.len&amp;nbsp; &amp;nbsp; &amp;nbsp;= sizeof(uint64_t);&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It dint work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What do you mean by &amp;quot;didnt work&amp;quot;, please elaborate.&lt;br /&gt;Did you receive an error when compiling, or unexpected behavior at runtime?&lt;/p&gt;
&lt;p&gt;[quote user="Nagashree"][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So i changed only the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; hvx_params.p_len&amp;nbsp; = &amp;amp;gatts_value.len;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do not understand exactly what you did here. You started with the code snippets you included in the comment, than you made the changes to &lt;em&gt;gatts_value.len = sizeof(uint64_t)&lt;/em&gt; and it didnt work, so you only changed the &lt;em&gt;hvx_params.p_len = &amp;amp;gatts_value.len&lt;/em&gt;?&lt;br /&gt;If so, the last change wont be any different, since you reverted the change to the &lt;em&gt;gatts_value.len&lt;/em&gt; already.&lt;br /&gt;&lt;br /&gt;How often is your notification_timeout_handler being called?&lt;br /&gt;If you could share your entire project folder(as a .zip) file, or the entire main.c file, I could gain a better understanding of what you are attempting to do, and why it is not working.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together,&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253754?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 11:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4b53e3a-4409-4837-96da-8ca879d2c82f</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Thank you, I tried editing this as per the tutorial you had sent. But it was not working. I am using custom ble code 128 bit UUID. And the function is as below,&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t ble_cus_custom_value_update(ble_cus_t * p_cus, uint8_t cust_value){
    NRF_LOG_INFO(&amp;quot;In ble_cus_custom_value_update. \r\n&amp;quot;); 
     
    if (p_cus == NULL)
    {
        return NRF_ERROR_NULL;
    }

    uint32_t err_code = NRF_SUCCESS;
    ble_gatts_value_t gatts_value;

// Initialize value struct.
    memset(&amp;amp;gatts_value, 0, sizeof(gatts_value));

    gatts_value.len     = sizeof(uint8_t);
    gatts_value.offset  = 0;
    gatts_value.p_value = &amp;amp;cust_value;

    // Update database.
    err_code = sd_ble_gatts_value_set(p_cus-&amp;gt;conn_handle,
                                        p_cus-&amp;gt;custom_value_handles.value_handle,
                                        &amp;amp;gatts_value);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

        // Send value if connected and notifying.
    if ((p_cus-&amp;gt;conn_handle != BLE_CONN_HANDLE_INVALID)) 
    {
        ble_gatts_hvx_params_t hvx_params;

        memset(&amp;amp;hvx_params, 0, sizeof(hvx_params));

        hvx_params.handle = p_cus-&amp;gt;custom_value_handles.value_handle;
        hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
        hvx_params.offset = gatts_value.offset;
        hvx_params.p_len  = &amp;amp;gatts_value.len;
        hvx_params.p_data = gatts_value.p_value;

        err_code = sd_ble_gatts_hvx(p_cus-&amp;gt;conn_handle, &amp;amp;hvx_params);
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: %x. \r\n&amp;quot;, err_code);
    }
        else
    {
        err_code = NRF_ERROR_INVALID_STATE;
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: NRF_ERROR_INVALID_STATE. \r\n&amp;quot;); 
    }

    return err_code;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And the calling function is as below,&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void notification_timeout_handler(void * p_context)
{
    UNUSED_PARAMETER(p_context);
    ret_code_t err_code;
    
    // Increment the value of m_custom_value before notifing it.
    m_custom_value+=2;
    err_code = ble_cus_custom_value_update(&amp;amp;m_cus, m_custom_value);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried editing,&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;gatts_value.len&amp;nbsp; &amp;nbsp; &amp;nbsp;= sizeof(uint8_t);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt;&amp;nbsp;&lt;span&gt;gatts_value.len&amp;nbsp; &amp;nbsp; &amp;nbsp;= sizeof(uint64_t);&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It dint work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So i changed only the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; hvx_params.p_len&amp;nbsp; = &amp;amp;gatts_value.len;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;as per your suggestion, but once i make the changes, i dont get any notifications.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253612?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 20:25:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c67ab657-5f80-4d0f-a679-fa93eac2960d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Nagashree"]Sorry, if i wasn&amp;#39;t clear, I&amp;#39;m very new to this whole concept[/quote]
&lt;p&gt;No problem at all, do not worry. I did not mean to sound crass in my last reply, I just did not understand everything you were asking at first.&lt;/p&gt;
&lt;p&gt;[quote user="Nagashree"][/quote]&lt;/p&gt;
&lt;p&gt;With regards to Question 1 snapshot, It is was just a demo code, to explain what i meant, when i said,&amp;nbsp;sending three values in the same characteristics.&lt;/p&gt;
&lt;p&gt;(I thought of sending X and Y and Z, one after the other in this format, until the concept of packing was introduced.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now I understand, thank you for explaining what you meant. Indeed it sounds like packing them into one characteristic is the best method to proceed with for your application.&lt;/p&gt;
[quote user="Nagashree"]In regards to Question2, Is there any other reference to explain more in detail regarding sending packed data. What are the functions in which the modifications have to be made, in order to achieve sending more than 8 bits. or array.[/quote]
&lt;p&gt;I suppose the easiest way to proceed would be to leave it as is, and instead just have p_len point to the length of the data you are sending in bytes. So, for sending a uint64_t, you would need to have:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint16_t len = sizeof(uint64_t);
hvx_params.p_len = &amp;amp;len;&lt;/pre&gt;&lt;br /&gt;To see an example of how this can be done, you could check out the block starting on line 343 in the ble_bas.c source file.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253598?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 16:55:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa7b6102-6f4c-4a89-90cd-7e21ed8dfcf6</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Sorry, if i wasn&amp;#39;t clear, I&amp;#39;m very new to this whole concept. I just wanted to know, that the three points i understood were correct or not.&lt;/p&gt;
&lt;p&gt;With regards to Question 1 snapshot, It is was just a demo code, to explain what i meant, when i said,&amp;nbsp;sending three values in the same characteristics.&lt;/p&gt;
&lt;p&gt;(I thought of sending X and Y and Z, one after the other in this format, until the concept of packing was introduced.)&lt;/p&gt;
&lt;p&gt;In regards to Question2, Is there any other reference to explain more in detail regarding sending packed data. What are the functions in which the modifications have to be made, in order to achieve sending more than 8 bits. or array.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253571?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 14:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77af6a7c-0872-4599-ba2c-0e68a59b17ee</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I do not understand the format of your questions, am I to select one of the a, b, c options presented? There are also no actual question posed in &amp;quot;Question 1&amp;quot;.&amp;nbsp;&lt;/p&gt;
[quote user="Nagashree"]Question 1[/quote]
&lt;p&gt;Yes, less active radio time consumes less power, this is correct.&lt;br /&gt;&lt;br /&gt;However, you might want the characteristics to be read by the central whenever the central pleases(read characteristic) or you might want the central to be notified as soon as there is an update to the characteristics.&lt;br /&gt;So it also depends on how the characteristics are configured, but in general it would cost the least power to have all the values in a single characteristic.&lt;br /&gt;To reduce power consumption, you could also use the slave latency feature, combined with longer connection intervals(longer time in between each transmission). You will have to weight these possibilities against the real-time constraints of your application.&lt;br /&gt;&lt;br /&gt;I do not know where you are going with your included screenshot in question 1, but be advised that the value is only incremented once each function call, and thus not in between each update call - if that was the intention.&lt;/p&gt;
&lt;p&gt;[quote user="Nagashree"][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Question 2&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a, b, and c is correct at least.&lt;br /&gt;The changes made in d are incorrect, and you should not just change these types without looking into what they intend to contain. &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fstructble__gatts__hvx__params__t.html&amp;amp;resultof=%22%62%6c%65%5f%67%61%74%74%73%5f%68%76%78%5f%70%61%72%61%6d%73%5f%74%22%20"&gt;Please have a look at their documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253492?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 10:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a60c4ee4-e9ad-4421-8062-318810bfca28</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Thank you so much, &lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl Ylvisaker&lt;/a&gt;&amp;nbsp;for your suggestions.&lt;/p&gt;
&lt;p&gt;So,&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Question 1&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a. Sending 3 values, one after the other , through the same value and characteristics (This would consume power for all 3 transmissions)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1591351155265v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;b. Sending 3 values to 3 different characteristics (Would this also means im trying to send the data in 3 transmissions?)&lt;/p&gt;
&lt;p&gt;c. Sending all 3 values packed would save power and could send all data in one transmission.&lt;/p&gt;
&lt;p&gt;Kindly correct me, if I&amp;#39;m wrong.&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Question 2&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, currently my code is pushing 8 bits of data . To change this to 64bits, i tried following corrections, Kindly let me know, if this is okay and if anything else has to be changed&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a. change the size of custom value (main.c)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1591351327688v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b. change the argument size and gatts_value.len (ble_cus.c)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t ble_cus_custom_value_update(ble_cus_t * p_cus, uint64_t custom_value){
    NRF_LOG_INFO(&amp;quot;In ble_cus_custom_value_update. \r\n&amp;quot;); 
     
    if (p_cus == NULL)
    {
        return NRF_ERROR_NULL;
    }

    uint32_t err_code = NRF_SUCCESS;
    ble_gatts_value_t gatts_value;

// Initialize value struct.
    memset(&amp;amp;gatts_value, 0, sizeof(gatts_value));

    gatts_value.len     = sizeof(uint64_t);
    gatts_value.offset  = 0;
    gatts_value.p_value = &amp;amp;custom_value;

    // Update database.
    err_code = sd_ble_gatts_value_set(p_cus-&amp;gt;conn_handle,
                                        p_cus-&amp;gt;custom_value_handles.value_handle,
                                        &amp;amp;gatts_value);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

        // Send value if connected and notifying.
    if ((p_cus-&amp;gt;conn_handle != BLE_CONN_HANDLE_INVALID)) 
    {
        ble_gatts_hvx_params_t hvx_params;

        memset(&amp;amp;hvx_params, 0, sizeof(hvx_params));

        hvx_params.handle = p_cus-&amp;gt;custom_value_handles.value_handle;
        hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
        hvx_params.offset = gatts_value.offset;
        hvx_params.p_len  = &amp;amp;gatts_value.len;
        hvx_params.p_data = gatts_value.p_value;

        err_code = sd_ble_gatts_hvx(p_cus-&amp;gt;conn_handle, &amp;amp;hvx_params);
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: %x. \r\n&amp;quot;, err_code);
    }
        else
    {
        err_code = NRF_ERROR_INVALID_STATE;
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: NRF_ERROR_INVALID_STATE. \r\n&amp;quot;); 
    }

    return err_code;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c. Change the size of custom value in prototype declaration. (ble_cus.h)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d. Change the value of structure of GATT attribute value and HVx value as below (ble_gatts.h)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief GATT Attribute Value. */
typedef struct
{
  uint64_t  len;        /**&amp;lt; Length in bytes to be written or read. Length in bytes written or read after successful return.*/
  uint64_t  offset;     /**&amp;lt; Attribute value offset. */
  uint64_t  *p_value;    /**&amp;lt; Pointer to where value is stored or will be stored.
                             If value is stored in user memory, only the attribute length is updated when p_value == NULL.
                             Set to NULL when reading to obtain the complete length of the attribute value */
} ble_gatts_value_t;


/**@brief GATT HVx parameters. */
typedef struct
{
  uint64_t          handle;             /**&amp;lt; Characteristic Value Handle. */
  uint64_t           type;               /**&amp;lt; Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */
  uint64_t          offset;             /**&amp;lt; Offset within the attribute value. */
  uint64_t         *p_len;              /**&amp;lt; Length in bytes to be written, length in bytes written after return. */
  uint64_t const    *p_data;             /**&amp;lt; Actual data content, use NULL to use the current attribute value. */
} ble_gatts_hvx_params_t;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253187?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 07:59:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53df53c2-c008-4646-8a1b-c6aa80e34a80</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The definition of a &amp;quot;Characteristic&amp;quot;, from the Bluetooth SIG website, is:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;quot;Characteristics are defined attribute types that contain a &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;single&lt;/strong&gt;&lt;/span&gt; logical value.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&lt;a href="https://www.bluetooth.com/specifications/gatt/characteristics/"&gt;https://www.bluetooth.com/specifications/gatt/characteristics/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;(my emphasis)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;However, there&amp;#39;s nothing to stop you having a 3-byte value - where the 1st byte represents X, the 2nd byte&amp;nbsp;&lt;span&gt;represents&amp;nbsp;Y, and&amp;nbsp;the 3rd byte&amp;nbsp;represents Z&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or have&amp;nbsp;a 6-byte value - where the 1st two&amp;nbsp;bytes represent X, the 2nd two bytes represent Y, and&amp;nbsp;the 3rd two&amp;nbsp;bytes represent Z&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;etc, etc, ...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or, as&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl Ylvisaker&lt;/a&gt;&lt;/span&gt;&amp;nbsp;says, have a characteristic for X, and&amp;nbsp;&lt;span&gt;characteristic for&amp;nbsp;Y, and a characteristic for&amp;nbsp;Z.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See those tutorials.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Thingy:52 adopts the scheme of &amp;quot;packing&amp;quot; multiple values into a single Characteristic; eg, see the &amp;quot;Raw Data&amp;quot; Characteristic:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://nordicsemiconductor.github.io/Nordic-Thingy52-FW/documentation/firmware_architecture.html#arch_motion"&gt;https://nordicsemiconductor.github.io/Nordic-Thingy52-FW/documentation/firmware_architecture.html#arch_motion&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple value in one characteristic</title><link>https://devzone.nordicsemi.com/thread/253174?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 07:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6ea461d-a0e9-4cab-8ff3-b5a0210b39a4</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Yes, you may use a custom service with multiple characteristics for this purpose.&lt;br /&gt;Have you seen our &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial"&gt;Service tutorial&lt;/a&gt;, and &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial"&gt;characteristics tutorial&lt;/a&gt;? I highly recommend completing these tutorials in order to familiarize yourself with creating both custom services and characteristics.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>