<?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>The ble_app_proximity example of the nRF51 SDK8.1 don&amp;#39;t work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11229/the-ble_app_proximity-example-of-the-nrf51-sdk8-1-don-t-work</link><description>I built the ble_app_proximity project and down load into my board, it can advertise and can connected by the lightblue and the nRF toolbox, But i sent the hex value of 0x02 via alert Level characteristic, it can&amp;#39;t callback the &amp;quot;ble_bas_on_ble_evt&amp;quot;, also</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Jan 2016 06:30:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11229/the-ble_app_proximity-example-of-the-nrf51-sdk8-1-don-t-work" /><item><title>RE: The ble_app_proximity example of the nRF51 SDK8.1 don't work</title><link>https://devzone.nordicsemi.com/thread/42158?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 06:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f956209-1963-4d53-abc0-f99dfad8d1de</guid><dc:creator>hark</dc:creator><description>&lt;p&gt;Thanks Stefan, It can callback the &amp;quot;alert_signal&amp;quot;  function now thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ble_app_proximity example of the nRF51 SDK8.1 don't work</title><link>https://devzone.nordicsemi.com/thread/42157?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2016 14:35:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad31a484-c323-442b-8de8-0f2041a3527b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;With the nRF Toolbox App, you need to bond before sending the alert in order for the alert to work on the nRF51 device.&lt;/p&gt;
&lt;p&gt;For the battery service, it did not work immediately on my side either, then I realized that the notification interval for the battery service was 120 seconds for the ble_app_proximity example in SDK 10. I decreased that to 1.2 seconds by defining:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BATTERY_LEVEL_MEAS_INTERVAL         APP_TIMER_TICKS(1200, APP_TIMER_PRESCALER)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then the notifications started to come through. Also, the example is set up to sample the supply voltage directly on the nRF51-DK board. If you instead initialize the ADC to sample from a pin like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_adc_config_t adc_config = NRF_ADC_CONFIG_DEFAULT;
adc_config.scaling = NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD;
nrf_adc_configure(&amp;amp;adc_config); 
nrf_adc_int_enable(ADC_INTENSET_END_Msk);
NVIC_EnableIRQ(ADC_IRQn);
NVIC_SetPriority(ADC_IRQn, 3);
nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_3);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then the ADC samples voltage on pin P0.02 instead. If you short P0.02 to VDD, then you will see some battery value sent to the phone.&lt;/p&gt;
&lt;p&gt;For the Android nRFToolbox app, the app does not display battery value when there is low voltage measured, so I see nothing happen in the nRFToolbox when I short P0.02 to ground. You should however see change if you apply voltage to P0.02 from external power supply&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>