<?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>send data from msp430</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25471/send-data-from-msp430</link><description>Now i try to send many data from external device.
I can send it for 4 times.
But after that,the device will be disconnection.
I used analog discovery and I was able to confirm that the data is coming.
I want to solve the problem,but I don&amp;#39;t know what</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Oct 2017 15:45:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25471/send-data-from-msp430" /><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100395?ContentTypeID=1</link><pubDate>Tue, 03 Oct 2017 15:45:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9e3e0a6-5b67-4c9f-97be-c4d75272bc24</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;I solved this problem by deleting the part of if (data_array [index - 1] == &amp;#39;\ n&amp;#39;)! !
Thank you for various advice! !
regards!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100394?ContentTypeID=1</link><pubDate>Tue, 03 Oct 2017 05:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57292def-045b-4425-9279-f2ba0030afa4</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;i tried it!
but i didn&amp;#39;t solve the problem.
i saw the uart part and I could confirm that the data is coming.
so i thought that problems are occurring while sending data from nRF 52832 to the mobile phone.
regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100393?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 14:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42f4d269-0786-451e-a540-7947be31978f</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
next day, i will try it!
thank you!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100392?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 14:12:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfa68c55-f653-49f0-a62e-432ad9dbacec</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, that is correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100391?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 14:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f1e057-19ea-4464-abbf-1362ff2c015b</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
i understood! i wanna send data from nRF52832 to phone! so i think i change the uart_event_handle!
Is my thinking right??
regards!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100390?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee08c935-9347-4113-86a7-633c4df1caa9</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The &lt;code&gt;nus_data_handler()&lt;/code&gt; will by default just take the data you send from the phone to the nRF5x, and output this data over the UART(using the DK connected to a PC, it will output this data to a terminal program, e.g. Termite or Putty).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100389?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47cf94ca-a31a-4221-a3ab-24b2b2cf64bc</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
i see! if that,Shouldn&amp;#39;t i change the contents of nus_data_handler?
ragards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100388?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:30:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bee245bb-b29d-458e-b6b7-7d7ee6901611</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;By default, the uart_event_handle() function should already have the ble_nus_string_send() function. You dont need to add it again.&lt;/p&gt;
&lt;p&gt;By default the function looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void uart_event_handle(app_uart_evt_t *p_event)
{
    static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
    static uint8_t index = 0;
    uint32_t       err_code;

    switch (p_event-&amp;gt;evt_type)
    {
        case APP_UART_DATA_READY:
            UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));
            index++;

            if ((data_array[index - 1] == &amp;#39;\n&amp;#39;) || (index &amp;gt;= (m_ble_nus_max_data_len)))
            {
                NRF_LOG_DEBUG(&amp;quot;Ready to send data over BLE NUS&amp;quot;);
                NRF_LOG_HEXDUMP_DEBUG(data_array, index);

                do
                {
                    uint16_t length = (uint16_t)index;
                    err_code        = ble_nus_string_send(&amp;amp;m_nus, data_array, &amp;amp;length);
                    if ((err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (err_code != NRF_ERROR_BUSY))
                    {
                        APP_ERROR_CHECK(err_code);
                    }
                } while (err_code == NRF_ERROR_BUSY);

                index = 0;
            }
            break;

        case APP_UART_COMMUNICATION_ERROR:
            APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);
            break;

        case APP_UART_FIFO_ERROR:
            APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
            break;

        default:
            break;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100386?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:27:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31aa2c9b-edfb-467a-ba8c-dc892c7a3406</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;Oh i see!!
if that,should Should I add ble_nus_string_data function in uart_event_handler ()?
regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100387?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:25:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3544e1-f08b-4056-8191-47fd733db51e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Ok, then you should instead change the function &lt;code&gt;uart_event_handle()&lt;/code&gt;. This is the function that receive the external data over UART, and then it will sent it over BLE to the phone/central.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100385?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99c6c26f-79cc-45d5-84cd-50a3c587e00a</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
I am planning to create a program to send external data to iphone by changing nus_data_handler () program!!
if (p_evt-&amp;gt; params.rx_data.p_data [p_evt-&amp;gt; params.rx_data.length - 1] == &amp;#39;\ r&amp;#39;)
Do you send data all the time if you insert the ble_nus_string_send function in the while statement in the above if statement?
regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100380?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a026308-ace2-4085-8a71-608fe237d379</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You are sending data back over BLE in the nus_data_handler? The function looks by default like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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;

        NRF_LOG_DEBUG(&amp;quot;Received data from BLE NUS. Writing data on UART.&amp;quot;);
        NRF_LOG_HEXDUMP_DEBUG(p_evt-&amp;gt;params.rx_data.p_data, p_evt-&amp;gt;params.rx_data.length);

        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]);
                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;/code&gt;&lt;/pre&gt;
&lt;p&gt;What are you trying to achieve by changing the &lt;code&gt;nus_data_handler()&lt;/code&gt; function ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100383?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7bae179-11df-4431-95e7-23673c207e2e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, in &lt;code&gt;uart_init()&lt;/code&gt; make sure that you have &lt;code&gt;APP_UART_FLOW_CONTROL_DISABLED&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100379?ContentTypeID=1</link><pubDate>Sat, 30 Sep 2017 04:06:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d73456bf-8fff-4b74-9a94-eb634e339871</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;i tried the debugging,but i didn&amp;#39;t know where change.
The point I changed is the following source code.
&lt;a href="https://gyazo.com/613e72f4b57cf278136df2b2efe76197"&gt;gyazo.com/613e72f4b57cf278136df2b2efe76197&lt;/a&gt;
If you change this way, the connection will be lost even if the test data came.&lt;/p&gt;
&lt;p&gt;now I am controlling without flow control.
Do I have to adjust clocks?&lt;/p&gt;
&lt;p&gt;Please tell me if someone understands this problem!!!
I found that this problem occurs when data is being transmitted.
When data transmission is interrupted, ble becomes connectable, and blank data was transmitted when connecting.
Do I have to add processing like interrupt handling when sending data on the program?&lt;/p&gt;
&lt;p&gt;regards!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100377?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 09:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d84dd5c1-7444-4b04-887a-aec733b24b66</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Are you using the latest version of the nRF-Toolbox app?&lt;/p&gt;
&lt;p&gt;Have you tried debugging the nRF52, and see if you run into the error handler?
See &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;this post&lt;/a&gt; on how to do debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100384?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 07:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2892026c-0ba3-42b5-9f2f-d552862ff0bd</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;Yes
When i used iphone and Android, it happened the same situation.&lt;/p&gt;
&lt;p&gt;now i try to control without flow control.
Do you need to change the source code if perhaps without flow control?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100382?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 10:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:237a4991-3e9f-4102-acf9-435ecb94926a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Do you get the same message on the Android phone ? i.e. &amp;quot;The connection has timed out unexpectedly&amp;quot; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100381?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 10:12:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:259a1008-537f-4058-9356-d42b94d19a57</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
i modified the source code.
but the data is only send for 4 times.
and android phone is same situation.
the picture of program source is shown in below
&lt;a href="https://gyazo.com/52b786169db095a92d23b8f05cc5a051"&gt;gyazo.com/52b786169db095a92d23b8f05cc5a051&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100378?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 09:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bf20b99-a7d9-4d91-9922-77a98dfdf871</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;According to these post &lt;a href="https://devzone.nordicsemi.com/question/39984/iphone6-connect-time-out/"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/37853/connection-dropping-between-iphone-6-ios-8-and-nrf51422-s110-v800/"&gt;here&lt;/a&gt; , this could be caused by hardware issues with BLE on the iPhone 6.&lt;/p&gt;
&lt;p&gt;A workaround is to set your LFCLK accuracy to 250ppm. For SDK 14, this is done in sdk_config.h like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/clock123.png" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this solves the problem for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100376?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 09:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfa3471e-dd17-4f86-99d0-a0b686238061</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!
・I am using MSP 430 on UART connection.
・i am using the nRF52832-DK.
・i am using 14.0.0 version.
・i am using iphone 6s&lt;/p&gt;
&lt;p&gt;Regards!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data from msp430</title><link>https://devzone.nordicsemi.com/thread/100396?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 08:48:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0a23485-2fe9-4b03-afc9-07aeea55a746</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How are you using the msp430?&lt;/li&gt;
&lt;li&gt;Are you using the nRF52832? If so, is that a custom board or a nRF52-DK ?&lt;/li&gt;
&lt;li&gt;What SDK version are you using?&lt;/li&gt;
&lt;li&gt;What kind of smartphone are you using?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>