<?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>Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11496/cannot-add-function-in-main-c</link><description>Hi, I would like to ask that, whenever I put my function in main.c, the borad become undiscoverable. 
 I&amp;#39;m using nRF51 with ble_app_uart_s110_pca10028, and below are my function and main</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jan 2016 14:03:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11496/cannot-add-function-in-main-c" /><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43423?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2016 14:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:109098ce-15da-416e-a57d-e7a2379e71e3</guid><dc:creator>10Hsin</dc:creator><description>&lt;p&gt;Thanks for your help! I&amp;#39;ll study these issues&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43422?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 15:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d1452b5-00de-4a4b-9f5e-40332ef641a2</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;You are trying to transmit data faster than the BLE connection can handle. See &lt;a href="https://devzone.nordicsemi.com/question/59080/app-error-0x3004/"&gt;this&lt;/a&gt;, &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;this&lt;/a&gt;, &lt;a href="https://devzone.nordicsemi.com/question/3440/how-do-i-calculate-throughput-for-a-ble-link/"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/blogs/821/an-introduction-to-error-handling-in-nrf5-projects/"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43421?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 06:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af777d62-2c79-475b-a849-c66d62499ace</guid><dc:creator>caram5555</dc:creator><description>&lt;p&gt;Ok. Then I suggest you transmit your sensor data periodically using timer or delay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43420?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 04:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a79f84ad-cb10-400e-9b63-9d75c177f778</guid><dc:creator>10Hsin</dc:creator><description>&lt;p&gt;In my case, nRF51 acts as an sensor and keep transmitting data, 0-9 are just fake data. After I retrieve data, I&amp;#39;ll send it to a platfrom for futher process. But besides 0-9, I still send strings for some specific purpose, so I use uart example. (I use hrs example before)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43419?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 04:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3968beb6-9e22-44b6-a3fa-fbf7066602e7</guid><dc:creator>caram5555</dc:creator><description>&lt;p&gt;Hi 10Hsin.
In your sample program, it constantly transmitting data between 0 to 9.
The most important thing is why?
Why you transmitting data 0 to 9 to one-side without any event or case?
I mean .. transferring data is communication with your friends.
Imagine this situation,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;you are designning sensor device(BLE UART) that can communicate with your smartphone(Central).&lt;/li&gt;
&lt;li&gt;your smartphone connect to your device and send a command to retrieve sensor value.&lt;/li&gt;
&lt;li&gt;your device wait for a command&lt;/li&gt;
&lt;li&gt;if your device received a sensing command, then your device write data using ble_nus_stringxxx&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43418?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 03:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afdaa94c-1cd1-4054-b0e7-8821891bf684</guid><dc:creator>10Hsin</dc:creator><description>&lt;p&gt;Hi caram5555, cause I&amp;#39;m just a beginner, so I just follow the example, is there any better way to transmit data using UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43417?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 03:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:374be628-8f01-4293-a4ae-251f74a7dbc1</guid><dc:creator>caram5555</dc:creator><description>&lt;p&gt;Hi 10Hsin.&lt;/p&gt;
&lt;p&gt;You too seriously transmitting data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43416?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 03:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7644715f-575f-4f48-836b-f00b5214aa7e</guid><dc:creator>10Hsin</dc:creator><description>&lt;p&gt;Sorry for asking a stupid question, but appreciate for your help!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot add function in main.c</title><link>https://devzone.nordicsemi.com/thread/43415?ContentTypeID=1</link><pubDate>Sat, 23 Jan 2016 02:49:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf5c31f5-4319-498b-862b-25389c264c85</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;what is the results of&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_nus_string_send() .. 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which you put into err_code?&lt;/p&gt;
&lt;p&gt;the next line, as is discussed here 50 times a week, is APP_ERROR_CHECK() which will go to the error handler if err_code is not zero. That&amp;#39;s the most likely place you&amp;#39;ve ended up. Use the debugger to find out where you are and how you got there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>