<?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>recuperate a characteristic &amp;#39;s value from a Nordic device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6586/recuperate-a-characteristic-s-value-from-a-nordic-device</link><description>I am trying to develop an application for the Android that will communicate via BLE to a Nordic device. I&amp;#39;m able to read the characteristic&amp;#39;s value by
BluetoothGattCharacteristic characteristic ;
final byte[] data = characteristic.getValue(); 
 but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2015 10:39:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6586/recuperate-a-characteristic-s-value-from-a-nordic-device" /><item><title>RE: recuperate a characteristic 's value from a Nordic device</title><link>https://devzone.nordicsemi.com/thread/23008?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 10:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21eab820-4cc0-4721-8a0a-6d89166924cc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@rosa: You can try to test with the Master Control panel app on the phone.&lt;/p&gt;
&lt;p&gt;I would suggest you to test and have a look at the source code of either the nRFToolbox - heart rate profile, or the nRFUART. In both apps we receive notification and display it on the app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: recuperate a characteristic 's value from a Nordic device</title><link>https://devzone.nordicsemi.com/thread/23007?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 08:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:168f86aa-f66e-4e1c-ab46-18592b6df69a</guid><dc:creator>rosa</dc:creator><description>&lt;p&gt;@Hung Bui  : the server is sending a notification to the mobile, i can verify this by the master control (using a dungle) but the application is not notified yet , i&amp;#39;m looking for the best function that can detect the new Major&amp;#39;s value&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: recuperate a characteristic 's value from a Nordic device</title><link>https://devzone.nordicsemi.com/thread/23006?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 07:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e284a55-2f88-474e-b72f-1d991b4ff24c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@rosa: When the characteristic changed the value locally (on the server), it&amp;#39;s not possible for the client (the phone for example) to know that. You would need to notify the client by sending a notification from the server to the client.
When the client receive the notification, you will have  onCharacteristicChange callback. You can have  a look at our ble_app_hrs example where we notify the heart rate measurement and the battery level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: recuperate a characteristic 's value from a Nordic device</title><link>https://devzone.nordicsemi.com/thread/23005?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 14:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d04ee4ca-2712-4994-a20a-d3bd24179fb8</guid><dc:creator>rosa</dc:creator><description>&lt;p&gt;thanks for your answer ulrlich but i&amp;#39;m sorry maybe i didn&amp;#39;t explain my question very well, in fact i&amp;#39;m able to read the characteristic&amp;#39;s value from the Nordic device, but when the device
changes it , the application is no more able to read the new value . what
should i do then ?
My method to read the major&amp;#39;s characteristic is&lt;/p&gt;
&lt;p&gt;public void readMajorCharacteristic() {&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	if (mBluetoothGatt == null)

		return;

	if (mMajorCharacteristic != null) 

		mBluetoothGatt.readCharacteristic(mMajorCharacteristic);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but this method is reading the located value to the application ...&lt;/p&gt;
&lt;p&gt;i think it&amp;#39;s something related to a BluetoothGattCallBack or onCharacteristicChange maybe but i&amp;#39;m not really sure what can it be&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: recuperate a characteristic 's value from a Nordic device</title><link>https://devzone.nordicsemi.com/thread/23004?ContentTypeID=1</link><pubDate>Sat, 18 Apr 2015 19:44:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f65de21-5cdd-438d-b77f-14d50b9b0715</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You have to send a read request to the remote characteristic to fetch its latest value. This is done with the &lt;em&gt;readCharacteristic (BluetoothGattCharacteristic characteristic)&lt;/em&gt; API call in Android. The operation will then call &lt;em&gt;onCharacteristicRead&lt;/em&gt; once the remote value is read. Please refer to the documentation for BluetoothGatt [0].&lt;/p&gt;
&lt;p&gt;This, and more, is also explained in the Android BLE tutorial at [1]. If you familiarize yourself with everything on that single page, I think that will clear up a few things for you.&lt;/p&gt;
&lt;p&gt;[0] &lt;a href="https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readCharacteristic%28android.bluetooth.BluetoothGattCharacteristic%29"&gt;developer.android.com/.../BluetoothGatt.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://developer.android.com/guide/topics/connectivity/bluetooth-le.html"&gt;developer.android.com/.../bluetooth-le.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>