<?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>Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42945/display-data-of-ble-on-android-pc</link><description>Hello, 
 I have a working code to read data from BMI160 an IMU sensor. The data is sent over BLE. Is there any way I can display the int16 data as it is in android or windows PC. Please reply ASAP</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Jan 2019 15:18:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42945/display-data-of-ble-on-android-pc" /><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167700?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 15:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:935eed1c-cb83-48d1-adf5-18a143ebd584</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So why does your post title, and your question, just ask about &lt;em&gt;&lt;strong&gt;displaying&lt;/strong&gt; &lt;/em&gt;data?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="74022" url="~/f/nordic-q-a/42945/display-data-of-ble-on-android-pc"]The data is sent over BLE. Is there any way I can display the &lt;strong&gt;int16&amp;nbsp;&lt;/strong&gt;data as it is in android or windows PC.[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167697?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 15:12:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:373c018f-babb-4db2-b13a-dc571109e88a</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;awneil, I know that but I have to send data over the air not through some wired connection.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167615?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 11:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f851f9f7-2488-4e61-9a7e-b38ffa62f034</guid><dc:creator>awneil</dc:creator><description>[quote userid="74022" url="~/f/nordic-q-a/42945/display-data-of-ble-on-android-pc"]Is there any way I can display the &lt;strong&gt;int16&amp;nbsp;&lt;/strong&gt;data as it is in android or windows PC[/quote]
&lt;p&gt;Of course, there are plenty of ways!&lt;/p&gt;
&lt;p&gt;98% of what any Android or Windows PC does is &amp;quot;displaying data&amp;quot;.&lt;/p&gt;
&lt;p&gt;As far as &lt;em&gt;displaying&lt;/em&gt; the data goes, it is entirely irrelevant where the data came from, or how it was transferred - it&amp;#39;s all just data!&lt;/p&gt;
&lt;p&gt;eg,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;printf( &amp;quot;The data value is: %d\n&amp;quot;, my_int_data );&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;neither knows nor cares where &lt;strong&gt;my_int_data&lt;/strong&gt; came from, or what it means - it simply sends it to stdout in the standard manner:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/"&gt;http://www.cplusplus.com/reference/cstdio/printf/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many libraries / frameworks are available if you want a graphical display of your data ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167611?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 11:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c31445f-9f6a-45d3-9bcc-a12c1cf04bd4</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;I think, the nrf52 cpu should be able to handle one sprintf statement.&lt;/p&gt;
&lt;p&gt;Although there maybe a better way of doing it. Maybe someone else can help with that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167606?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:212917cf-b7a1-4426-8fb4-35fb82f326b4</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;would sprintf&amp;nbsp;have any effect on cpu&amp;nbsp;performance?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167605?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb0f234-1ab2-411b-997e-1fa6835a9dc9</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Maybe, try something like this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sensor_string = &amp;quot;%d, %d, %d, %d&amp;quot;

unsigned char string_to_send[25];
sprintf(string_to_send, sensor_string, x, y, z, sensor_time);
ble_uart_nus_string_send(string_to_send, strlen(string_to_send);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167604?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44f61b77-d4ac-4ea4-bea6-7b61733d9ee4</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;And is there any other way i could convert the integer value into a string.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167602?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:43:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0b812d0-6ebd-4873-aab4-082d256ce57a</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;Here&amp;nbsp;&amp;nbsp;struct bmi160_sensor_data accel; is of the form&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct bmi160_sensor_data {
	/*! X-axis sensor data */
	int16_t x;
	/*! Y-axis sensor data */
	int16_t y;
	/*! Z-axis sensor data */
	int16_t z;
	/*! sensor time */
	uint32_t sensortime;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167601?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93b88407-e975-48b2-adf7-8a40e8940f6f</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;I am doing the same actually. Here is the snippet of the code that converts the data raead from IMU sensor(which is int16 ). to char string.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;union {
    struct bmi160_sensor_data accel;
    uint8_t ch[8];
}  accelValue;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167600?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa8c6363-54cb-4de4-a806-9944ba2763b4</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Maybe you can put your integer value inside a string and send the string to android device. That way there will be no conversion required.&lt;/p&gt;
&lt;p&gt;And I think, the data sent should be MSB first, but I am not sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167594?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eee3e0b-b614-4c52-b5a6-4ca5ec65e556</guid><dc:creator>Muhammad Nabeel</dc:creator><description>&lt;p&gt;My data is 12 characters long and I have used nRF connect and I am getting the data but in hex format. But I want them to be displayed in real numbers.&amp;nbsp;Also, can you tell me that how&amp;nbsp;&lt;strong&gt;ble_uart_nus_string_send&lt;/strong&gt;&amp;nbsp;service sends a character I mean (LSB first or MSB).&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data of BLE on Android/PC</title><link>https://devzone.nordicsemi.com/thread/167574?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 09:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940dae21-940c-46de-b2e5-fe6f9342ba5c</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey, you can use nrf Connect for&amp;nbsp;&lt;a href="https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp" rel="noopener noreferrer" target="_blank"&gt;Android&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop" rel="noopener noreferrer" target="_blank"&gt;for Desktop&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>