<?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>nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49777/nrf52840-dk---long-range-data-rate-125kbps</link><description>Hi 
 Please advise when I can find firmware for nRF52840-DK which can send advertising packets or any data packets at data rate 125Kbps and +8dBm output power 
 I have two nRF52840-DK one will be Central and the other is the Peripheral , the goal is range</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jul 2019 10:51:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49777/nrf52840-dk---long-range-data-rate-125kbps" /><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/199738?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 10:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5e155a6-a239-444f-82b8-a399156c6fb1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, it will set the output power to +8dBm.&amp;nbsp; I can&amp;#39;t think of any other SW changes that would improve range.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/199727?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 10:08:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2b543fe-6536-418b-b0ba-b751510a8aed</guid><dc:creator>Josh_1</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately I`m not software expert so I need to verify ,if I want to change the power i need to do it by changing the number &amp;quot;8&amp;quot; below?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;+ err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, 8);&lt;/p&gt;
&lt;p&gt;Do you know if this firmware (8dBm,125Kbps you offer is fit to achieve the best range between the boards?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/199716?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 09:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd5b69a3-d61d-4fc0-9971-edc895689e5c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can find the code changes in the diff file included in the zip file. The output power is changed from&amp;nbsp;its default value to +8dBm by the call to&amp;nbsp;sd_ble_gap_tx_power_set() in ble_advertising_start, and the PHY is changed in advertising_init.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/examples/ble_central/ble_app_uart_c/main.c b/examples/ble_central/ble_app_uart_c/main.c
index 5c6ffd5..c53297b 100644
--- a/examples/ble_central/ble_app_uart_c/main.c
+++ b/examples/ble_central/ble_app_uart_c/main.c
@@ -116,6 +116,10 @@ static void scan_start(void)
 
     ret = bsp_indication_set(BSP_INDICATE_SCANNING);
     APP_ERROR_CHECK(ret);
+
+    //Optional: Change output power
+    ret = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, 0, 8);
+    APP_ERROR_CHECK(ret);
 }
 
 
@@ -164,13 +168,25 @@ static void scan_evt_handler(scan_evt_t const * p_scan_evt)
  */
 static void scan_init(void)
 {
-    ret_code_t          err_code;
-    nrf_ble_scan_init_t init_scan;
+    ret_code_t            err_code;
+    nrf_ble_scan_init_t   init_scan;
+    ble_gap_scan_params_t scan_params;
+
+    memset(&amp;amp;scan_params, 0, sizeof(ble_gap_scan_params_t));
+
+    scan_params.active        = 1;
+    scan_params.interval      = NRF_BLE_SCAN_SCAN_INTERVAL;
+    scan_params.window        = NRF_BLE_SCAN_SCAN_WINDOW;
+    scan_params.timeout       = NRF_BLE_SCAN_SCAN_DURATION;
+    scan_params.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL;
+    scan_params.scan_phys     = BLE_GAP_PHY_CODED;
+    scan_params.extended      = true;
 
     memset(&amp;amp;init_scan, 0, sizeof(init_scan));
 
     init_scan.connect_if_match = true;
     init_scan.conn_cfg_tag     = APP_BLE_CONN_CFG_TAG;
+    init_scan.p_scan_param     = &amp;amp;scan_params;
 
     err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);
     APP_ERROR_CHECK(err_code);
diff --git a/examples/ble_central/ble_app_uart_c/pca10056/s140/config/sdk_config.h b/examples/ble_central/ble_app_uart_c/pca10056/s140/config/sdk_config.h
index bb9c621..8ff8018 100644
--- a/examples/ble_central/ble_app_uart_c/pca10056/s140/config/sdk_config.h
+++ b/examples/ble_central/ble_app_uart_c/pca10056/s140/config/sdk_config.h
@@ -127,7 +127,7 @@
 #endif
 // &amp;lt;o&amp;gt; NRF_BLE_SCAN_BUFFER - Data length for an advertising set. 
 #ifndef NRF_BLE_SCAN_BUFFER
-#define NRF_BLE_SCAN_BUFFER 31
+#define NRF_BLE_SCAN_BUFFER 255
 #endif
 
 // &amp;lt;o&amp;gt; NRF_BLE_SCAN_NAME_MAX_LEN - Maximum size for the name to search in the advertisement report. 
@@ -184,7 +184,7 @@
 // &amp;lt;255=&amp;gt; BLE_GAP_PHY_NOT_SET 
 
 #ifndef NRF_BLE_SCAN_SCAN_PHY
-#define NRF_BLE_SCAN_SCAN_PHY 1
+#define NRF_BLE_SCAN_SCAN_PHY 4
 #endif
 
 // &amp;lt;e&amp;gt; NRF_BLE_SCAN_FILTER_ENABLE - Enabling filters for the Scanning Module.
@@ -12394,7 +12394,7 @@
 // &amp;lt;i&amp;gt; Requested BLE GAP data length to be negotiated.
 
 #ifndef NRF_SDH_BLE_GAP_DATA_LENGTH
-#define NRF_SDH_BLE_GAP_DATA_LENGTH 251
+#define NRF_SDH_BLE_GAP_DATA_LENGTH 27
 #endif
 
 // &amp;lt;o&amp;gt; NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
@@ -12423,7 +12423,7 @@
 
 // &amp;lt;o&amp;gt; NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. 
 #ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE
-#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
+#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
 #endif
 
 // &amp;lt;o&amp;gt; NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE - Attribute Table size in bytes. The size must be a multiple of 4. 
diff --git a/examples/ble_peripheral/ble_app_uart/main.c b/examples/ble_peripheral/ble_app_uart/main.c
index 4d40d21..a42a8c7 100644
--- a/examples/ble_peripheral/ble_app_uart/main.c
+++ b/examples/ble_peripheral/ble_app_uart/main.c
@@ -616,12 +616,15 @@ static void advertising_init(void)
     init.advdata.include_appearance = false;
     init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
 
-    init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
-    init.srdata.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.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.config.ble_adv_primary_phy       = BLE_GAP_PHY_CODED;
+    init.config.ble_adv_secondary_phy     = BLE_GAP_PHY_CODED;
+    init.config.ble_adv_extended_enabled  = true;
     init.evt_handler = on_adv_evt;
 
     err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
@@ -687,6 +690,10 @@ static void advertising_start(void)
 {
     uint32_t err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
     APP_ERROR_CHECK(err_code);
+
+    //Optional: Change output power
+    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, 8);
+    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: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/199687?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 08:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01bb747e-2e4f-4025-b1eb-837c7bfb6f13</guid><dc:creator>Josh_1</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seem that now it work and when connection established both LED 1 are constant blink.&lt;/p&gt;
&lt;p&gt;How I can find in the code the power level and how you configure the data rate (125Kbps) in the code.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/198593?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 06:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e05ac654-f09a-473e-a006-a7d3ec060b01</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Strange. Can you check what the debug log says after you&amp;#39;ve programmed both kits? You can view the debug log from the console output in SES (should display automatically when you start a debug session).&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/198481?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 13:10:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bda9f6cd-d793-49a2-ba98-ebc5efd85dbe</guid><dc:creator>Josh_1</dc:creator><description>&lt;p&gt;Thanks Vidar!&lt;/p&gt;
&lt;p&gt;I flashed the firmware you suggested , I want to test the range between two&amp;nbsp;&lt;span&gt;nRF52840-DK in the filed,&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What&amp;nbsp; I can see after flashing &amp;quot;ble_app_uart&amp;quot; is LED 1 Blinking and &amp;quot;ble_app_uart_c&amp;quot; also LED 1 Blinking.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please advise how I can see&amp;nbsp; a connection and disconnection between the two nRF52840-DK when I moving away from each other.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK - Long Range ,data rate 125Kbps</title><link>https://devzone.nordicsemi.com/thread/198393?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 09:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2695be49-ffc6-4b7e-bfe7-37bc64479c9d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have made a modified version of the ble_app_uart and ble_app_uart_c projects which advertise/connects with CODED PHY and use +8dBm. You can find it here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/40476/unable-to-convert-to-long-range-after-looking-at-umpteen-examples--/157300#157300"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/40476/unable-to-convert-to-long-range-after-looking-at-umpteen-examples--/157300#157300&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>