<?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>receive data from the peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42757/receive-data-from-the-peripheral</link><description>hello everybody! 
 i want to sample an analog signal with the board and send the 0/1 data with ble to the receiver . 
 i created my on service with rx and tx like in ble uart example but i don&amp;#39;t now how to read the data received from the board . how could</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Jan 2019 19:14:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42757/receive-data-from-the-peripheral" /><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166968?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 19:14:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:277886f3-c8f0-43f0-a628-2ad0570bf9e6</guid><dc:creator>awneil</dc:creator><description>[quote userid="74572" url="~/f/nordic-q-a/42757/receive-data-from-the-peripheral/166961"]i would&amp;nbsp; like to anderstand how to send a simple signal and put it to video.[/quote]
&lt;p&gt;You have two entirely unrelated tasks there:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;sending stuff over BLE.&lt;br /&gt;This is what the Nordic tools &amp;amp; chips do.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&amp;quot;put it to video&amp;quot;&lt;br /&gt;I have no idea what that means, but the&amp;nbsp;&lt;span&gt;Nordic tools &amp;amp; chips have nothing to do with video.&lt;br /&gt;But displaying stuff on video should not be affected by how the data was transported.&lt;br /&gt;Note that BLE is unlikely to be suitable for &amp;quot;live action&amp;quot; video&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166961?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 18:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00eb3990-736d-426e-9181-ca74e3315f15</guid><dc:creator>marikalp</dc:creator><description>&lt;p&gt;so...Thanks a lot for the reply.&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have a dongle and i m trying to establish a comunication among them using nrfconnect. so for me the dongle is central and the sdk is the peripheral..i would&amp;nbsp; like to anderstand how to send a simple signal and put it to video.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166893?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 14:56:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81991259-098f-4c03-8a23-f4bb2cd87670</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What exactly do you mean by this?&lt;/p&gt;
[quote user="marikalp"]send this message to the receiver and put it to video...[/quote]
&lt;p&gt;You can receive notifications in &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop"&gt;nRF Connect for Desktop&lt;/a&gt;, or in a C/Python/Node.JS application using &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt;, but both require a nRF5x board/dongle to work. It is also possible to write applications in later OSes that can interact directly with BLE, but you will have to provide more details on what you are trying to achieve to get help with your issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166692?ContentTypeID=1</link><pubDate>Sun, 20 Jan 2019 19:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a4017c7-c33f-4ff1-9df4-29086822c54f</guid><dc:creator>marikalp</dc:creator><description>&lt;p&gt;obviusly it was only to semplify ...anyway i tried that code without the ble and was ok...the problem is to undestand in which way put it with the uart and ble in order&amp;nbsp; to send this message to the receiver and put it to video...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166690?ContentTypeID=1</link><pubDate>Sun, 20 Jan 2019 19:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e06cf28d-a8ab-4279-8586-bc948007727c</guid><dc:creator>natersoz</dc:creator><description>&lt;p&gt;Your call to ble_nus_data_send() should look something like this:&lt;/p&gt;
&lt;p&gt;uint16_t length = sizeof(m_custom_value);&lt;/p&gt;
&lt;p&gt;// or perhaps length merely = 1;&lt;/p&gt;
&lt;p&gt;uint32_t error_code = err_code = ble_nus_data_send(&amp;amp;m_nus, m_custom_value, &amp;amp;length, m_conn_handle);&lt;/p&gt;
&lt;p&gt;Are you able to build the program, load it onto the nrf52, and run it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166680?ContentTypeID=1</link><pubDate>Sun, 20 Jan 2019 17:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fc8cb32-28c8-462a-912a-f659c454aac1</guid><dc:creator>marikalp</dc:creator><description>&lt;p&gt;ok my your_data_pointer is for me the input pin 28, the sampling function i wrote was something like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;uint32_t&amp;nbsp; pin_value=nrf_gpio_pin_read(28);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (pin_value==0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_gpio_pin_clear(15);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_custom_value=0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_nus_data_send()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp; if (pin_value!=0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_gpio_pin_set(15);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_custom_value=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_nus_data_send()&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;BUT i don&amp;#39;t how to face that with the uart and all the program&lt;/p&gt;
&lt;p&gt;thanks a lot really for your answer!!&lt;/p&gt;
&lt;p&gt;best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166673?ContentTypeID=1</link><pubDate>Sun, 20 Jan 2019 15:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66cadf1c-6bc5-4fb8-a72e-fd8237b5f679</guid><dc:creator>natersoz</dc:creator><description>&lt;p&gt;OK - I think I see what you want to do. Here is what I think you should try:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;SDK 15.2.0:&lt;br /&gt;File: nRF5_SDK_15.2.0_9412b96/examples/ble_peripheral/ble_app_uart/main.c&lt;br /&gt;functon: void uart_event_handle(app_uart_evt_t * p_event), line 521&lt;/p&gt;
&lt;p&gt;This is where normally Nordic is gettng &amp;#39;data ready&amp;#39; from their UART device.&lt;br /&gt;You want to replace this with &amp;#39;data ready&amp;#39; events from your ADC device.&lt;/p&gt;
&lt;p&gt;If you are using their SAADC, then those events will be EVENTS_END event. This signals that the SAADC has completed the conversion across all channels. In the SAADC device the converted data is held in the buffer NRF_SAADC_Type-&amp;gt;RESULT_PTR.&lt;/p&gt;
&lt;p&gt;As a first start, the easiest way to get the ADC conversion across your BLE connection would be to directly call the function&lt;/p&gt;
&lt;p&gt;uint32_t error_code = ble_nus_data_send(&amp;amp;m_nus, your_data_pointer, your_data_length, m_conn_handle);&lt;br /&gt;Line 545 in that file.&lt;/p&gt;
&lt;p&gt;This should give you immediate results. These results will not be optimized for throughput. If you send your data too fast you will get the return code NRF_ERROR_RESOURCES from the call. At this point you will have to concern yourself with the connection interval and fitting your data chunks into the link layer payload or MTU size optimally. But this should get you started.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166652?ContentTypeID=1</link><pubDate>Sat, 19 Jan 2019 20:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1b074b0-99e6-410e-8b01-8ca9baeeac1e</guid><dc:creator>marikalp</dc:creator><description>&lt;p&gt;i have a dongle too,..anyway isn&amp;#39;t that one the problem. i didn&amp;#39;t how to create the service to send data from the peripheral to the central ( pc). in my project i have to sample an anlog data and transfer it to pc with the ble.&lt;/p&gt;
&lt;p&gt;but thanks a lot for yor answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receive data from the peripheral</title><link>https://devzone.nordicsemi.com/thread/166647?ContentTypeID=1</link><pubDate>Sat, 19 Jan 2019 18:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10463188-5f72-495a-bd15-0e39d685d201</guid><dc:creator>natersoz</dc:creator><description>&lt;p&gt;I assume you are using notifications to send your data.&lt;/p&gt;
&lt;p&gt;You can use NRF Connect&lt;/p&gt;
&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&amp;amp;hl=en_US"&gt;https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&amp;amp;hl=en_US&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop"&gt;https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;to act as a central and receive your data.&lt;/p&gt;
&lt;p&gt;There is also LiteBlue&lt;/p&gt;
&lt;p&gt;&lt;a href="https://itunes.apple.com/us/app/lightblue-explorer/id557428110?mt=8"&gt;https://itunes.apple.com/us/app/lightblue-explorer/id557428110?mt=8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are many tools out there. Some for PCs, some for mobile devices.&lt;/p&gt;
&lt;p&gt;I think the best tool out there is Cypress CySmart:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.cypress.com/documentation/software-and-drivers/cysmart-bluetooth-le-test-and-debug-tool"&gt;http://www.cypress.com/documentation/software-and-drivers/cysmart-bluetooth-le-test-and-debug-tool&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It requires a dongle. Also, it is the only thing from Cypress I like.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>