<?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>How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34186/how-to-set-sending-power-of-nrf52810-with-sdk15-0</link><description>Hi, 
 I want to set sending power(+4dBm) of NRF52810/NRF52832 with SDK 15.0. 
 Now,i find i should use the order of sd_ble_gap_tx_power_set(uint8_t role, uint16_t handle, int8_t tx_power)); 
 But , i donn&amp;#39;t the meaning of second parameter. 
 List as follows</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Nov 2019 02:52:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34186/how-to-set-sending-power-of-nrf52810-with-sdk15-0" /><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/217864?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 02:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cef0189-10a1-4cc2-a644-eac55f1e66d0</guid><dc:creator>Rafael</dc:creator><description>&lt;p&gt;hi, can I use this way to change the power even when it was configured by initialization? I need to change the tx power many times during the operation of the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135807?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 19:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95f8a8c7-4a34-46d1-9776-491b72a03267</guid><dc:creator>maxx44</dc:creator><description>&lt;p&gt;Edvin (and Liu)&lt;/p&gt;
&lt;p&gt;Thanks! The m_advertising.adv_handle worked.&amp;nbsp; And it does appear to increase the transmit power in my module based on just looking at RSSI from a distance.&lt;/p&gt;
&lt;p&gt;Appreciate the help,&lt;/p&gt;
&lt;p&gt;Max&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135717?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 10:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd6601d-a596-4e05-8e7d-d84ab9cfc1d6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It is correct, as @liu says. You need to use the advertising handle.&lt;/p&gt;
&lt;p&gt;The advertising_init is set up a little different in the Beacon example, and in the regular ble_peripheral examples.&lt;/p&gt;
&lt;p&gt;You can find the advertising example in the m_advertising struct.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;sd_ble_gap_tx_power_set() must be after ble_advertising_init() I am not 100% sure whether it has to be after ble_advertising_conn_cfg_tag_set(), but you will quickly find out.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ble_advertising_init(...);

ble_advertising_conn_cfg_tag_set(...);

    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, 4);
    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: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135688?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 08:33:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76aeddf7-b58d-432d-82da-4ec190433f6f</guid><dc:creator>liu</dc:creator><description>&lt;p&gt;hello,&lt;/p&gt;
&lt;p&gt;I used the example of beacon.&lt;/p&gt;
&lt;p&gt;I think it should be like this:&lt;/p&gt;
&lt;p&gt;........................................................................................&lt;/p&gt;
&lt;p&gt;/** @brief Advertising set handle not set. */&lt;br /&gt;#define BLE_GAP_ADV_SET_HANDLE_NOT_SET (0xFF)&lt;/p&gt;
&lt;p&gt;static uint8_t &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; /**&amp;lt; Advertising handle used to identify an advertising set. */&lt;/p&gt;
&lt;p&gt;.......................................................................................&lt;/p&gt;
&lt;p&gt;advertising_init();&lt;br /&gt; uint8_t err_adv=sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,+4); //after &lt;span&gt;advertising_init();&lt;/span&gt;&lt;br /&gt; advertising_start();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best &amp;nbsp;regards,&lt;/p&gt;
&lt;p&gt;liu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135636?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 19:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91e4d160-1f3c-4400-bcbd-2a852d468252</guid><dc:creator>maxx44</dc:creator><description>&lt;p&gt;Edvin,&lt;/p&gt;
&lt;p&gt;Thanks.&amp;nbsp; What you described is not quite what I see in my SDK example.&amp;nbsp; I&amp;#39;m still not seeing how to set the adv_handle correctly in this context.&amp;nbsp; I&amp;#39;ve inserted the advertising_init() below.&amp;nbsp; This comes from the bluetoothds_template.&lt;/p&gt;
&lt;p&gt;Max&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    ret_code_t    err_code;
    ble_advertising_init_t init;


    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type               = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance      = true;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_complete.p_uuids  = m_adv_uuids;

    init.config.ble_adv_fast_enabled   = true;
    init.config.ble_adv_fast_interval  = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout   = APP_ADV_DURATION;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);

		// Set transmit power to 4 dBm
		err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,????????,4);
		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: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135471?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 06:22:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db314a59-29e5-4a1e-b8f1-415dcdde358b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Max,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not quite sure I follow. The m_adv_handle is set the same way for the s112 on the nRF51810 as for the s132 on the nRF52832. The m_adv_handle is an uint16_t, and not uint8_t.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The advertising handle, m_adv_handle is set in the&amp;nbsp;sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params), which is usually called in&amp;nbsp;advertising_init() in most of our examples in the SDK.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get any issues while setting this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/135439?ContentTypeID=1</link><pubDate>Sat, 09 Jun 2018 22:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87ee20da-1492-4877-9a8f-a754aef5fd30</guid><dc:creator>maxx44</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to do the same thing for a nRF52810 using SD 112 v6.0.0.&amp;nbsp; Can you provide details in how to set m_adv_handle?&amp;nbsp; I&amp;#39;m confused why this is uint16_t as it seems like it should be an address for the advertising data structure.&amp;nbsp; How did you define this?&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp; Max&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/131729?ContentTypeID=1</link><pubDate>Fri, 11 May 2018 14:09:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a7ba87-7c77-4ffc-a061-ac215492d42d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. It seems like you figured it out, but yes, it has to be called after advertising_init(), because it needs to know the advertising handle. This is new, as the Advertising handle came in SDK15, which is why it wasn&amp;#39;t required before.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/131604?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 05:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b59d2518-22b1-4130-8b36-4f383795c5e3</guid><dc:creator>liu</dc:creator><description>&lt;p&gt;But i donn&amp;#39;t know why&amp;nbsp;&lt;span&gt;sd_ble_gap_tx_power_set() must be behind of &amp;nbsp;advertising_init(),because it is random in SDK8.1(s110) of NRF51822.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liu&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Beijing,China.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set sending power of NRF52810 with SDK15.0</title><link>https://devzone.nordicsemi.com/thread/131601?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 03:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:599986c3-717d-489d-af81-5271d3332d19</guid><dc:creator>liu</dc:creator><description>&lt;p&gt;Now,&lt;/p&gt;
&lt;p&gt;I think i have found the reason why i failed.&lt;/p&gt;
&lt;p&gt;advertising_init();&lt;br /&gt; uint8_t err_adv=sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,+4); //At this place;&lt;br /&gt; advertising_start();&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;err_adv=sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,+4); //At this place;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;this command must at the back of&amp;nbsp;advertising_init();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and the return data is 0 (NRF_SUCCESS);&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>