<?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>Getting data from characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70703/getting-data-from-characteristic</link><description>Hello, 
 I&amp;#39;m using nrf52832, sdk17 and Seeger Embedded Studio. I am using ble_app_uart example. 
 I am connecting with my phone and using RX and TX characteristics. My question is how can I get the data of RX characteristic to a basic variable? 
 I know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Jan 2021 09:16:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70703/getting-data-from-characteristic" /><item><title>RE: Getting data from characteristic</title><link>https://devzone.nordicsemi.com/thread/290675?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2021 09:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d94d475-d0e9-4219-ab29-4cb6f0cab08f</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;You welcome, and the best of luck with your project &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting data from characteristic</title><link>https://devzone.nordicsemi.com/thread/290551?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 13:55:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bfa6b83-dba6-4f5b-97cf-6f6b342d3a0c</guid><dc:creator>merlot</dc:creator><description>&lt;p&gt;Thank you for your help.&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: Getting data from characteristic</title><link>https://devzone.nordicsemi.com/thread/290549?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 13:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f67afd7-eaef-4be2-ad4c-0455d27ff3f5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;In the main.c file you will find a function called &lt;em&gt;nus_data_handler(ble_nus_evt_t * p_evt)&lt;/em&gt;, which is called every time the nRF device receives some data from the connected central (phone typically).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The p_evt parameter contains the data, stored as a byte buffer, and you can get access to these bytes through the&amp;nbsp;p_evt-&amp;gt;params.rx_data.p_data and&amp;nbsp;p_evt-&amp;gt;params.rx_data.length fields.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To store this to a variable you can add your own code here, and remove the original code writing to the UART if you want.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>