<?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 stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76857/button-stuck-upon-pressing-keeps-sending-signal-to-my-device</link><description>Hello everyone, 
 I&amp;#39;m using a modified version of SDK 15.0.0 ble_app_hids_keyboard on my nRF52 DK. It sends a volume up and a volume down command when I press buttons 1 or 2. However, the program gets stuck and won&amp;#39;t stop sending that command. My button</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Jul 2021 10:43:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76857/button-stuck-upon-pressing-keeps-sending-signal-to-my-device" /><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/321086?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 10:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f04f2d7-9ba5-487c-9e56-93ad0d8693b0</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your understanding, and for providing the project code.&lt;br /&gt;&lt;br /&gt;Looking over your code I see that you are not checking the returned error code from&amp;nbsp;app_button_init, for example. If the&amp;nbsp;app_button_init function makes it all the way to the end, it will return the error code from its call to start the&amp;nbsp;detection delay&amp;nbsp;timer.&lt;br /&gt;This means that the detection timer might be failing to start, without the application knowing.&lt;br /&gt;Please add an APP_ERROR_CHECK to this returned error code, and see if an error is returned here. If it is, please let me know which error was generated, so we may look into the API to figure out how we may fix it.&lt;br /&gt;&lt;br /&gt;Please also make sure to have DEBUG defined in your preprocessor defines, like shown in the included image:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5428.enabling_5F00_debug_5F00_SES.PNG" /&gt;&lt;br /&gt;This will make a detailed error message be outputted by your logger whenever a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.&lt;br /&gt;&lt;br /&gt;I would also recommend that you take a look through the code in general, to make sure that &lt;em&gt;all&lt;/em&gt; returned error codes are checked. The returned error codes is the only way for the application to know if a function call performed the expected function, or if some error handling is required.&lt;br /&gt;&lt;br /&gt;Looking forward to&amp;nbsp;resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/320516?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 21:48:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1721054d-05e9-4093-9727-7799a8d50493</guid><dc:creator>Gerardo Martin</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;No worries! I understand.&lt;/p&gt;
&lt;p&gt;Debouncing hasn&amp;#39;t been implemented yet. This code is mostly the ble_app_hids_keyboard in the sdk 15.0.0 folder. The changes that were made were adding one more button and letting the original buttons to send a different command. The added button was configured to send a pwm signal to an led. No changes were made specifically to the BSP module. I will be attaching my project folder since that will probably be easier to look through than snipets of code. As I remember, the buttons that are named volup_button and voldown_button used to work correctly until the button that sent the pwm signal worked correctly. Is there a conflict between the button configurations that causing the buttons to bounce?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3051.ble_5F00_app_5F00_hids_5F00_keyboard.zip"&gt;devzone.nordicsemi.com/.../3051.ble_5F00_app_5F00_hids_5F00_keyboard.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/320103?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 17:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20c8a0b2-9874-496e-b8f8-cc1176fae2cc</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this. The summer holidays have begun here in Norway, and DevZone is therefore operating with reduced staff for the time being. Sorry for any inconvenience this might cause.&lt;br /&gt;&lt;br /&gt;Runar is currently out of office, so I will be handling this case in his absence.&lt;/p&gt;
[quote user="Gerardo Martin"]However, it looks like the release function acts the same as the push function, hence constantly sending the same command over and over.[/quote]
&lt;p&gt;Interesting. Do you have debounce on your button? Have you made any changes to the BSP module, if so, could you detail these?&lt;br /&gt;It would be great if you could share a more complete version of your code, preferably containing the button initialization and configuration, along with any changes you might have made to the BSP module.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/319188?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 12:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ab3a228-40ab-4507-b857-865402c5a488</guid><dc:creator>Gerardo Martin</dc:creator><description>&lt;p&gt;Yes, I set a breakpoint on that line but it seems to trigger when I push the button, not release it. I&amp;#39;ve made sure that APP_BUTTON_PUSH and APP_BUTTON_RELEASE are&amp;nbsp;the correct values and would not trigger at the same time. However, it looks like the release function acts the same as the push function, hence constantly sending the same command over and over.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/319159?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 12:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9abc487-d610-42ae-86f0-4192c77023e0</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you check that the function &amp;quot;consumer_control_send(RELEASE_KEY)&amp;quot; is called when you release the button?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/318490?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 19:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f861adf1-2568-40bc-a1dd-2c6c9ebb94c4</guid><dc:creator>Gerardo Martin</dc:creator><description>&lt;p&gt;It happens at the first instance of a push on either button 1 or 2. So everything will be okay until the first push of those two buttons that it keeps sending that command. I don&amp;#39;t know where it&amp;#39;s getting stuck but it is not registering that the button is being released or else it would&amp;#39;ve stopped sending the command. The two buttons send a &amp;#39;vol up&amp;#39; and &amp;#39;vol down&amp;#39; command so what I see on my phone is something spamming the volume up or down repeatedly. If I push vol up, it&amp;#39;ll spam vol up and the other way is true.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button stuck upon pressing, keeps sending signal to my device</title><link>https://devzone.nordicsemi.com/thread/317708?ContentTypeID=1</link><pubDate>Tue, 29 Jun 2021 12:21:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409ba73f-c099-4ee7-a3e0-74b20e96b85b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]However, the program gets stuck and won&amp;#39;t stop sending that command[/quote]
&lt;p&gt;How often does it happen?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Do you know where it&amp;#39;s &amp;quot;stuck&amp;quot; ?&lt;/p&gt;
&lt;p&gt;What&amp;#39;s the reason for why the command is sent? Is e.g.&amp;nbsp;button_event_handler() being&amp;nbsp;constantly called?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>