<?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>error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13321/error-in-ble_app_beacon-sample-when-modyfing-advertising-parameters</link><description>Hi all, i have loaded the example on my smart beacon kit (nrf51822 chip with softdevice s110), and it runs without problems. But in this example, the &amp;quot;normal mode&amp;quot; of the beacon doesn&amp;#39;t allow a device to connect, because the parameter in the advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Apr 2016 19:21:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13321/error-in-ble_app_beacon-sample-when-modyfing-advertising-parameters" /><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50782?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 19:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b03b4aaf-05f0-4ba0-9ac8-5df8bcb22e64</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;That is correct indeed. I might misunderstood your question previously. It is obvious as you stated your self, if you are initializing beacon to normal mode, gap and conn params are not initialized, so you can&amp;#39;t connect to the device, cuz you skipped configuration for doing that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50781?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 19:09:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b9882ae-fb6c-49f1-8346-f0609fcf54d6</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Well, as you can see, in the function beacon_setup, if the beacon is NOT in config mode (which is normal mode, just turning it on) it just executes the advertising_init and not the initialization of connection parameters, gap parameters and so on, so i think it can&amp;#39;t obviously connect like this. This is probably the problem right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50780?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 13:57:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45007015-2f44-401d-9f0a-336a986e0e32</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Well i obviuosly might be missing something, but after quick skim i didn&amp;#39;t see anything wrong with the code. Did you try to look where your code hangs up? Does it end in app_error_handler or somewhere else? Hard to say something more from just looking at the code, can&amp;#39;t test it right now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50779?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 13:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6507710-bef0-4c42-be8e-a5021913402e</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I added the code, however i think i found out the solution; in the initialization of the beacon, if in normal mode there is only advertising_init called, instead in the config mode there is everything (in config it always worked, connection included). Now i just substituted the config mode with the normal mode, deleting the &amp;quot;if&amp;quot; statements. Please confirm!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50778?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 13:03:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23fd7dff-8c29-433b-9b32-ae17eb714c4c</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;post full code of main.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50777?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18832ef-dbcc-4b8f-8678-b29fd5263979</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I checked the functions advertising_init, gap_params_init, conn_params_init, the only difference i found between the two codes (besides the already cited NONCONN of course) is in conn_params_init:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cp_init.start_on_notify_cccd_handle    = m_hrs.hrm_handles.cccd_handle;; // what there is in the heart rate example

cp_init.start_on_notify_cccd_handle    = BLE_GATT_HANDLE_INVALID; // what i have in my code
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However i don&amp;#39;t think this is important, at this stage i don&amp;#39;t want to send any data but just set up the connection between devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50776?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c853aa91-890c-4381-98c4-07f6a005634c</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;I don&amp;#39;t remember now, but i think there is a lot more info put there in advertisement packet in that beacon example (UUID for example). You can use debugger actually to see what is put inside. As for gap_params, i don&amp;#39;t remember that beacon example had those params set. Take a close look at the provided example. Are you sure you are setting gap_params and conn_params correctly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50775?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ee013d7-dcbb-4a8c-875f-35279e60ba8a</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Yes i know that but it can&amp;#39;t be that since the name included in the example is by default (BeaconConfig in particular), it&amp;#39;s just not shown because in the parameters there is NO_NAME by default. However i also tried to change this name to a single letter to make it as short as possible and it doesn&amp;#39;t change anything, it still doesn&amp;#39;t advertise (note, just by changing the name OR changing the connection parameters). I&amp;#39;m having a bit trouble understanding where is the problem ^^&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50774?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:16:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1303ad58-6141-4f73-a9d4-59059e11de35</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;This might happen if your device name is too long. Keep in mind that your advertisement packet size is only 31 byte. I have asked some time ago about structure of advertisement packets. You can read about it here &lt;a href="https://devzone.nordicsemi.com/question/68476/s110-advertisement-packet-structure-of-nrf51422/"&gt;advetisement-packet-structure&lt;/a&gt;.
That should make things a little clearer for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50773?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:06:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35a84210-972d-4d2e-b2e9-bd9199a1c79f</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Thanks. I see also that if i change the field of my beacon&amp;#39;s name, which in the code is NO_NAME, to FULL_NAME, it happens the same thing, is for the same reason? I can&amp;#39;t modify these parameters like this? I am going to check shortly the example you posted!&lt;/p&gt;
&lt;p&gt;EDIT: i am looking at the heart rate example, the gap_params_init and adv_init seems pretty similar to the one in the ble_app_beacon example, where should i look to see how make my code connectable?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error in ble_app_beacon sample when modyfing advertising parameters</title><link>https://devzone.nordicsemi.com/thread/50772?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f830f97b-9491-4800-af08-d212430cd114</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Changing &lt;code&gt;m_adv_params.type = BLE_GAP_ADV_TYPE_ADV_NONCONN_IND;&lt;/code&gt;to &lt;code&gt;m_adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;&lt;/code&gt; is not enough. This example doesn&amp;#39;t allow to do connections.&lt;/p&gt;
&lt;p&gt;See ble_app_hrs example. That has all the configurations you need to do connections -&amp;gt;
&lt;a href="https://github.com/NordicSemiconductor/ble_app_hrs---LongWrite/blob/master/main.c"&gt;ble_app_hrs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>