This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Timeslot extension

Hello all,

After several tests about extending Timeslot, I have some questions.

  1. I found out that the Timeslot will keep extending automatically after a successful extension, right?

  2. If I am right about the first question, then about the extension length, in my code, extend.length_us = 200, and the "callback_action" will be set to "NRF_RADIO_SIGNAL_CALLBACK_ACTION_END" if the total length above 120,000,000 us, so that the Timeslot will end rather than exceed the 128s limit and extend failed.
    I used the "NRF_LOG_INFO" printed the result:
    :INFO:NRF_EVT_RADIO_SESSION_IDLE
    :INFO:NRF_EVT_RADIO_SESSION_CLOSED
    :INFO: extend_success_count = 600000
    :INFO: extend_fail_count = 0

     case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: 
    
         if(total_timeslot_length >= 120000000)
         {
             signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_END;
         }else
         {
         total_timeslot_length += 200;
         extend_success_count++;
         }
    
         break;
    
     case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: 
    
         fail_count++;
    
         break;
    

Also in Timeslot event handler:

    case NRF_EVT_RADIO_SESSION_IDLE:
        
        sd_radio_session_close();
        NRF_LOG_INFO("NRF_EVT_RADIO_SESSION_IDLE\r\n");

        break;

    case NRF_EVT_RADIO_SESSION_CLOSED: 
        
        NRF_LOG_INFO("NRF_EVT_RADIO_SESSION_CLOSED\r\n");
        NRF_LOG_INFO(" extend_success_count            = %d\r\n", extend_success_count);
        NRF_LOG_INFO(" extend_fail_count               = %d\r\n", fail_count);

        break;

But the problem is: the real time about the extension was far less that 120 seconds, only few seconds and as I increase the "extend_length", the real time get even shorter, so where is the problem?

Many thanks!

Parents
  • fail_count was declared as static, I changed to volatile, the result was the same. I am not familiar with debug, but I set a break point at "case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED", the application did not run to that point. You mean the reason why the real extension time is short should be extension failure? So if assume nothing goes wrong, the real extend time should be 120s? I did only initialized the SoftDevice(no connection and advertising) all the time.

Reply
  • fail_count was declared as static, I changed to volatile, the result was the same. I am not familiar with debug, but I set a break point at "case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED", the application did not run to that point. You mean the reason why the real extension time is short should be extension failure? So if assume nothing goes wrong, the real extend time should be 120s? I did only initialized the SoftDevice(no connection and advertising) all the time.

Children
No Data
Related