<?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>Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71390/button-events-are-not-triggered-on-nrf52840-dongle</link><description>The single button in the Dongle does not generate any events. I have made all the relevant changes for the preprocessor for the usage with Dongle. Kindly let me know what to be modifed? 
 The buttons_handler in the below program does not get called</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 Feb 2021 12:30:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71390/button-events-are-not-triggered-on-nrf52840-dongle" /><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/294266?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 12:30:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0c2ba22-1888-4455-8f67-0b7dd9c97b2e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I don&amp;#39;t have any other suggestion than to follow one of the example or tutorials:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/board-support-package-bsp"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/board-support-package-bsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And please get an nRF52840-DK so you know the code works to begin with.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/294258?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 03:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea7e4beb-3864-4d2c-830c-a8e5f0a982b0</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;yes - I have followed that and that thread does not provide the solution.&amp;nbsp; So from Nordic standpoint, what should be the correct code to invoke a button event handler for the dongle button.&amp;nbsp; Can you please make it clear once and for all?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/293841?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 16:26:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97da75ed-9829-48a6-9322-0d0802cb271f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Try to check out this case:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/61010/button-handling-not-working-using-bsp"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/61010/button-handling-not-working-using-bsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/293825?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 15:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b7b1e55-6fe9-456c-bf98-a8616dace0d8</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;Somehow I check the forum and I am confused why we have the same answer?&amp;nbsp; :-)&amp;nbsp; Even if I use the DK for the development, and test one of the buttons, I would ultimately would want to port the .hex to Dongle and test that button&amp;nbsp; So how would it work if I am not referencing the correct button in dongle?&lt;/p&gt;
&lt;p&gt;why is it so difficult to just click a button and control the behavior via event.&amp;nbsp; It is not specific to zigbee or BLE or anything, just simple click of a button should light up an onboard LED&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/293417?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 17:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d848cafa-7f35-482e-8399-f292870a1938</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Some of the examples can be used with the nRF52840 Dongle, however since the dongle don&amp;#39;t contain a debugger/programmer I don&amp;#39;t recommend to use it for any development. I strongly recommend to get an nRF52840-DK for development:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_only_examples.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_only_examples.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_multi_examples.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_multi_examples.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The light switch example that you are working on is not supported by the dongle, I believe for instance the light switch use 4 buttons, while the dongle have 1.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button events are not triggered on NRF52840 Dongle</title><link>https://devzone.nordicsemi.com/thread/293224?ContentTypeID=1</link><pubDate>Sun, 07 Feb 2021 15:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bdedb1b-57dc-4cf2-95ce-1853a804ce93</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;Okay - here is a bit of modification done - but strange bahaviour&lt;/p&gt;
&lt;p&gt;1. After the .hex is loaded on the dongle, the Board LED lights up red, which means that the APP_BUTTON_PUSH is invoked automatically!&amp;nbsp; How?. Further pushing / release the dongle button has no affect, the led just stays red.&amp;nbsp; I was obviously expecting the corresponding color of the led to lit up when button is pressed / releases as handled in button_evt_handler&lt;/p&gt;
&lt;p&gt;2. The detection delay in the method app_button_init (defined using ZB_MILLISECONDS_TO_BEACON_INTERVAL(154)) has a strange behaviour. The led lights up only when the value is 154 and above.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define LIGHT_SWITCH_BUTTON_LONG_POLL_TMO   ZB_MILLISECONDS_TO_BEACON_INTERVAL(154)

static void button_evt_handler(uint8_t pin_no, uint8_t button_action)
{
    switch(pin_no)
    {
        case BSP_BOARD_BUTTON_0:
          if(button_action == APP_BUTTON_PUSH) 
          {
            bsp_board_led_on(BSP_BOARD_LED_1); // 1- Red
          }
          else if(button_action == APP_BUTTON_RELEASE) 
          {
            bsp_board_led_on(BSP_BOARD_LED_2); // 2- Green
          }
          break;
        default:
          bsp_board_led_on(BSP_BOARD_LED_3); // 3-Blue
          return;
    }
}


static void buttons_init(void)
{
    uint32_t err_code;

    static app_button_cfg_t buttons[] = 
    { 
        {BSP_BOARD_BUTTON_0, false, BUTTON_PULL, button_evt_handler}
    };

    err_code = app_button_init(buttons, ARRAY_SIZE(buttons), LIGHT_SWITCH_BUTTON_LONG_POLL_TMO);
    APP_ERROR_CHECK(err_code);

    err_code = app_button_enable();
    APP_ERROR_CHECK(err_code);
}  

int main(void)
{
    zb_ret_t       zb_err_code;
    zb_ieee_addr_t ieee_addr;

    log_init();
    app_timer_init();
    
    bsp_board_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS);
    buttons_init();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>