<?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>The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117613/the-esb-receiver-sends-problems</link><description>Hi Q&amp;amp;A My keyboard chip is NRF52832, and the program uses ESB 2.4G communication. The receiver dongle uses NRF52833. Now there is a problem that when the CAPSLOCK is clicked with the keyboard, the receiving dog correctly returns the information of CAPSLOCK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Jun 2025 09:32:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117613/the-esb-receiver-sends-problems" /><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/539163?ContentTypeID=1</link><pubDate>Fri, 13 Jun 2025 09:32:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2543f7b1-4269-4cd1-88a5-bf270ab23e3a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zbxiong,&lt;/p&gt;
&lt;p&gt;1. I don&amp;#39;t fully understand what you meant here: &amp;quot;&lt;span&gt;.I can only send the failed returned data to the keyboard to make the indicator light flash.&amp;quot; Could you try to explain in more detail ?&amp;nbsp;&lt;br /&gt;Have you tried to reproduce the issue with our sample ?&amp;nbsp;&lt;br /&gt;2. As far as I know there is no feature in ESB to do channel survey. It&amp;#39;s possible to do channel survey in BLE but it&amp;#39;s not implemented in ESB. You will have to think about doing it directly with the radio but then it will break ESB.&amp;nbsp;&lt;br /&gt;What you can do I think is to implement channel hopping in ESB. It would require the host and the device to keep track of the time and the channel is should jump to. This feature is already implemented in Gazel protocol which is based on top of ESB. This maybe something you can consider. I don&amp;#39;t think it would check for channel quality before jumping, it do a scheduled channel hopping but that can reduce the risk of only use one channel all the time.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;But you need to do some calculation to see the rate of packet loss before implementing any measure to improve it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/538993?ContentTypeID=1</link><pubDate>Thu, 12 Jun 2025 10:10:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12dece06-dfc2-4513-81ed-963cf4f88383</guid><dc:creator>zbxiong</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Hung Bui&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;The problems mentioned above remain.&lt;br /&gt;&amp;nbsp; 1.I can only send the failed returned data to the keyboard to make the indicator light flash.&lt;br /&gt;&amp;nbsp; 2.&amp;nbsp;I want to prevent packet loss by other methods, such as checking whether there is interference&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in the current channel. If there is, I will jump to the channel that has been scanned and recorded&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as having no interference or very little interference.&lt;br /&gt;&amp;nbsp; 3. But I know what method to use to achieve it. I couldn&amp;#39;t find the relevant function for channel&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; detection.&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;4. Currently, I am using nRF5_SDK_17.1.0_ddde560.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/538036?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2025 11:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91495ead-c11a-447c-b781-e404c19d113e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zbxiong,&amp;nbsp;&lt;br /&gt;Could you please try reproduce the issue with one of our sample ?&lt;br /&gt;Do you send with ACK or without ACK ?&amp;nbsp;&lt;br /&gt;Do you see&amp;nbsp;NRF_ESB_EVENT_TX_FAILED event ?&amp;nbsp;&lt;br /&gt;It&amp;#39;s a nature with radio communication that the packet can be dropped due to collision or other reason. The packet will get retransmitted depends on your configuration, but the chance that a packet be loss is unavoidable with RF communication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to see the packet drop rate to see if there is actually any problem.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/537991?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2025 08:22:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aea9534-cd46-4688-be76-b924febe3ee3</guid><dc:creator>zbxiong</dc:creator><description>&lt;p&gt;Hi Hung Bui&lt;/p&gt;
&lt;p&gt;Thank you for your reply,&lt;/p&gt;
&lt;p&gt;here is indeed data loss. I set the keyboard mode light to flash at the sending end if the sending fails, but I don&amp;#39;t know why the sending fails from time to time. Now I&amp;#39;m testing to resend the last backe-up data when the sending is unsuccessful, but the effect is not ideal.&lt;br /&gt;Do you have any good suggestions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/537706?ContentTypeID=1</link><pubDate>Mon, 02 Jun 2025 14:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e2a6ccc-9028-4f3c-bd45-e1fc0af3f31c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi zbxiong,&lt;/p&gt;
&lt;p&gt;It a bit hard to debug with limited debug information. Could you please try to measure the dataloss in a more replicable way ?&amp;nbsp;&lt;br /&gt;For example you can try to transmit data on one side and display what you receive on the other side and see if they match ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/537481?ContentTypeID=1</link><pubDate>Fri, 30 May 2025 06:49:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:165c7f23-a3a0-486e-a80f-0fb121677836</guid><dc:creator>zbxiong</dc:creator><description>&lt;p&gt;Hi Hung Bui&lt;/p&gt;
&lt;p&gt;Thank you for your reply,&lt;/p&gt;
&lt;p&gt;This is the dual-mode communication keyboard program that I wrote.&lt;/p&gt;
&lt;p&gt;I used NRF52832 to send data. The code is as follows.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static nrf_esb_payload_t  tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00);  //2.4g数据发送缓冲器
		static uint8_t * p_key = data_array;
		
void clocks_start( void )
{
    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
    while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
}


void nrf_esb_event_handler(nrf_esb_evt_t const * p_event)
{
    switch (p_event-&amp;gt;evt_id)
    {
        case NRF_ESB_EVENT_TX_SUCCESS:
				    NRF_LOG_INFO(&amp;quot;TX SUCCESS EVENT&amp;quot;);
				    esb_tx_success = true;              
            break;
        case NRF_ESB_EVENT_TX_FAILED:
				    NRF_LOG_INFO(&amp;quot;TX FAILED EVENT&amp;quot;);
            (void) nrf_esb_flush_tx();
            (void) nrf_esb_start_tx();
				    if(keyboard_send)
						   {
								esb_tx_failed = true;
							 }
            break;
        case NRF_ESB_EVENT_RX_RECEIVED:
				     NRF_LOG_INFO(&amp;quot;RX RECEIVED EVENT&amp;quot;);
				     while (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)
             {
                if (rx_payload.length &amp;gt; 0)
                {
									if((rx_payload.data[1]&amp;amp;2)==2)
									   {
										  m_caps_on = true;
										 }
                  else 
									 {
										m_caps_on =  false;
									 }
								   Send_data_stm32(3);             //caps_lock STM32									
									
                }
             }
            break;
      }
}


static uint32_t esb_init( void )
{
     uint32_t err_code;

    static  uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    static  uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
    static  uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };
		
    nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
    nrf_esb_config.protocol                 = NRF_ESB_PROTOCOL_ESB_DPL;
    nrf_esb_config.retransmit_delay         = 200;                        //600
    nrf_esb_config.bitrate                  = NRF_ESB_BITRATE_2MBPS;   //NRF_ESB_BITRATE_1MBPS NRF_ESB_BITRATE_2MBPS
    nrf_esb_config.event_handler            = nrf_esb_event_handler;
    nrf_esb_config.mode                     = NRF_ESB_MODE_PTX;
    nrf_esb_config.selective_auto_ack       = false ;                     // true; //
    nrf_esb_config.payload_length   = 32;                                 // 
		nrf_esb_config.tx_output_power  = NRF_ESB_TX_POWER_3DBM;
    err_code = nrf_esb_init(&amp;amp;nrf_esb_config);

    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_0(base_addr_0);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_1(base_addr_1);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_prefixes(addr_prefix, NRF_ESB_PIPE_COUNT);
    VERIFY_SUCCESS(err_code);

    return err_code;
}

//---------------------------2.4G
void esb_initial(void)
{  
    ret_code_t err_code;

    clocks_start();
    err_code = esb_init();
    APP_ERROR_CHECK(err_code);

}
....   //----Serial port receiving data--------
else if(receive_temp[1] == 0xfd)            //It&amp;#39;s keyboard data
	{											 										 
		keyboard_send = true; 
		if(running_mode == BLE_MODE){    
		if(m_conn_handle != BLE_CONN_HANDLE_INVALID)
			{	         
			memcpy(data_array,receive_temp+2,8); 
			* p_key = data_array[0];
			keys_send(sizeof(data_array), p_key);    //
			//NRF_LOG_INFO(&amp;quot;ble-keyboard-send&amp;quot;);
			}
		}
		else {
				tx_payload.length = 9;     
				tx_payload.noack = false; 
				memset(tx_payload.data,0,sizeof(tx_payload.data));
				memcpy(tx_payload.data ,receive_temp+1,9); 
				tx_payload.data[0]=REPORT_ID_KEYBOARD;     
                nrf_esb_write_payload(&amp;amp;tx_payload);
                // NRF_LOG_INFO(&amp;quot;esb-keyboard-send&amp;quot;);
				}
	}	
....&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The following is NRF52833 the receiving code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void clocks_start( void )
{
    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;

    while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
}


static void nrf_esb_event_handler(nrf_esb_evt_t const * p_event)
{
  static nrf_esb_payload_t rx_payload;
  switch (p_event-&amp;gt;evt_id)
    {
        case NRF_ESB_EVENT_TX_SUCCESS:
            NRF_LOG_INFO(&amp;quot;TX SUCCESS EVENT&amp;quot;);
            break;
        case NRF_ESB_EVENT_TX_FAILED:
            NRF_LOG_INFO(&amp;quot;TX FAILED EVENT&amp;quot;);
            break;
        case NRF_ESB_EVENT_RX_RECEIVED:
            NRF_LOG_INFO(&amp;quot;RX RECEIVED EVENT&amp;quot;);
            if (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)
            {
                   if(rx_payload.data[0] == REPORT_ID_KEYBOARD)   
                     {
      		          uint8_t i,x;
                      static report_keyboard_t  key_report={0}; 
                      key_report.mods=rx_payload.data[1];  
                      for(i=0,x=3;i&amp;lt;6;i++,x++)
                      {
                         key_report.keys[i]=rx_payload.data[x];
                         NRF_LOG_INFO(&amp;quot;Rx[%02X]&amp;quot;, key_report.keys[i]); 
                      }  
                      usb_kbd_keys_send(&amp;amp;key_report);                
                     } 
                   else {;}                                                  // Nothing to do
                
            }
            break;
    }
}


static uint32_t esb_init( void )
{
    uint32_t err_code;
    static uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    static uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
    static uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };
    nrf_esb_config_t nrf_esb_config = NRF_ESB_DEFAULT_CONFIG;
    nrf_esb_config.protocol         = NRF_ESB_PROTOCOL_ESB_DPL;
    nrf_esb_config.mode             = NRF_ESB_MODE_PRX;
    nrf_esb_config.event_handler    = nrf_esb_event_handler;
    nrf_esb_config.bitrate          = NRF_ESB_BITRATE_2MBPS;
    nrf_esb_config.payload_length   = 32;        
    nrf_esb_config.crc              = NRF_ESB_CRC_16BIT;
    nrf_esb_config.tx_output_power  = NRF_ESB_TX_POWER_0DBM;   //NRF_ESB_TX_POWER_0DBM;
    nrf_esb_config.selective_auto_ack = false;

    err_code = nrf_esb_init(&amp;amp;nrf_esb_config);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_0(base_addr_0);
    VERIFY_SUCCESS(err_code);
    err_code = nrf_esb_set_base_address_1(base_addr_1);
    VERIFY_SUCCESS(err_code);
    err_code = nrf_esb_set_prefixes(addr_prefix, 8);
    VERIFY_SUCCESS(err_code);


    return NRF_SUCCESS;
}

//---------------------------2.4G------------------------------------
void esb_initial(void)
{
  
   uint32_t err_code;
	
    clocks_start();  

    err_code = esb_init();
    APP_ERROR_CHECK(err_code);

    err_code = nrf_esb_start_rx();
    APP_ERROR_CHECK(err_code);
    USB_READY = false;

}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The ESB seems to experience occasional data loss. Sometimes it can receive the data when a key is pressed, but it fails to receive the data when the key is released. But Bluetooth doesn&amp;#39;t have this problem and it works very well.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ESB receiver sends problems</title><link>https://devzone.nordicsemi.com/thread/516510?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2024 12:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2ee26ae-e5b8-41c2-893d-17342f2dd64f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Please correct me if I&amp;#39;m wrong, what you have is one PRX and 2 PTX connect to it act as keyboards. And when you press CAPSLOCK on 2 keyboards at the same time only one get responded ?&amp;nbsp;If you press caplock on only one keyboard, do you see the other keyboard has letter in capital ? What I&amp;#39;m think of here is that the PC only has one CAPSLOCK status, when you turn on the CAPSLOCK on one keyboard, both get enabled (but the CAPSLOCK status LED will not turn on on the other keyboard as it didn&amp;#39;t receive the command to turn on the LED).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding your question about ESB, you can take a look here:&amp;nbsp;&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/esb_users_guide.html"&gt;docs.nordicsemi.com/.../esb_users_guide.html&lt;/a&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1735563251870v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If the ACK doesn&amp;#39;t come the packet will be retransmitted after a few attempt packet will be marked as missing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>