<?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>about s120 &amp;amp; s130 send data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17127/about-s120-s130-send-data</link><description>At s120,i used the following code to send data (to s110) 
 if(	( wIndicationFlag_Get() == true ) &amp;amp;&amp;amp; ( wConfirmFlag_Get() == true ) ) 
{
	//APPL_LOG(&amp;quot;Write Data\r\n&amp;quot;);
	pSend_aray = Load_data(); 
	ble_gip_c_bl_write(&amp;amp;m_ble_bas_c,pSend_aray);
}
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Oct 2016 12:02:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17127/about-s120-s130-send-data" /><item><title>RE: about s120 &amp; s130 send data</title><link>https://devzone.nordicsemi.com/thread/65734?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 12:02:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34601e06-99d8-4061-b042-c011b76a6f69</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you send the data over Nordic UART Service (NUS), you can set the bettery level characteristics value by calling the function &lt;code&gt;ble_bas_battery_level_update()&lt;/code&gt; with the value received over NUS as second argument. See the BLE UART &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_nus_c.html?cp=4_0_0_4_2_0_3"&gt;Central&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_nus_eval.html?cp=4_0_0_4_2_2_18"&gt;Peripheral&lt;/a&gt; examples to see how to send and receive data over NUS.&lt;/p&gt;
&lt;p&gt;If you want to write directly to the Battery Level characteristic, you can set write permissions in &lt;em&gt;ble_bas.c&lt;/em&gt; by adding the line &lt;code&gt;char_md.char_props.write = 1;&lt;/code&gt; in function &lt;code&gt;battery_level_char_add()&lt;/code&gt;. You also need to replace (or add if not present) the line &lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;bas_init.battery_level_char_attr_md.write_perm);&lt;/code&gt; with &lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;bas_init.battery_level_char_attr_md.write_perm);&lt;/code&gt; when you initialize the battery service. Notice that allowing writes to the battery service does not comply with the Battery service defined by Bluetooth SIG.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about s120 &amp; s130 send data</title><link>https://devzone.nordicsemi.com/thread/65733?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 10:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:949d8157-5170-482b-8bcc-f653190ab9c7</guid><dc:creator>mento</dc:creator><description>&lt;p&gt;Hello,
If the peripheral sent data to central, i want to use Battery Level, how to set the parameter(central)?&lt;/p&gt;
&lt;p&gt;The Nordic UART Service UUID parameter :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NUS_BASE_UUID                  {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**&amp;lt; Used vendor specific UUID. */

#define BLE_UUID_NUS_SERVICE           0x0001                      /**&amp;lt; The UUID of the Nordic UART Service. */
#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0002                      /**&amp;lt; The UUID of the TX Characteristic. */
#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0003                      /**&amp;lt; The UUID of the RX Characteristic. */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about s120 &amp; s130 send data</title><link>https://devzone.nordicsemi.com/thread/65732?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 09:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb32f5ec-a115-44f9-9468-6dd81de450a7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Battery Level Characteristic in your screenshot is part of the &lt;a href="https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.battery_service.xml"&gt;GATT Battery Service&lt;/a&gt;. The service is documented on the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__ble__dis.html"&gt;infocenter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many of the examples in the SDK implement the Battery Service, for instance the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_hrs.html?cp=4_0_0_4_2_2_8"&gt;Heart Rate Application&lt;/a&gt;, &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_hids_keyboard.html?cp=4_0_0_4_2_2_11"&gt;HID Keyboard&lt;/a&gt;/&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_hids_mouse.html?cp=4_0_0_4_2_2_12"&gt;HID Mouse&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_gls.html?cp=4_0_0_4_2_2_6"&gt;Glucose Application&lt;/a&gt; examples. The value is updated by calling the function &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__ble__bas.html#ga58d8f4336cce49ea5b3a2f8997bfe00e"&gt;&lt;code&gt;ble_bas_battery_level_update()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to write to this value from another device (I don&amp;#39;t see why you would want to do this, so maybe I misunderstood you), you can use the Nordic UART Service (see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_nus_c.html?cp=4_0_0_4_2_0_3"&gt;Nordic UART Service Client example&lt;/a&gt;) to transfer the value to the device. The assignment of the value to the battery level characteristic will have to be handled on the receiving device.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about s120 &amp; s130 send data</title><link>https://devzone.nordicsemi.com/thread/65730?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 08:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97789008-ef01-472f-8158-172aad61d431</guid><dc:creator>mento</dc:creator><description>&lt;p&gt;I used nRF5_SDK_12.1.0_0d23e2a, SoftDevice 8_9_0。
I used \examples\ble_central\ble_app_uart_c code。
1 Byte data write to Battery Level&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20161019_2D00_160949.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about s120 &amp; s130 send data</title><link>https://devzone.nordicsemi.com/thread/65731?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 11:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3282ada-f8fc-4b87-a911-2ed020395c3d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What type of data do you want to send? What SDK and Softdevice versions are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>