<?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>Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39939/raspberry-bluetooth-problem</link><description>Hello, I have a problem with my nrf52832 customised board 
 It has loaded the ble_app_uart example of the 15.2_SDK and It have the correct pinout from my board, These are almost all my changes in the code. 
 I connect it with a raspberry pi3 (the last</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Oct 2018 08:31:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39939/raspberry-bluetooth-problem" /><item><title>RE: Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/thread/155271?ContentTypeID=1</link><pubDate>Wed, 31 Oct 2018 08:31:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74b288d6-231b-4d8d-8e06-d698aa294156</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think your code changes is causing the problem here. It could be a problem with Bluez considering it fails with both Noble and Bluepy.&amp;nbsp;&amp;nbsp;Have you tried to disable long MTU+DLE? I think it can be worth a try.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Disable long MTU and DLE in sdk_config.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/examples/ble_peripheral/ble_app_uart/pca10040/s132/config/sdk_config.h b/examples/ble_peripheral/ble_app_uart/pca10040/s132/config/sdk_config.h
index 45e634d..4bec73b 100644
--- a/examples/ble_peripheral/ble_app_uart/pca10040/s132/config/sdk_config.h
+++ b/examples/ble_peripheral/ble_app_uart/pca10040/s132/config/sdk_config.h
@@ -11956,7 +11956,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. 
@@ -11985,7 +11985,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. 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/thread/155204?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 15:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c322bb9-1692-4c01-ab5a-40cd21c2c450</guid><dc:creator>navarrocantero</dc:creator><description>&lt;p&gt;Hi thanks for reply !!&lt;br /&gt;&lt;br /&gt;Yes, Previously I Work with the built-in BT adapter from raspberry pi, in my raspberry pi 3 model B.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;After&amp;nbsp;that I updated it to the pi 3 model B+, and finally I buy a bt-dongle usb adaptator.&lt;/p&gt;
&lt;p&gt;With all configurations I have the same behavior .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The core of my app is can read a char from the central and toogle a led. Is all that I want;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My code is based on ble_app_uart from the 15.2 SDK and my changes on these code are :&lt;/p&gt;
&lt;p&gt;- correct pinout in the 10040.h board file&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- in the nus_data_handler() method I have some changes, to toogle a led, and remote restart:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;char thisAction;

static void nus_data_handler(ble_nus_evt_t *p_evt) {
    if (p_evt-&amp;gt;type == BLE_NUS_EVT_RX_DATA) {
        uint32_t
        err_code;


        for (uint32_t i = 0; i &amp;lt; p_evt-&amp;gt;params.rx_data.length; i++) {

            do {
                err_code = app_uart_put(p_evt-&amp;gt;params.rx_data.p_data[i]);
                thisAction = p_evt-&amp;gt;params.rx_data.p_data[0];
                if (thisAction == 0x61)  {
                    nrf_pwr_mgmt_feed();
                    bsp_board_leds_off();
                    bsp_board_led_on(BSP_BOARD_LED_2);
                    nrf_delay_ms(300);
                    bsp_board_led_on(BSP_BOARD_LED_0);
                    bsp_board_led_off(BSP_BOARD_LED_2);
                }
                if (thisAction == 0x62) {
//                    NRF_LOG_ERROR(&amp;quot;%s&amp;quot;, &amp;quot;OK_B&amp;quot;);
                    nrf_pwr_mgmt_feed();
                    bsp_board_leds_off();
                    bsp_board_led_on(BSP_BOARD_LED_0);
                }
                if ((err_code != NRF_SUCCESS) &amp;amp;&amp;amp; (err_code != NRF_ERROR_BUSY)) {
                    NRF_LOG_ERROR(&amp;quot;Failed receiving NUS message. Error 0x%x. &amp;quot;, err_code);
                    APP_ERROR_CHECK(err_code);
                }

            } while (err_code == NRF_ERROR_BUSY);
        }
        if (p_evt-&amp;gt;params.rx_data.p_data[p_evt-&amp;gt;params.rx_data.length - 1] == &amp;#39;\r&amp;#39;) {
            while (app_uart_put(&amp;#39;\n&amp;#39;) == NRF_ERROR_BUSY);
        }
    }

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can theses changes make it so unstable?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/thread/155169?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 14:32:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be21bfb5-1f1c-46a6-a35a-aea8b11609d1</guid><dc:creator>awneil</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/39939/raspberry-bluetooth-problem/155142"]The central should generally not disconnect because of connection parameters requested by the peripheral[/quote]
&lt;p&gt;Indeed - they are just a &lt;em&gt;request&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Certainly Android will make the connection - even when it does not grant the requested connection parameters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/thread/155142?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 13:30:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e581a8c3-5a1a-490e-9fea-2cf9009bf04d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s interesting that&amp;nbsp;you seem to get the same behavior&amp;nbsp;with both Noble and Bluepy.&amp;nbsp;Have you tried using the&amp;nbsp;built-in BT device on the Raspberry Pi as well?&lt;/p&gt;
&lt;p&gt;The sniffer trace&amp;nbsp;is shows&amp;nbsp;that&amp;nbsp;the central terminates the link, so I think the you need to debug this on the Raspberry side. The central should generally not disconnect because of connection parameters requested by the peripheral.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Raspberry bluetooth problem</title><link>https://devzone.nordicsemi.com/thread/155059?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 10:17:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ece803bd-d6b2-42b9-bb4b-c7a5463ebf20</guid><dc:creator>navarrocantero</dc:creator><description>&lt;p&gt;UPDATE:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have sniff the network and, It throws a 0x13 ERROR&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6013.image.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>