<?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>Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15618/can-i-use-nus-service-without-having-the-uart-pins-configured-connected</link><description>Hello, 
 I want to use the NUS service on my BLE communication. I don&amp;#39;t have pins connected for UART, do I need to have them?
When I try to run the device, my program initializes all the blocks being used (bsp, uart, spi, ble_stack, etc) and when it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Aug 2016 11:00:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15618/can-i-use-nus-service-without-having-the-uart-pins-configured-connected" /><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59599?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 11:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39db213e-5a1a-435e-936a-f023777fe944</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;No, maybe I&amp;#39;m being misunderstood. I want to use the UART on the future to display some messages on my computer, but if I initialize it it gives me the error above explained. But using the same configuration, just changing between BLE peripheral to central (advertising -&amp;gt; scanning), it works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59597?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 10:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4623df2b-3b82-4771-90dc-2f7139d0a761</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;The example ble_app_nus calls UART functions in the ble_nus_handler, thats why it reports errors when it is not defined.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59598?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 09:28:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:037067fe-fb51-4483-8f96-49bc27be62db</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I commented the Uart code, and the spi now seems to be working. The data is not correct, but it may be some wrong configuration on the SPI module. But for the Uart problem, any clue what could it be?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59596?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 08:37:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:512ecf0d-68bd-49dc-bd20-5a2fadaf681f</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I intend to use the UART, but since it seems it was the problem, from the error code that it was giving me, I disabled all the prints. Will try to not initialize the Uart to see if it helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59595?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 12:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d750af5-8043-49c0-b4a7-543e18a8cdcb</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;But why are you initializing UART if you are not intending to use it? You can just leave it out, and change the implementation in the nus_data_handler to not use the UART functions app_uart_put.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59590?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 08:26:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcdcd98f-0c9f-41c2-8fc9-7ccb4622cbfe</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I think it has to do with the pins of the UART, or the UART configuration, because I can run the software on the dongle and DK, but not on my custom board, where the pins are not configured for UART. The strange part is that if I run the central side on it, it works, with the same pins configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59594?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 07:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d6f1ab-5a4d-4289-9eb9-163ae26dec19</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I was using the delay, because I needed the timers other place. And the delay was for print purposes, so i can delete it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59592?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 07:33:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b664551a-2171-4a12-80f9-3078a0ab2d96</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should not use nrf_delay_ms to delay, instead use a timer. Please see the &lt;a href="https://devzone.nordicsemi.com/tutorials/19/"&gt;application timer tutorial&lt;/a&gt;. nrf_delay uses a sequence of __nop to implement the delay. This means that the processor will be running and using a lot of current, additionally it will conflict with the SoftDevice which needs to be able to freely schedule its activities.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59593?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 07:10:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aed5b1f-094b-4341-88bb-1b8a05973ed4</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;my main :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
	bool erase_bonds;

    // Initialize.
	APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
	
	init_all(erase_bonds);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and the init_all function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void init_all(bool bonds)
{
	uart_init();
	//printf(&amp;quot;[MAIN : INIT] uart_init() -&amp;gt; ok\r\n&amp;quot;);
	buttons_leds_init(&amp;amp;bonds);
	//printf(&amp;quot;[MAIN : INIT] buttons_led_init() -&amp;gt; ok\r\n&amp;quot;);
	ble_stack_init();
	//printf(&amp;quot;[MAIN : INIT] ble_stack_init() -&amp;gt; ok\r\n&amp;quot;);
	gap_params_init();
	//printf(&amp;quot;[MAIN : INIT] gap_params_init() -&amp;gt; ok\r\n&amp;quot;);
	conn_params_init();
	//printf(&amp;quot;[MAIN : INIT] conn_params_init() -&amp;gt; ok \r\n&amp;quot;);
	services_init();
	//printf(&amp;quot;[MAIN : INIT] services_init() -&amp;gt; ok \r\n&amp;quot;);
	advertising_init();
	//printf(&amp;quot;[MAIN : INIT] advertising_init() - &amp;gt; ok\r\n&amp;quot;);
	spi_init();
	//printf(&amp;quot;[MAIN : INIT] spi_init() -&amp;gt; ok\r\n&amp;quot;);
	nrf_delay_ms(500);
	//printf(&amp;quot;[MAIN : INIT] Every module ok.\r\n&amp;quot;);	
		
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so the first initialization is the uart module. And I even comented all the printf from my software, because they were only for debug purposes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59591?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 18:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e953e62c-18e6-4a2f-a1c5-4d0202e93057</guid><dc:creator>Pavan kumar</dc:creator><description>&lt;p&gt;Generally This problem comes when you use any printf() or app_uart_put() before calling uart_init() one try to check is there any such statements either in main or in other source files&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59588?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 13:13:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73725c97-df5c-4604-a157-7d67c34cffe2</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;If you mean sending via BLE, I&amp;#39;m still not sending anything. Because my device don&amp;#39;t even advertises. And if it is that data size I have set it to max of 20, but only sending 15 or less if connected.&lt;/p&gt;
&lt;p&gt;I tried to comment all the printfs, but the problem remains the same. If I comment the uart initialization the program goes to that loop on the debug but appears with all the values = 0.&lt;/p&gt;
&lt;p&gt;I have the one central and one peripheral side. The central side seems to be working well, but the peripheral goes to the app_error with the same configurations of pins, which I think it shouldn&amp;#39;t happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use NUS service without having the UART pins configured/connected?</title><link>https://devzone.nordicsemi.com/thread/59589?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 12:46:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617f3946-2343-4963-8d99-d30b47cdd625</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hi
this is somewhat confusing, as 0x0C would be NRF_ERROR_DATA_SIZE.
How much data are you sending per package? AS far as I know the package may not exceed 23 Byte, having only 20Byte of payload and 3byte for header&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>