<?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>Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34686/adding-peer-manager-to-multiperipheral-example-and-getting-fatal-error</link><description>Hi Nordic Team! 
 I have bought nRF52 DK and my aim is to create BLE application for a peripheral that it would be possible to connect multiple centrals (for example android smartphones) to it. I use SEGGER Embedded Studio for ARM V3.34b 64bit to flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jun 2018 08:47:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34686/adding-peer-manager-to-multiperipheral-example-and-getting-fatal-error" /><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/135091?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 08:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:967bfa55-d73e-4398-8d2e-2ada28ff7064</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Well now I am seeing multi_peer and it pairs but why does it matter that now I have:&lt;/p&gt;
&lt;p&gt;*used the SoftDevice of the same name and same version but from different folder&lt;/p&gt;
&lt;p&gt;*flashed the program from nRFgo studio programming tab instead of drag and dropping to JLINK folder?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;anyway thanks Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/135086?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 08:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ec01df3-7612-4378-a4e6-c2ddbf7087cc</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;The files you find in the &amp;quot;hex&amp;quot; folder is already precompiled .hex files from the &lt;strong&gt;unmodified&amp;nbsp;&lt;/strong&gt;SDK example (&lt;em&gt;in this case the &amp;#39;ble_app_multiperipheral&amp;#39; application)&lt;/em&gt;. So when you are flashing one of the .hex files found there, you are just really running the &lt;strong&gt;unmodified&lt;/strong&gt; &amp;quot;ble_app_multiperipheral&amp;quot; example. If you look into each example in the SDK you can see this folder.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To test the modified application Try this:&lt;/p&gt;
&lt;p&gt;1. Erase whats on the chip.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Flash the SD &lt;em&gt;[nRF5_SDK_15.0.0_a53641a\nRF5_SDK_15.0.0_a53641a\components\softdevice\s132\hex]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;3. Flash the Application [&lt;em&gt;nRF5_SDK_15.0.0_CUSTOM\examples\ble_peripheral\experimental\ble_app_multiperipheral - Copy\pca10040\s132\arm5_no_packs\_build]&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ea96fd10d1b548e99da45bfd70051025/pastedimage1528359873056v1.png" alt=" " /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/135072?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:421e712d-fd41-4215-8743-dc433e8b2703</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;erase:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528356536078v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;SD:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528356648308v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;hex:&lt;/p&gt;
&lt;p&gt;When I flash this (it WAS inside the .zip you have provided, Martin):&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528357343299v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;it advertises as nordic_blinky, shows up in terminal and behaves just like I described 2 hours ago (no bonding)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I flash this hex&amp;nbsp;&lt;em&gt;ble_app_multiperipheral - Copy\pca10040\s132\arm5_no_packs\_build&lt;/em&gt; (after erasing and flashing SoftDevice):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1528357016475v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;it doesn&amp;#39;t advertise (even the LED for advertising is off), doesn&amp;#39;t show in nrfConnect app, no output to puTTY.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/135063?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:08:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cee57fc-302d-4971-9512-bef5992baf78</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;I am glad that you got it to work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The reason there is no &amp;#39;ses&amp;#39; folder is because I used Keil and delete the other folders to make the .zip file smaller. (&lt;em&gt;You could use main.c/sdk_config.h as reference if you need to)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;- You shouldn&amp;#39;t worry about that.&lt;/p&gt;
&lt;p&gt;Because it sounds that you have flashed another .hex file than what is in the .zip file. (it should show up as &amp;quot;multi_peer&amp;quot; in the app)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you want to try it, Remember to erase whats on the chip (&amp;quot;nrfjprog -e&amp;quot;) before you try to flash the .hex file in [\ble_app_multiperipheral - Copy\pca10040\s132\arm5_no_packs\_build] folder + the softdevice.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/135044?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 05:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d49d30c8-a2e6-4800-aaf4-9b9ad98b5009</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Yes, in the last days I have added peer manager and it seems working. I used the method I described. I just don&amp;#39;t know where I made a mistake or something. Also I have implemented passkey entry.&lt;/p&gt;
&lt;p&gt;Thank you for your file, now I can use it in future for reference but there is something strange about it. There is no &amp;#39;ses&amp;#39; folder which I can check and compile so I just moved&amp;nbsp;&lt;em&gt;hex&lt;/em&gt; file directly to JLINK, it flashes and &amp;quot;multiperipheral example started&amp;quot; shows in terminal, chip shows in the mobile app as nordic_blinky, I am able to connect but unable to pair. I press bond but app shows &amp;quot;pairing rejected...&amp;quot;. Should I worry about this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/134989?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 14:27:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c886ac49-a2f2-45c6-a408-e1a020771038</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;Have you had any progress on this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have added MultiPeripheral example with peer manager added which seem to work.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ea96fd10d1b548e99da45bfd70051025/ble_5F00_app_5F00_multiperipheral-_2D00_-Copy.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_multiperipheral-_2D00_-Copy.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/133370?ContentTypeID=1</link><pubDate>Fri, 25 May 2018 08:43:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b076519-775f-4d6e-9511-a86914b4a8a1</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Hi Martin&lt;/p&gt;
&lt;p&gt;Firstly thanks for the response, I was waiting for it. I have just opened fresh unmodified multiperipheral example to work with.&lt;/p&gt;
&lt;p&gt;Secondly the &amp;quot;&lt;span&gt;old blog&lt;/span&gt;&amp;quot; I was relying mostly comes from the documentation you have linked. There is a bug in this documentation, I believe: the function is&amp;nbsp;&lt;em&gt;&lt;span&gt;peer_manager_event_handler&lt;/span&gt;&lt;/em&gt;&amp;nbsp;but&amp;nbsp;&lt;em&gt;&lt;span&gt;peer_manager_init &lt;/span&gt;&lt;/em&gt;&lt;span&gt;calls&lt;/span&gt;&amp;nbsp;&lt;em&gt;pm_evt_handler&lt;/em&gt;. But I have added&amp;nbsp;&lt;span&gt;&lt;em&gt;peer_manager_init&lt;/em&gt;,&amp;nbsp;&lt;em&gt;pm_evt_handler &lt;/em&gt;function definitions, security parameters and a call from&amp;nbsp;&lt;em&gt;main&lt;/em&gt; function. I have omitted &amp;quot;Storing data&amp;quot; and &amp;quot;Using whitelist&amp;quot; paragraphs.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Moreover setting&amp;nbsp;&amp;nbsp;PEER_MANAGER_ENABLED 1 is not enough, I do also have to set&amp;nbsp;NRF_FSTORAGE_ENABLED 1 and&amp;nbsp;FDS_ENABLED 1 to get rid of compiling errors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have also added many &lt;strong&gt;.c&lt;/strong&gt; files which I listed in the 1st post.&lt;/p&gt;
&lt;p&gt;Now my project compiles and flashed. I am able to connect masters to it but when I try to pair/bond I get the same Fatal Error and the identical CallStack when I debug this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe if there is no guide without errors and uncertainties you could provide a MultiPeripheral example with already implemented Peer Manager?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Below I am pasting all the changes I have done to the original project:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://hastebin.com/vuvimogubu.cpp"&gt;main.c&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://hastebin.com/lixazotiwi.cpp"&gt;sdk_config.h&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://hastebin.com/wemehiliro.xml"&gt;ble_app_multiperipheral_pca10040_s132.emProject&lt;/a&gt; &lt;/em&gt;(with listed all the files and libraries)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I really need help on this, whitout it I cannot procced.&lt;/p&gt;
&lt;p&gt;thanks in advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/133278?ContentTypeID=1</link><pubDate>Thu, 24 May 2018 14:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6ffad8a-7d91-4cab-8a8c-7ee5fd83c2ad</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;I am sorry, but it seems that you have followed some old blogs about older SDK versions,&amp;nbsp;&lt;em&gt;where SES support wasn&amp;#39;t integrated and where you didn&amp;#39;t have peer manager.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It will just cause more trouble and work continuing down that path, so instead&amp;nbsp;I would recommend you to use the &lt;em&gt;(unmodified)&lt;/em&gt;&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_multiperipheral.html&amp;amp;cp=4_0_0_4_1_2_25" target="_blank" rel="noopener noreferrer"&gt;BLE MultiPeripheral&lt;/a&gt; example as a base then add the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_peer_manager.html&amp;amp;cp=4_0_0_3_2_7" target="_blank" rel="noopener noreferrer"&gt;Peer Manager &lt;/a&gt;as described in the documentation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Example found in [&lt;em&gt;RF5_SDK_15\examples\ble_peripheral\experimental\ble_app_multiperipheral\pca10040\s132\ses]&lt;/p&gt;
&lt;p&gt;&lt;em&gt;-&amp;gt; Remember to enable Peer Manager in sdk_config.h&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;e&amp;gt; PEER_MANAGER_ENABLED - peer_manager - Peer Manager
//==========================================================
#ifndef PEER_MANAGER_ENABLED
#define PEER_MANAGER_ENABLED 1
#endif&lt;/pre&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;-&amp;gt; Then follow the descriptions in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_pm_usage.html&amp;amp;cp=4_0_0_3_2_7_2" target="_blank" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/133195?ContentTypeID=1</link><pubDate>Thu, 24 May 2018 10:31:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03f15a48-08f6-4446-bfbb-bedbec5c1163</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Update number 2 on this error:&lt;/p&gt;
&lt;p&gt;I have added&amp;nbsp;&lt;em&gt;&amp;nbsp;NRF_LOG_INFO(&amp;quot;event nr: %x&amp;quot;, p_ble_evt-&amp;gt;header.evt_id);&lt;/em&gt; and commented below case&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
            // Pairing not supported
            err_code = sd_ble_gap_sec_params_reply(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle,
                                                   BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP,
                                                   NULL,
                                                   NULL);
            APP_ERROR_CHECK(err_code);
            break;
*/&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;inside&amp;nbsp;&lt;em&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)&lt;/em&gt; in &lt;strong&gt;main.c.&lt;/strong&gt; I am able to connect AND bond. Here is the PuTTY log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Erase bonds!
&amp;lt;info&amp;gt; app: Multiperipheral example started.
&amp;lt;info&amp;gt; app: event nr: 10
&amp;lt;info&amp;gt; app: Connection with link 0x0 established.
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 13
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 1A
&amp;lt;info&amp;gt; app: Connection secured: role: 1, conn_handle: 0x0, procedure: 1.
&amp;lt;info&amp;gt; app: event nr: 19
&amp;lt;info&amp;gt; app: event nr: 12
&amp;lt;info&amp;gt; app: event nr: 12
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and for reconnection:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: event nr: 11
&amp;lt;info&amp;gt; app: Connection 0x0 has been disconnected. Reason: 0x13
&amp;lt;info&amp;gt; app: Connected to a previously bonded device.
&amp;lt;info&amp;gt; app: event nr: 10
&amp;lt;info&amp;gt; app: Connection with link 0x1 established.
&amp;lt;info&amp;gt; app: event nr: 14
&amp;lt;info&amp;gt; app: Connection secured: role: 1, conn_handle: 0x1, procedure: 0.
&amp;lt;info&amp;gt; app: event nr: 1A
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t like how I got no control over this. I mean the case inside the switch isn&amp;#39;t supposed to be just commented out, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding peer manager to multiperipheral example and getting FATAL ERROR</title><link>https://devzone.nordicsemi.com/thread/133182?ContentTypeID=1</link><pubDate>Thu, 24 May 2018 09:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:141b6e75-d3b5-44e2-a674-c3a02154a023</guid><dc:creator>Pawel Niedbala</dc:creator><description>&lt;p&gt;Update on this error:&lt;/p&gt;
&lt;p&gt;I have set breakpoint inside&amp;nbsp;&lt;em&gt;app_error_handler_bare&lt;/em&gt; function in &lt;strong&gt;app_error.c&lt;/strong&gt; file and below there is call stack with error of &lt;span style="text-decoration:underline;"&gt;invalid state&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x1251/__key/communityserver-discussions-components-files/4/3644.error_5F00_callStack.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>