<?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>Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18601/characteristics-when-connecting-a-peripheral-to-central</link><description>Hi, I have a peripheral device which has buttons that connects to a central device which is the NRF52 board. When the peripheral device is connected and buttons are inputted, the characteristics of the button are not displayed on the UART terminal when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Jan 2017 12:21:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18601/characteristics-when-connecting-a-peripheral-to-central" /><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71789?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 12:21:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3214dba-e0b9-4071-801b-970bdd1ca58a</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I see, you want to get characters as well. Then maybe you can try one of the two following suggestions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Modify the nRF LOG backend interface library so that the characters are relayed to the application. Please compare uart_event_handler() inside nrf_log_backend_serial.c in ble_app_hrs and uart_event_handler() inside app_uart_fifo.c in ble_app_uart.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use RTT as serial backend instead of UART, and implement the functionality in ble_app_uart in the same way in ble_app_hrs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71785?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2016 13:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0085e64f-7a40-42b9-a620-c2404ea3c5fc</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Yes, but I want the uart_event handle to work which is how I can have UART in the HRS relay example. Is there a way to incorporate that without have uart_init()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71786?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 09:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e805daf0-67f7-4214-ad84-07e1b0b74c90</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can&amp;#39;t you just print the address using NRF_LOG_INFO instead of printf?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71797?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 19:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a55fda9d-9d46-4ebf-af99-d1b6417fd5d1</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Petter, one question that  could potentially solve it for me. How do I call the uart_event_handle without the uart_init because I have NRF_LOG_INFO instead of printf()? This is part of the
APP_UART_FIFO_INIT(&amp;amp;comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOW,
err_code);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71796?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 15:16:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ab1ea5-c7c1-41dc-af73-beff75a1a6b4</guid><dc:creator>John</dc:creator><description>&lt;p&gt;This is how I have it set up:&lt;/p&gt;
&lt;p&gt;case BLE_GAP_EVT_ADV_REPORT:
{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;        if (strlen(m_target_periph_name) != 0)
        {
            if (find_adv_name(&amp;amp;p_gap_evt-&amp;gt;params.adv_report, m_target_periph_name))
            {
                // Initiate connection.
                err_code = sd_ble_gap_connect(&amp;amp;p_gap_evt-&amp;gt;params.adv_report.peer_addr,
                                              &amp;amp;m_scan_params,
                                              &amp;amp;m_connection_param);
                if (err_code != NRF_SUCCESS)
                {
                    NRF_LOG_INFO(&amp;quot;Connection Request Failed, reason %d\r\n&amp;quot;, err_code);
                }
            }
        }
					
					
        else
        {
           /** We do not want to connect to two peripherals offering the same service, so when
            *  a UUID is matched, we check that we are not already connected to a peer which
            *  offers the same service. */
						
						const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;
						
            if ((is_uuid_present(&amp;amp;m_adv_uuids[0], p_adv_report)))
								
            {
                // Initiate connection.
                err_code = sd_ble_gap_connect(&amp;amp;p_adv_report-&amp;gt;peer_addr,
                                              &amp;amp;m_scan_params,
                                              &amp;amp;m_connection_param);
								
								
                if (err_code == NRF_SUCCESS)
            {
                
                printf(&amp;quot;Connecting to target %02x%02x%02x%02x%02x%02x\r\n&amp;quot;,
                         p_adv_report-&amp;gt;peer_addr.addr[0],
                         p_adv_report-&amp;gt;peer_addr.addr[1],
                         p_adv_report-&amp;gt;peer_addr.addr[2],
                         p_adv_report-&amp;gt;peer_addr.addr[3],
                         p_adv_report-&amp;gt;peer_addr.addr[4],
                         p_adv_report-&amp;gt;peer_addr.addr[5]
                         );
            }
            }
        }
    } 
			
			
			break; // BLE_GAP_ADV_REPORT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is trying to get the UUID characteristics to show up in the UART terminal such as Termite when inputting buttons on a peripheral device. The NRF52 board should act as a central and peripheral.So that is why I am trying to incorporate the UART example with HRS relay example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71795?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:49:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c4ea4f-4168-474a-a60b-b07a8ab432ef</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can&amp;#39;t you just do something like this when you receive an advertising report:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    case BLE_GAP_EVT_ADV_REPORT:
    {
        const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;

        if (is_uuid_present(&amp;amp;m_nus_uuid, p_adv_report))
        {
            err_code = sd_ble_gap_connect(&amp;amp;p_adv_report-&amp;gt;peer_addr,
                                          &amp;amp;m_scan_params,
                                          &amp;amp;m_connection_param);
            APP_ERROR_CHECK(err_code);
        }
    }break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Instead of checking the name like you are doing now. I&amp;#39;m have trouble understand what the problem is, maybe I&amp;#39;m misunderstanding you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71794?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da80588b-8ba0-4fac-bdc7-fc895c407c24</guid><dc:creator>John</dc:creator><description>&lt;p&gt;That is what I was doing with the ble_app_hrs_c example by trying to put UART from ble_app_uart_c because it is not really working with regards to finding the UUID. However, it works when you put the m_target_periph_name[] as I said before. What parts do I have to add for the ble_app_hrs_c, I have incorporated the UART portions from the example, but I am not sure if it is everything. Can you check my code out that I provided above, if possible. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71793?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87536f9d-1ed1-4333-9b23-4cc45d5a6664</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not saying that you have to use the ble_app_uart_c example, but you can port parts of it to the ble_app_hrs_c, or add peripheral role to the ble_app_uart_c example. Up to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71792?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 14:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf93febf-7358-4d1e-aa93-a6a93c70788c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes, it is possible, but then you must add the peripheral part to it of course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71791?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 13:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffbfb359-bd82-41dd-ad67-e8dfda402d04</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I could do that but I want it so that the NRF52 board acts as both a central and peripheral which is similar to the HRS relay example. Is that possible to do that with the  ble_app_uart_c example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71790?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 09:39:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e5776b2-67ec-4d17-8cce-c76321ee7024</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can&amp;#39;t you just do as in the ble_app_uart_c example? And look for the UUID instead of the name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71788?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 15:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cd5c68a-2123-4727-a7da-5f953c5af684</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Actually, I don&amp;#39;t think ble_nus_c_rx_notif_enable() is the main problem as I was working on it yesterday. First, I tried to figure out how to incorporate is_uuid_present() from the UART example instead of find_adv_uuid() from the HRS example. It is because I have a 128 bit UUID from my peripheral device. I think if I can get that connected by UUID, then it should get the characteristics. However, right now I am only connected with m_target_periph_name[] from the HRS example with specifying the device name. Any ideas how I can incorporate the UUID in the HRS example? The code that I provided is what I have so far.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristics when connecting a peripheral to central</title><link>https://devzone.nordicsemi.com/thread/71787?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 10:53:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8abd31c-1f32-41ad-9b92-d8e2dd1dd909</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;ble_nus_c_rx_notif_enable() doesn&amp;#39;t work? Does it return an error code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>