<?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>combining central and peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58528/combining-central-and-peripheral</link><description>Hi, 
 my application is normally a BLE scanner, listening for beacons. This runs OK. 
 Now, I tried to add a tested piece of connectable gap/gatt firmware, that runs fine in another application. The idea is to have the processor check a pushbutton at</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Mar 2020 08:50:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58528/combining-central-and-peripheral" /><item><title>RE: combining central and peripheral</title><link>https://devzone.nordicsemi.com/thread/237945?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 08:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c3369db-0c3d-4fbc-bff7-7e5a90d92cea</guid><dc:creator>Henk Pragt</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t believe I missed that, shame on me ;-) &lt;/p&gt;
&lt;p&gt;Thanks for your support,&lt;/p&gt;
&lt;p&gt;Henk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: combining central and peripheral</title><link>https://devzone.nordicsemi.com/thread/237831?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 15:05:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f9ae08-c06e-4274-b9d3-c3706b949603</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;From the code you posted, it looks like you are not assigning the error code to the err_code variable. What you are seeing is most likely garbage from RAM. Please change your code to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;err_code = sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;char_uuid.type);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: combining central and peripheral</title><link>https://devzone.nordicsemi.com/thread/237657?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 09:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64b5d86f-efcd-46a2-8ea4-352aac8ec4a4</guid><dc:creator>Henk Pragt</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;thanks for your support.&lt;/p&gt;
&lt;p&gt;The actual error code seems to change with software modifications, but is always high. Here is a recent one:&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; app: ERROR 203971 [Unknown error code] at C:\Nordic\nRF5_SDK_16.0.0_98a08e2\531904\src-eml-ble\rev000\EBTgap.c:278&lt;br /&gt;&lt;br /&gt;PC at: 0x00031B11&lt;br /&gt;&lt;br /&gt;&amp;lt;error&amp;gt; app: End of error report&lt;/p&gt;
&lt;p&gt;The code from line 275 onwards is:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; char_uuid.uuid = cstm_uuid;&lt;br /&gt;&amp;nbsp; ces_handles.ces_short_uuid[char_no] = cstm_uuid; // for quick look-up of handle&lt;br /&gt;&amp;nbsp; sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;char_uuid.type);&lt;br /&gt;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;I copied the config settings from the app with the original gap/gatt firmware:&lt;/p&gt;
&lt;p&gt;#define NRF_SDH_BLE_ENABLED 1&lt;br /&gt;#define NRF_SDH_BLE_GAP_DATA_LENGTH 27&lt;br /&gt;#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1&lt;br /&gt;#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 1&lt;br /&gt;#define NRF_SDH_BLE_TOTAL_LINK_COUNT 1&lt;br /&gt;#define NRF_SDH_BLE_GAP_EVENT_LENGTH 800&lt;br /&gt;#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 583&lt;br /&gt;#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 5128&lt;br /&gt;#define NRF_SDH_BLE_VS_UUID_COUNT 1&lt;br /&gt;#define NRF_SDH_BLE_SERVICE_CHANGED 0&lt;/p&gt;
&lt;p&gt;The project is fairly large, with a uart interface to wirepas where proprietory data is transferred. I cannot share that part, but if needed, I can make a reduced version with just the scanner and the gap/gatt parts for you to examine. For now, the complete config file is uploaded to&amp;nbsp; &lt;a title="sdk_config" href="http://www.exatech.nl/downloads/sdk_config.h"&gt;sdk_config.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;thx, Henk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: combining central and peripheral</title><link>https://devzone.nordicsemi.com/thread/237542?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 17:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9b39877-c578-4523-912c-6fa2fafc9f58</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;203995 does not seem like an expected error code from&amp;nbsp;sd_ble_uuid_vs_add, are you sure this is the correct error code?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you changed the sdk_config.h file (NRF_SDH_BLE_VS_UUID_COUNT) and project memory config to allow space for the vendor-specific UUID?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which SDK version are you using? Can you upload your project for us to reproduce and debug the error?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>