<?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>NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60210/nrf_error_invalid_state-error-on-new-characteristic</link><description>I am trying to modify the existing Thingy-52 code to have a &amp;#39;new&amp;#39; characteristic. I used the existing Thingy code to &amp;#39;clone&amp;#39; a new characteristic (a 2nd microphone channel). My problem is that whenever I try to write to the channel I get an NRF_ERROR_INVALID_STATE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Apr 2020 09:28:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60210/nrf_error_invalid_state-error-on-new-characteristic" /><item><title>RE: NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/thread/245472?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 09:28:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0010b67f-d33d-4de8-b7be-835614eb629e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I could find a user guide for the nRF Connect for desktop:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfconnect_ble/UG/nRF_Connect_BLE/nRF_Connect_intro.html"&gt;https://infocenter.nordicsemi.com/topic/ug_nrfconnect_ble/UG/nRF_Connect_BLE/nRF_Connect_intro.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can find a description of nRF Connect mobile here:&lt;br /&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect/tree/master/documentation"&gt;https://github.com/NordicSemiconductor/Android-nRF-Connect/tree/master/documentation&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/thread/245071?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 15:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee24bc5-aaa3-4b5b-bd19-e024a3d175ac</guid><dc:creator>SentinelLighting</dc:creator><description>&lt;p&gt;I do have nrf Connect.&amp;nbsp; Where do you go to enable notifications?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/thread/245067?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 15:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b054e7d7-b923-4ed8-aebe-6cf764301ff8</guid><dc:creator>Kenneth</dc:creator><description>[quote user="SentinelLighting"]Does the Thingy app somehow &amp;#39;enable&amp;#39; the notifications on a per characteristic basis?&amp;nbsp; That would explain why I get an error.[/quote]
&lt;p&gt;Could be, do you have the possibility to use nRF Connect app to manually enable the notifications?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/thread/244974?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 12:04:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b60dadd-4356-4215-8822-1dc2aa2e8b4b</guid><dc:creator>SentinelLighting</dc:creator><description>&lt;p&gt;The new characteristic always errors.&amp;nbsp; In my testing I establish a connection between the Thingy app and my modified code.&amp;nbsp; I then have it start to transmit the sound data for both the existing &amp;#39;right&amp;#39; channel and my new &amp;#39;left&amp;#39; sound channel.&amp;nbsp; The right channel transmits fine with no errors.&amp;nbsp; The new &amp;#39;left&amp;#39; channel continuously errors.&amp;nbsp; For the new characteristic I tried to &amp;#39;clone&amp;#39; the set up and handler code from the existing one as much as possible&lt;br /&gt;&lt;br /&gt;Does the Thingy app somehow &amp;#39;enable&amp;#39; the notifications on a per characteristic basis?&amp;nbsp; That would explain why I get an error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_INVALID_STATE error on new characteristic</title><link>https://devzone.nordicsemi.com/thread/244877?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 07:45:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34659ddf-4aeb-4c86-958d-ba90a3e27894</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;It is common that&amp;nbsp;&lt;span&gt;sd_ble_gatts_hvx() return&lt;/span&gt;&amp;nbsp;&lt;span&gt;NRF_ERROR_INVALID_STATE upon power on and initial connection, e.g. because the peer need to connect, do a database discovery of the peripheral and then enable the notifications in the database. I think the question for you is whether&amp;nbsp;sd_ble_gatts_hvx() always return&amp;nbsp;NRF_ERROR_INVALID_STATE (even for instance after other notifications are working)?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>