<?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>BLE &amp;amp; BT 5.0 ble_app_uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41585/ble-bt-5-0-ble_app_uart</link><description>Hello All, 
 I made 2 custom boards, both mount a n52840 QIAAC0 chip. I was able to program them using the &amp;quot;ble_app_uart peripheral&amp;quot; and &amp;quot;ble_app_uart_c&amp;quot; codes that I found in: &amp;quot;nRF5_SDK_15.1.0_a8c0c4d&amp;quot;. 
 I can exchange packets between the 2 boards but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Dec 2018 14:37:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41585/ble-bt-5-0-ble_app_uart" /><item><title>RE: BLE &amp; BT 5.0 ble_app_uart</title><link>https://devzone.nordicsemi.com/thread/161892?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 14:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d4f8cfa-1e20-4749-aba1-82866d8a65c1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First, I&amp;#39;ll just mention that SDK 15.1.0 was pulled, so I recommend that you download SDK15.2.0. There are just a few bug-fixes, so you shouldn&amp;#39;t have to change anything else.&lt;/p&gt;
&lt;p&gt;All BLE links are by default created on 1M phy, so you can request a phy change. Just add this at the end of the BLE_GAP_EVT_CONNECTED event:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;

ble_gap_phys_t const phys =
{
    .rx_phys = BLE_GAP_PHY_2MBPS,
    .tx_phys = BLE_GAP_PHY_2MBPS,
};
err_code = sd_ble_gap_phy_update(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, &amp;amp;phys);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It takes a couple of seconds, but you can look after the&amp;nbsp;BLE_GAP_EVT_PHY_UPDATE event (you can add this event to your ble_evt_handler, and print NRF_LOG_INFO(&amp;quot;Phy updated&amp;quot;); in the event.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The MTU is set in gatt_init, so you shouldn&amp;#39;t need to touch BLE_GATT_ATT_MTU_DEFAULT.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for initializing the GATT library. */
void gatt_init(void)
{
    ret_code_t err_code;

    err_code = nrf_ble_gatt_init(&amp;amp;m_gatt, gatt_evt_handler);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE); //NRF_SDH_BLE_GATT_MAX_MTU_SIZE == 247
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can disable the UART printing on the central device (or both). Just&amp;nbsp;comment out&amp;nbsp;the app_uart_put() functions. These are definitely a bottleneck when you are testing throughput.&lt;/p&gt;
&lt;p&gt;&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></channel></rss>