<?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>PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48543/pa-lna-in-ble-softdevice-stack-switching-off-during-mesh-provisioning-process</link><description>Hello, 
 We have the following problem with a custom board based on the nRF52832 and the SKY66112-11 PA LNA, running as a mesh node. 
 The SDKs used are nrf5_SDK_for_Mesh_v3.1.0_src and nRF5_SDK_15.2.0_9412b96. 
 The application running on the board is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Nov 2019 15:08:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48543/pa-lna-in-ble-softdevice-stack-switching-off-during-mesh-provisioning-process" /><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/220125?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2019 15:08:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d3215ce-a2e2-44a1-af9b-bc36d4046593</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;PA/LNA is switched off in SoftDevice because&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;mesh_provisionee.c&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;restarts it in order to clean GATT Database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The configuration should be restored after SoftDevice is restarted, but before a connection with the phone is established. But once&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;proxy_node_id_enable()&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is called in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;mesh_provisionee.c&lt;/b&gt;, it initiates advertising. At this point the SoftDevice configuration can&amp;#39;t be changed. Thus the customer can&amp;#39;t use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;prov_complete_cb()&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to re-configure SoftDevice.&lt;/p&gt;
&lt;p&gt;The following work around will fix this issue,&amp;nbsp;&lt;span&gt;modify&amp;nbsp;&lt;/span&gt;&lt;b&gt;examples/common/src/mesh_provisionee.c:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="text"&gt;--- a/examples/common/src/mesh_provisionee.c
+++ b/examples/common/src/mesh_provisionee.c
@@ -116,6 +116,28 @@ static void sd_state_evt_handler(nrf_sdh_state_evt_t state, void * p_context)
             err_code = nrf_sdh_ble_enable(&amp;amp;ram_start);
             APP_ERROR_CHECK(err_code);
 
+            ble_opt_t ble_pa_lna_opts = {
+                .common_opt = {
+                    .pa_lna = {
+                        .pa_cfg = {
+                            .enable = 1,
+                            .active_high = 1,
+                            .gpio_pin = 24
+                        },
+                       .lna_cfg = {
+                            .enable = 1,
+                            .active_high = 1,
+                            .gpio_pin = 25
+                        },
+                        .ppi_ch_id_set = 0,
+                        .ppi_ch_id_clr = 1,
+                        .gpiote_ch_id = 0
+                    }
+                }
+            };
+
+            err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &amp;amp;ble_pa_lna_opts);
+            APP_ERROR_CHECK(err_code);
 
 #if MESH_FEATURE_GATT_PROXY_ENABLED
             mesh_key_index_t key_index;&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/194115?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 12:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:256ec30f-e1d5-4684-b9d0-6a48d1e63182</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;When doing provisioning, the softdevice will be disabled and re-enabled. This might be the cause of the issue you are seeing.&lt;/p&gt;
&lt;p&gt;Could you try to call &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/group__MESH__PA__LNA.html#ga2d2c9a1a1f292caa3fea66429e27318e" rel="noopener noreferrer" target="_blank"&gt;mesh_pa_lna_gpiote_enable()&lt;/a&gt; again in the provisioning complete callback?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193508?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 21:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad410ee1-09bc-4bdc-a024-455be7359beb</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;Hello Mttrinh,&lt;/p&gt;
&lt;p&gt;Just did the test and yes, also when I use the static provisioner (running on a PCA10040), the PA LNA is switched OFF in the BLE stack (measured with our sniffer) and stays on in the Mesh stack.&lt;/p&gt;
&lt;p&gt;When the board is rebooted the PA LNA is&amp;nbsp;ON in the Mesh stack and the BLE stack.&amp;nbsp; Exactly the same situation as when using the nRF Mesh app for provisioning and configuration.&lt;/p&gt;
&lt;p&gt;Thanks again for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193349?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 09:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1dbe0b0-f397-475f-b53c-b608cb198809</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Can you try using the provisioner example from our SDK to provision the device, instead of nRF Mesh app? See if the PA LNA still is switching off.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193231?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 14:34:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb1c2feb-faf4-4971-a91a-ee28f11b4e94</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;And to add to my latest feedback: When the PA LNA isn&amp;#39;t enabled in the Mesh stack, during the provisioning/configuration phase the BLE stack also doesn&amp;#39;t seem to support the PA LNA but when the board is rebooted the PA LNA is running at full power in the BLE stack.&amp;nbsp; The PA LNA stays off in the Mesh stack off course since it wasn&amp;#39;t enabled anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193221?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 14:04:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:988e3c34-52b9-4ed6-8c6a-9280ac0c6e84</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;Hello Mttrinh,&lt;/p&gt;
&lt;p&gt;Yes, also then the PA LNA doesn&amp;#39;t run with the BLE stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193216?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 13:55:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79b8cab8-9683-4c0c-b64b-184a0027db02</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;If you leave out Mesh and try PA LNA with BLE stack only, does it work? Do you see the same issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193199?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 13:13:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8966d414-c705-493f-b211-bc2edb957305</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;Hello Mttrinh,&lt;/p&gt;
&lt;p&gt;Thanks for the follow-up.&amp;nbsp; No I didn&amp;#39;t try it on a DK since these don&amp;#39;t have a PA LNA on board.&lt;/p&gt;
&lt;p&gt;Since the PA LNA works perfectly well with the Mesh stack on our custom board, I don&amp;#39;t see why there should be a difference when the BLE stack takes over.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193193?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 13:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0aa46b8-433b-4eba-8237-d326b1939dd5</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;It seems like&amp;nbsp;&lt;span&gt;initialize function is correct, have you tried the code on a DK to see if there is anything wrong with your custom board?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/193120?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 09:45:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cffd82f-eb09-40a9-8551-0e9e50662072</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;Hello Mttrinh,&lt;/p&gt;
&lt;p&gt;We absolutely need to have this solved so we need your help.&lt;/p&gt;
&lt;p&gt;To start with a clean sheet we took a fresh&amp;nbsp;BLE Mesh Light Switch Server Demo and added the PA LNA&amp;nbsp; init parameters as described earlier.&lt;/p&gt;
&lt;p&gt;Here is how the initialize function looks like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void initialize(void)
{
    uint32_t err_code;

    __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_BEARER, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- BLE Mesh Light Switch Server Demo -----\n&amp;quot;);

    ERROR_CHECK(app_timer_init());
    hal_leds_init();

#if BUTTON_BOARD
    ERROR_CHECK(hal_buttons_init(button_event_handler));
#endif

    ble_stack_init();

    err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &amp;amp;ble_pa_lna_opts);
    APP_ERROR_CHECK(err_code);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Return from sd_ble_opt_set = 0x%04x\n&amp;quot;, err_code);


#if MESH_FEATURE_GATT_ENABLED
    gap_params_init();
    conn_params_init();
#endif

    mesh_init();

    err_code = mesh_pa_lna_gpiote_enable(&amp;amp;m_pa_lna_params);
    APP_ERROR_CHECK(err_code);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Return from mesh_pa_lna_gpiote_enable = 0x%04x\n&amp;quot;, err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please have a look at the following screen captures you will see that everything goes well untill the BLE stack has to kick in.&amp;nbsp; Apparently the PA LNA isn&amp;#39;t driven at all by the BLE stack.&lt;/p&gt;
&lt;p&gt;Here is a screen shot from our sniffer when the proxy takes over:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/688x408/__key/communityserver-discussions-components-files/4/pastedimage1560764518443v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;And here is what RTT Viewer says:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1280x960/__key/communityserver-discussions-components-files/4/pastedimage1560764565305v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Looking forward to your further feedback.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/192959?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 14:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25425d12-ca65-472e-ba41-b81d28d333ed</guid><dc:creator>EddyB</dc:creator><description>&lt;p&gt;Yes, I have seen these and taken all the advise into account.&amp;nbsp; Still I have this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PA LNA in BLE Softdevice stack switching off during mesh provisioning process.</title><link>https://devzone.nordicsemi.com/thread/192957?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 13:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa16acf-b791-477b-ba1c-d3d018426445</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you taken a look at the documentation found &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/md_doc_getting_started_how_to_pa_lna.html?cp=5_2_1_7" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;&amp;nbsp;and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.1.0/group__MESH__PA__LNA.html" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;? This &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44892/regarding-pa-lna-in-mesh-sdk/177990" rel="noopener noreferrer" target="_blank"&gt;case &lt;/a&gt;might be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>