<?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>Acknowledged transaction status callback in Mesh SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50092/acknowledged-transaction-status-callback-in-mesh-sdk</link><description>Hi, 
 
 I am using the reliable message communication to measure Round-trip time based on the Light switch example. 
 I noticed that in high traffics, some packets are not acknowledged and the log on the client side is &amp;quot;Acknowledged transfer cancelled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jul 2019 15:09:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50092/acknowledged-transaction-status-callback-in-mesh-sdk" /><item><title>RE: Acknowledged transaction status callback in Mesh SDK</title><link>https://devzone.nordicsemi.com/thread/199861?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 15:09:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9097b5b7-2182-466d-866d-2e55a3ece653</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;This is only for demonstration that you can cancel a pending transaction to start a new one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want each transaction to be transmit and retransmited X times before it&amp;#39;s timeout, you should not call that function. &amp;nbsp;In that case&amp;nbsp;generic_onoff_client_set() will return NRF_ERROR_BUSY until either you get an ACK or there is a&amp;nbsp;&lt;span&gt;ACCESS_RELIABLE_TRANSFER_TIMEOUT.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Acknowledged transaction status callback in Mesh SDK</title><link>https://devzone.nordicsemi.com/thread/199824?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 13:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73faae68-aeff-4da9-a84e-10749e9e72f1</guid><dc:creator>Pegah</dc:creator><description>&lt;p&gt;Hi Hung,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for you reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using mesh SDK v2.2 and proxy client and server. I modified the light switch example to setup an application timer in client which starts by pressing the button number 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then in the handler of the timer in client, I send on off messages the same as it is done in the original client button event handler.&amp;nbsp; I attached the my timer handler code where I am sending the messages.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void repeated_timer_handler(void * p_context)
{
  bool flag = hal_led_pin_get(BSP_LED_0);
  
   uint32_t status = NRF_SUCCESS;
   generic_onoff_set_params_t set_params;
   model_transition_t transition_params;
   static uint8_t tid = 0;
   if(flag == false)
       set_params.on_off = APP_STATE_ON;
       else
        set_params.on_off = APP_STATE_OFF;
    set_params.tid = tid++;
    transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
    transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
    NRF_LOG_INFO(&amp;quot;Send msg\n&amp;quot;);
   (void)access_model_reliable_cancel(m_clients[0].model_handle);
   status = generic_onoff_client_set(&amp;amp;m_clients[0], &amp;amp;set_params, &amp;amp;transition_params);
   hal_led_pin_set(BSP_LED_0, set_params.on_off);

   
    switch (status)
    {
        case NRF_SUCCESS:
            break;

        case NRF_ERROR_NO_MEM:  NRF_LOG_INFO(&amp;quot;Client no mem\n&amp;quot;);
        case NRF_ERROR_BUSY:  NRF_LOG_INFO(&amp;quot;Client busy\n&amp;quot;);
        case NRF_ERROR_INVALID_STATE:
        NRF_LOG_INFO(&amp;quot;Client cannot send\n&amp;quot;);
            hal_led_blink_ms(LEDS_MASK, LED_BLINK_SHORT_INTERVAL_MS, LED_BLINK_CNT_NO_REPLY);
            break;

        case NRF_ERROR_INVALID_PARAM:
            /* Publication not enabled for this client. One (or more) of the following is wrong:
             * - An application key is missing, or there is no application key bound to the model
             * - The client does not have its publication state set
             *
             * It is the provisioner that adds an application key, binds it to the model and sets
             * the model&amp;#39;s publication state.
             */
            NRF_LOG_INFO(&amp;quot;Publication not configured for client \n&amp;quot;)
            break;

        default:
            ERROR_CHECK(status);
            break;
    }
    
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you said, I checked and I see that&lt;/p&gt;
&lt;p&gt;in the original light switch,&amp;nbsp;&lt;span&gt;access_model_reliable_cancel is called&amp;nbsp;&lt;/span&gt;right before calling&amp;nbsp;generic_onoff_client_set(). That&amp;#39;s why I did the same thing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please let me know what is the use of this method? And what are the impact of removing it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Acknowledged transaction status callback in Mesh SDK</title><link>https://devzone.nordicsemi.com/thread/199794?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 12:46:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d60d0ef-ec06-4d37-9755-2131be8a7230</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Pegah,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s pretty strange to receive &amp;quot;&lt;span&gt;Acknowledged transfer cancelled&amp;quot;. This should only happen if&amp;nbsp;access_model_reliable_cancel() is called.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you check in your code where it&amp;#39;s called ? In our light switch client example it&amp;#39;s called when button 0 or 1 is pressed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If there is a timeout due to packet loss (retransmitted 3 times with no ACK),&amp;nbsp;ACCESS_RELIABLE_TRANSFER_TIMEOUT (&amp;quot;Acknowledged transfer timeout&amp;quot;) should return instead.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>