<?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>characteristic with read &amp;amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118578/characteristic-with-read-notify-repeatedly-update-in-nrf-connect-app-with-same-value</link><description>Continue. 
 PCA100059,S140,custermize periphral Blinky. 
 I have changed the value transfered between peripheral &amp;amp; center with 
 uint8_t* data; 
 uint16_t dataLen; 
 The max length set to 50 bytes. 
 Send 10 bytes to center every time butten event triggered</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Feb 2025 03:31:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118578/characteristic-with-read-notify-repeatedly-update-in-nrf-connect-app-with-same-value" /><item><title>RE: characteristic with read &amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/thread/521209?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 03:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54d709ed-b397-4f76-9bf1-dd741d8139d3</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;I have tested the orignal Blinky again, same. The nRF connect app will repeatedly update the LED state and button state.Looks like this is app&amp;#39;s intentionally action.&lt;/p&gt;
&lt;p&gt;So ignore it now, I will check with center app later.&lt;/p&gt;
&lt;p&gt;By the way, about debug log, can I use the USB to output log to PC?&lt;/p&gt;
&lt;p&gt;I have no JLink, only a 3rd vendor&amp;#39;s CMSIS-DAP debugger.&lt;/p&gt;
&lt;p&gt;I just tried JLink viewer with my debugger, it can&amp;#39;t find the debugger.&lt;/p&gt;
&lt;p&gt;And I don&amp;#39;t want to connect another board between PCA10059 and PC.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: characteristic with read &amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/thread/521206?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 03:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16d52ee6-0aa6-4a50-b9b6-68ebacef0665</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;In my code as showed in attahed files,there only 1 place to call&amp;nbsp;&lt;span&gt;sd_ble_gatts_hvx():&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ble_tgoi_on_SOMI_change(uint16_t conn_handle, ble_tgoi_t * p_tgoi, uint8_t* data,uint16_t dataLen)
{
    
	  ble_gatts_hvx_params_t params;
    
    memset(&amp;amp;params, 0, sizeof(params));
    params.type   = BLE_GATT_HVX_NOTIFICATION;
    params.handle = p_tgoi-&amp;gt;SOMI_char_handles.value_handle;
    params.p_data = data;
    params.p_len  = &amp;amp;dataLen;

    return sd_ble_gatts_hvx(conn_handle, &amp;amp;params);
    
		/*
	  ble_gatts_value_t p_value;
    p_value.len = dataLen;
    p_value.offset = 0;
    p_value.p_value = data;	
	  return sd_ble_gatts_value_set(conn_handle,p_tgoi-&amp;gt;SOMI_char_handles.value_handle,&amp;amp;p_value); 
	  */
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and this function called in button event handler:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint8_t testCnt = 1;

static void button_event_handler(uint8_t pin_no, uint8_t button_action)
{
    ret_code_t err_code;
	  uint8_t data[10] = {0xFF,0xFF,0xFF,0xFF,5,6,0xFF,0xFF,0xFF,0xFF};

    switch (pin_no)
    {
        case LEDBUTTON_BUTTON:
            NRF_LOG_INFO(&amp;quot;Send button state change.&amp;quot;);
				
				    //测试，按下按钮时生成10个字节的数据，发送给server
				    
						data[4] = testCnt++;
				    data[5] = testCnt++;
				
            err_code = ble_tgoi_on_SOMI_change(m_conn_handle, &amp;amp;m_tgoi, data,sizeof(data));
            if (err_code != NRF_SUCCESS &amp;amp;&amp;amp;
                err_code != BLE_ERROR_INVALID_CONN_HANDLE &amp;amp;&amp;amp;
                err_code != NRF_ERROR_INVALID_STATE &amp;amp;&amp;amp;
                err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
            {
                APP_ERROR_CHECK(err_code);
            }
            break;

        default:
            APP_ERROR_HANDLER(pin_no);
            break;
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have set break point in these functions,no stop during repeatedly sending last data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That means those 2 functions not been executed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any other attributes can be set to control the data transfering between peripheral &amp;amp; center?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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: characteristic with read &amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/thread/521166?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 15:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ca5661-25ad-459f-8050-f1acea52ebb8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I can&amp;#39;t think of anything, unless you somewhere&amp;nbsp;are calling&amp;nbsp;sd_ble_gatts_hvx(). If you have a sniffer log that might help.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: characteristic with read &amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/thread/521157?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 14:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54df716c-21fe-4eab-ad1f-fc1c9ce8e30f</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;Nice, it receives only 10 bytes now.&lt;/p&gt;
&lt;p&gt;But,why It repeatedly send the last data?&lt;/p&gt;
&lt;p&gt;It will not send any data if I never send data,and it will repeatedly send the last data if I send data once.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: characteristic with read &amp; notify repeatedly update in nRF connect app with same value</title><link>https://devzone.nordicsemi.com/thread/521105?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 12:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:def4180f-fd82-47b3-85e5-595d4748e199</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Before calling&amp;nbsp;characteristic_add(), can you set:&lt;/p&gt;
&lt;p&gt;add_char_params.is_var_len = true; /**&amp;lt; Indicates if the characteristic value has variable length.*/&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>