<?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>nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111919/nrf52832-central-device-cannot-receive-notifications-from-another-nrf52832-peripheral</link><description>Hello! 
 I am trying to collect data from an nRF52832 device which works as a peripheral to another device nRF52832 which operates as both Central and Peripheral. 
 Description: I connect with my phone to the Central-Peripheral Device with nRF Connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jun 2024 13:00:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111919/nrf52832-central-device-cannot-receive-notifications-from-another-nrf52832-peripheral" /><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488342?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 13:00:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab2868c7-5082-4c5f-a2e0-52381b7e0d17</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Dimitra&lt;/p&gt;
&lt;p&gt;Good to hear you found the issue, and thanks a lot for reporting the solution. I was just about to look more into your traces, so the timing was good &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488301?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 11:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb4011e2-c5dc-4edd-bb51-bc7b2c7207c5</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;Hello again, after more testing, I finally found the bug which was irrelevant to all the above.&lt;br /&gt;The bug was on the write function to the Write Characteristic and regarding about the type of data I send.&lt;/p&gt;
[quote userid="128023" url="~/f/nordic-q-a/111919/nrf52832-central-device-cannot-receive-notifications-from-another-nrf52832-peripheral"]function to write the uint8_t array in 0x0001 Characteristic[/quote]
&lt;p&gt;In this function i had to change&lt;br /&gt;this line:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;write_req.params.gattc_write.p_value  = (uint8_t *)&amp;amp;subscribe;&lt;/pre&gt;&lt;br /&gt;to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;write_req.params.gattc_write.p_value  = (uint8_t *)subscribe;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;because the subscribe is already an array...&lt;/p&gt;
&lt;p&gt;I am so sorry for creating such an issue and for spending your time on a question which was caused by another problem.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;By the way, always thankful for your assistance!&amp;nbsp;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Dimitra&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488165?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 14:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4644109c-5bd4-4ae9-bab2-ac13653ec415</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;Yes sure, I edited the answer above with the zip file, and one more question and observation.&lt;br /&gt;&lt;br /&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488139?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d5b68db-f775-4c1e-98fb-983ff218f5e0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will take a look at the details and get back to you tomorrow. Do you mind attaching the sniffer traces directly rather than just sending screenshots?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can simply drag drop a file into your reply to attach it (using zip is easier if you have multiple files).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488091?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 10:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ba79d2b-35d8-4348-aa3e-560fc64683b1</guid><dc:creator>DimitraN</dc:creator><description>[quote userid="2116" url="~/f/nordic-q-a/111919/nrf52832-central-device-cannot-receive-notifications-from-another-nrf52832-peripheral/488067"]One thing I spotted in the log is that you have a CCCD handle of 36, which implies that you have a pretty long GATT table? Are you sure this is correct?&amp;nbsp;[/quote]
&lt;p&gt;The Services and Characteristics are more than I said, apart from the Generic Access, Generic Attribute, there are:&lt;br /&gt;Device Information (0x180A)&lt;br /&gt;Battery Service (0x180F)&lt;br /&gt;UnknownService (0xFDF3)&lt;br /&gt;UnknownService(0x2252) :the one that I mentioned and which is the only one I want to have access to.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/111919/nrf52832-central-device-cannot-receive-notifications-from-another-nrf52832-peripheral/488067"]Have you tried to capture some sniffer traces of the two cases, first when using the nRF Connect app and it&amp;#39;s working fine, and then with your own central which is not working?&amp;nbsp;[/quote]
&lt;p&gt;I tried now for the first time, I haven&amp;#39;t used it before, I will present below the logs from Sniffer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1718015695098v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4403.sniff2.png" /&gt;&lt;/p&gt;
&lt;p&gt;here are the logs when my phone with nRF Connect app connects to the peripheral device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/sniff3.png" /&gt;&lt;/p&gt;
&lt;p&gt;here is the moment I write/subscribe to the write characteristic and to the cccd for the Notify&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/sniff4.png" /&gt;&lt;/p&gt;
&lt;p&gt;and here when I receive the Notification data&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Versus when Central-Peripheral Device connects with the peripheral&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1718015917898v3.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/snifS2.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1st&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;difference&amp;nbsp;&lt;/strong&gt; here is that my Central Device performs bonding, which I thought wouldnt cause a problem. Maybe I should deactivate it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/snifS3.png" /&gt;&lt;/p&gt;
&lt;p&gt;And here is when I Write to the Write characterstic&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So,&amp;nbsp;&lt;strong&gt;2nd difference&amp;nbsp;&lt;/strong&gt; is that my device tries to write to the characterstic of another Service (in the parenthesis it says Amersports, which is another service of the peripheral device) .&amp;nbsp;&lt;br /&gt;&lt;br /&gt;However, in my code,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define SENSOR_UUID_SERVICE             0x2252
#define NOTIFY_CHARACTERISTIC           0x0002
#define WRITE_CHARACTERISTIC            0x0001&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I let the Central device have acknowledge for only 0x2252 Service which is the only one I want it to communicate with, and with which I get the confirmation that it succesfuly discovered the Service and Characteristics,&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/connection_2D002D00_uuid.png" /&gt;&lt;/p&gt;
&lt;p&gt;these are the logs during connection.&amp;nbsp;&lt;br /&gt;So I thought that it scans and discovers and&amp;nbsp;&lt;strong&gt;assigns the connection handles&amp;nbsp;&lt;/strong&gt;to this Service and Characteristics only, and ignore others. (The Amersports service also has 2 characterstics 0x0001, 0x0002)&lt;br /&gt;Here are the 2 Services in nRF Connect App:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1718018233734.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&amp;nbsp;&lt;/strong&gt;I saved the traces into files (and also included them in text type)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8055.Wireshark_2D00_sniffertraces.zip"&gt;devzone.nordicsemi.com/.../8055.Wireshark_2D00_sniffertraces.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the folder, I also included the Log file from nRF Connect when my phone connects with the Peripheral device&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. From the Sniffer, do you agree that the conclusion is that it probably writes and enables the characterstics of the other Service?&amp;nbsp;&lt;br /&gt;2. If that is the case, how do I solve this problem, that my device must look only at the specific service?&amp;nbsp;&lt;br /&gt;3. If this is not the case, what else could be the problem, if the Sniffer helps ?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&amp;nbsp;&lt;/strong&gt;4.&amp;nbsp;Finally, this time I also captured the sniffer traces on the Central device side, and I noticed that when it attempts to write something on the write characteristic or on cccd there is a message &amp;quot;Encrypted packet decrypted incorreclty (bad MIC)&amp;quot;. What does this mean?&amp;nbsp;Could it be relevant?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Central device cannot receive Notifications from another nRF52832 peripheral</title><link>https://devzone.nordicsemi.com/thread/488067?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 09:14:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1905a824-9f75-4231-80f7-9bbf99e08fbd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Dimitra&lt;/p&gt;
&lt;p&gt;Have you tried to capture some sniffer traces of the two cases, first when using the nRF Connect app and it&amp;#39;s working fine, and then with your own central which is not working?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then it should be quite easy to figure out what is different in the two cases, which should hopefully point to a solution.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One thing I spotted in the log is that you have a CCCD handle of 36, which implies that you have a pretty long GATT table? Are you sure this is correct?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you only&amp;nbsp;use two characteristics I wouldn&amp;#39;t expect you to reach a handle of 36.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>