<?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>nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40832/nrf51-add-ota-dfu-service-on-hrs_scanner-or-ble_nus-example</link><description>hi all, 
 
 I have added the dfu service in one of example of sdk_11 ble_scanner_hrs I followed all help available on this forum and made sucessfuly compiled code but it stopped advertising? 
 any help is appreciate I have attached my main file 
 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Dec 2018 08:16:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40832/nrf51-add-ota-dfu-service-on-hrs_scanner-or-ble_nus-example" /><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161350?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 08:16:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8ec7bd3-39e7-451e-bc20-62487b8d2a46</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;No, there is no counter in this example, but you can create a counter in main.c.&lt;/p&gt;
&lt;p&gt;volatile uint32_t m_counter = 0;&lt;/p&gt;
&lt;p&gt;near the top of your main.c file, and increment this when you find an advertisement packet, or an advertisement packet from a new device (depending on what you want).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161331?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 05:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3616c466-df8a-47e9-95d9-d8f72ce0a311</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;ok thank you so much Edvin,&lt;/p&gt;
&lt;p&gt;It is working perfectly nice thanx for your help.&lt;/p&gt;
&lt;p&gt;One last question do I know how many numbers of Bluetooth scanned by the scanner? any parameter is available for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161228?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 14:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce506efd-8d36-4777-8ad5-eb1f48b18c77</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;thank you Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for your effort.I will check with changes in my code and update you. sorry for trouble I give you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161209?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 13:22:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b2ccee9-de7d-49ab-b387-0d16b849ef1a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Note that the address is LSB, so if you want to see it the same way as in nRF Connect, you must print it in the opposite order, starting from addr[5] and ending with addr[0].&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161208?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 13:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a62e12-fa56-48a4-90c8-074cf5c59696</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. I see. Well. Thank you for sending the correct 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;p&gt;&lt;/p&gt;
&lt;p&gt;The scanner_beacon.c/h doesn&amp;#39;t actually forward the address to the&amp;nbsp;beacon_evt_handler() in main.c. If you see in the app_beacon_on_ble_evt, you can see that it creates the event that is forwarded to the main scanning interrupt handler. It only decodes the MINOR and MAJOR values, in addition to the uuid.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did a few modifications to your project. Now it forwards the RSSI and the address to the beacon_evt_handler() in main.c.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Attached is the main.c file, the scanner_beacon.h and scanner_beacon.c that I changed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-5734de8ed70f4be198e316c23dbf3ea6/scanner_5F00_beacon.c"&gt;devzone.nordicsemi.com/.../scanner_5F00_beacon.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-5734de8ed70f4be198e316c23dbf3ea6/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-5734de8ed70f4be198e316c23dbf3ea6/scanner_5F00_beacon.h"&gt;devzone.nordicsemi.com/.../scanner_5F00_beacon.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161111?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 05:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10c22dd2-4e0a-4e9e-97f5-35ec3b1b02d9</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;yes Edvin,&lt;/p&gt;
&lt;p&gt;That is different project which used hrs_scanner example.&lt;/p&gt;
&lt;p&gt;Here in above project I am scanning using the central nus_c service.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hrs_5F00_scanner.rar"&gt;devzone.nordicsemi.com/.../hrs_5F00_scanner.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;this project has the beacon_evt_handler()&amp;nbsp; function its location&lt;/p&gt;
&lt;p&gt;nRF5_SDK_11.0.0\examples\ble_peripheral\experimental_ble_app_multiactivity_beacon\hrs_scanner&lt;/p&gt;
&lt;p&gt;How can I make space for service using service inti with memloc() function?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your effort&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/161031?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 14:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c302937-7693-4c4e-91ae-595e0bbcd498</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. I used the pca10028\s130_with_dfu\arm5_no_packs, as it was the one I found that was closest to compiling without error, but I had to add the path to ble_db_discovery.h, so I just want to check with you that I used the correct project?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After that it compiled, but nus_c_init returns 0x04, because it didn&amp;#39;t have space for the NUS service. So am I using the correct project?&lt;/p&gt;
&lt;p&gt;After commenting out nus_c_init() the application runs, and I can see the advertisements, but still I can&amp;#39;t see your&amp;nbsp;beacon_evt_handler() in your project. The one that you described in a previous reply:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void beacon_evt_handler(ble_scan_beacon_evt_t * p_evt)
{
    uint32_t err_code;
	// const ble_gap_evt_t * p_gap_evt = &amp;amp;p_evt-&amp;gt;evt.gap_evt;
	// const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;

    if((p_evt-&amp;gt;rcv_adv_packet.adv_data.major    == SEARCHED_MAJOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.minor    == SEARCHED_MINOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id == APP_COMPANY_IDENTIFIER))
    {
			
			  printf(&amp;quot;\nMAJOR=0x %02x\n&amp;quot;,(uint16_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.major);
			  printf(&amp;quot;\nMINOR=0x%02x\n&amp;quot;,(uint16_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.minor);
			  printf(&amp;quot;\nNordicid=0x%02x\n&amp;quot;,(uint8_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id);
			  printf(&amp;quot;\nrssi=-0x%02x\n&amp;quot;,(uint8_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.rssi);
			  printf(&amp;quot;\nuuid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.uuid);
			  printf(&amp;quot;Connecting to target %02x%02x%02x%02x%02x%02x\r\n&amp;quot;,
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[5],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[4],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[3],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[2],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[1],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[0]);
			
                             
			  
        err_code = bsp_indication_set(BSP_INDICATE_ALERT_3);
        APP_ERROR_CHECK(err_code);
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160913?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 10:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2609a84-1b80-409a-b0b1-f894cd4e2b6a</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;oh sorry my mistake.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3632.ble_5F00_app_5F00_hrs.rar"&gt;devzone.nordicsemi.com/.../3632.ble_5F00_app_5F00_hrs.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160906?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 09:40:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1532c6f7-4cda-46bf-9282-85a060ee938c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;A bit, but this folder doesn&amp;#39;t include the main.c file. Can you zip the ble_app_hrs folder?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160747?ContentTypeID=1</link><pubDate>Fri, 07 Dec 2018 13:21:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8332f7e-2bd8-4616-8f69-aa12a429ff51</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;ok I have&amp;nbsp; attached the code please copy the project folder in \nRF5_SDK_11.0.0_89\examples\ble_peripheral\ble_app_hrsfolder .I just copied beacon_scanner.c(scanner_beacon.c) file in my folder and added to application.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pca10028.rar"&gt;devzone.nordicsemi.com/.../pca10028.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;hope this help you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160730?ContentTypeID=1</link><pubDate>Fri, 07 Dec 2018 12:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f7cad59-fcdf-44a1-8c98-aa0d1b967e45</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;yes, I see. But beacon_scanner.c isn&amp;#39;t included in the project that you sent. I would like to see how you have included and initialized/started the scanning for beacons.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160497?ContentTypeID=1</link><pubDate>Thu, 06 Dec 2018 05:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9deaa886-8f05-4f0a-8dd5-28fa0ea1a168</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/scanner_5F00_beacon.c"&gt;devzone.nordicsemi.com/.../scanner_5F00_beacon.c&lt;/a&gt;this is the file which decode the beacon advertising&lt;/p&gt;
&lt;p&gt;and this is main&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/48234.main.c"&gt;devzone.nordicsemi.com/.../48234.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am just want to take beacon data by scanner simple using sdk11 /experimental scanner hrs as base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160415?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 14:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24d2fce1-05f7-4fa8-a881-5db1145dc44a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand. You want to store the values from the advertising packet? what does your uint16_decode() function do? You can&amp;#39;t change the values from the p_evt. This doesn&amp;#39;t make any sense to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160381?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 12:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7e6e774-c5d3-4386-92c6-118cbdd2e044</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;do I need to decode the mac id like&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt; memcpy(&amp;amp;adv_packet-&amp;gt;adv_data.uuid, &amp;amp;buffer[i], sizeof(ble_uuid128_t));
        i += sizeof(ble_uuid128_t);
        adv_packet-&amp;gt;adv_data.major = uint16_decode(&amp;amp;buffer[i]);
			//  i += sizeof(ble_gap_addr_t);
       // adv_packet-&amp;gt;adv_data.peer_addr = uint48_encode(&amp;amp;buffer[i],&amp;amp;buffer1[i]);
			  
        i += sizeof(uint16_t);
        adv_packet-&amp;gt;adv_data.minor = uint16_decode(&amp;amp;buffer[i]);
        i += sizeof(uint16_t);
        adv_packet-&amp;gt;adv_data.rssi = uint16_decode(&amp;amp;buffer[i]);
			  i += sizeof(ble_uuid128_t);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please suggest thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160316?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 08:25:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fbee1bf-d57c-4b14-85d6-9884ca819071</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is it possible to send the project? I haven&amp;#39;t tested the beacon_evt_handler myself yet. It is from a quite old SDK. I have the SDK, so if you zip the project folder, it would do. Then I wouldn&amp;#39;t have to port the logging and beacon event handler to your project.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160297?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 05:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0f0e554-a612-4e0d-8a48-c100c232224e</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;hi edvin still getting the wrong mac address I followed the tips you given its printing the hex value for major and minor correct but MAC iD,UUID comes wrong and RSSI comes same for any beacon place.&lt;/p&gt;
&lt;p&gt;Here the out&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;MAJOR=0x 1200

MINOR=0x3400

Nordicid=0x59

rssi=-0xc3

uuid=874713601
Connecting to target 253c20003208

MAJOR=0x 1200

MINOR=0x3400

Nordicid=0x59

rssi=-0xc3

uuid=874713601
Connecting to target 253c20003208
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I made changes to code as per your suggest&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void beacon_evt_handler(ble_scan_beacon_evt_t * p_evt)
{
    uint32_t err_code;
	// const ble_gap_evt_t * p_gap_evt = &amp;amp;p_evt-&amp;gt;evt.gap_evt;
	// const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;

    if((p_evt-&amp;gt;rcv_adv_packet.adv_data.major    == SEARCHED_MAJOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.minor    == SEARCHED_MINOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id == APP_COMPANY_IDENTIFIER))
    {
			
			  printf(&amp;quot;\nMAJOR=0x %02x\n&amp;quot;,(uint16_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.major);
			  printf(&amp;quot;\nMINOR=0x%02x\n&amp;quot;,(uint16_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.minor);
			  printf(&amp;quot;\nNordicid=0x%02x\n&amp;quot;,(uint8_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id);
			  printf(&amp;quot;\nrssi=-0x%02x\n&amp;quot;,(uint8_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.rssi);
			  printf(&amp;quot;\nuuid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.uuid);
			  printf(&amp;quot;Connecting to target %02x%02x%02x%02x%02x%02x\r\n&amp;quot;,
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[5],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[4],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[3],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[2],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[1],
			                    (uint8_t) p_evt-&amp;gt;rcv_adv_packet.addr.addr[0]);
			
                             
			  
        err_code = bsp_indication_set(BSP_INDICATE_ALERT_3);
        APP_ERROR_CHECK(err_code);
    }
}&lt;/pre&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;span id="__caret"&gt;_&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160235?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 14:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73c7a052-ce3e-4948-b230-a24e99d3d20c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have not tested to verify this, but it seems like it is only a matter of how it is presented using the printf() function.&lt;/p&gt;
&lt;p&gt;can you try to cast to the correct lengths before printing them? You must look in the ble_scan_beacon_evt_t-&amp;gt;rcv_adv_packet types to see what it actually is.&lt;/p&gt;
&lt;p&gt;E.g. the address are actually uin8_t hexadecimal values:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;printf(&amp;quot;Connecting to target %02x:%02x:%02x:%02x:%02x:%02x:\r\n&amp;quot;, //removed one %x. You had 7. Also added %02x, so that it adds 0&amp;#39;s if the hexadecimal is 0x05, for example.
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[0],
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[1],
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[2],
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[3],
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[4],
			                     (uint8_t)p_evt-&amp;gt;rcv_adv_packet.addr.addr[5]);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;also casting to 8 bit values before printing. I believe that you get a bit random values, because you don&amp;#39;t specify what to print.&lt;/p&gt;
&lt;p&gt;Also, the MAJOR and MINOR values are actually correct, but here you need to &amp;quot;trim&amp;quot; the values as well.&lt;/p&gt;
&lt;p&gt;4608 = 0x1200&lt;/p&gt;
&lt;p&gt;13312 = 0x3400.&lt;/p&gt;
&lt;p&gt;Try to print:&lt;/p&gt;
&lt;p&gt;printf(&amp;quot;MAJOR = %02x\n&amp;quot;, (uint16_t)p_evt-&amp;gt;rcv_adv_packet.adv_data.major);&amp;nbsp; &amp;nbsp; &amp;nbsp; //note the %x&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160201?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 12:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c0f3e3c-f14e-4b63-a7a3-4aaf6b4e005b</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;yes I have becon_scanner_evnt function in scanner.c file&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am getting wrong data&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;MAJOR=4608

MINOR=13312

Nordicid=89

rssi=-1219

uuid=874713601
Connecting to target 8320203c25bcab9a89

MAJOR=4608

MINOR=13312

Nordicid=89

rssi=-12483

uuid=874713601
Connecting to target 8320203c25bcab9a89
&lt;/pre&gt;wrong rssi ,wrong uuid and wrong MAC of beacon my beacon MAc id :&amp;#39;F9:1A:7c:30:73:4b&amp;#39; I am receiving &amp;#39;8320203c25bcab9a89&amp;#39;&lt;/p&gt;
&lt;p&gt;in Hex format I update my code as you suggest as below&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for handling a BeaconScanner event.
 *
 * @details This function will be called each time the scanner has found an advertiser with beacon data.
 *          In this simple implementation, it checks the Major and Minor and company ID fields from the beacon data,
 *          and if they match, @ref BSP_INDICATE_ALERT_3 is indicated. 
 *
 * @param[in]   p_evt   scanner event data.
 */
static void beacon_evt_handler(ble_scan_beacon_evt_t * p_evt)
{
    uint32_t err_code;
	// const ble_gap_evt_t * p_gap_evt = &amp;amp;p_evt-&amp;gt;evt.gap_evt;
	// const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;

    if((p_evt-&amp;gt;rcv_adv_packet.adv_data.major    == SEARCHED_MAJOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.minor    == SEARCHED_MINOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id == APP_COMPANY_IDENTIFIER))
    {
			
			  printf(&amp;quot;\nMAJOR=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.major);
			  printf(&amp;quot;\nMINOR=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.minor);
			  printf(&amp;quot;\nNordicid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id);
			  printf(&amp;quot;\nrssi=-%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.rssi);
			  printf(&amp;quot;\nuuid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.uuid);
			  printf(&amp;quot;Connecting to target %x%x%x%x%x%x%x\r\n&amp;quot;,
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[0],
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[1],
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[2],
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[3],
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[4],
			                     p_evt-&amp;gt;rcv_adv_packet.addr.addr[5]);
			
                             
			  
        err_code = bsp_indication_set(BSP_INDICATE_ALERT_3);
        APP_ERROR_CHECK(err_code);
    }
}

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160191?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 12:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a105af70-a844-4b66-bbbd-e692e2b8815b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If you look in the adv_packet_t structure in scanner_beacon.h, you see that the RSSI is found in&amp;nbsp;adv_packet_t p_evt-&amp;gt;rcv_adv_packet.adv_data.rssi, just like you have in the snippet above. The &amp;quot;MAC&amp;quot; address, or BLE address is found in p_evt-&amp;gt;rcv_adv_packet-&amp;gt;addr.addr[0] to addr.addr[5].&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you have the beacon_evt_handler in your application? I am asking because I couldn&amp;#39;t see it in your project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/160171?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 10:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d009ce9-03b4-42b7-87ad-2362c460de37</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;ok I will do check and come back mean while can you tell me how can I print MAC address and RSSI in below code&lt;pre class="ui-code" data-mode="text"&gt;static void beacon_evt_handler(ble_scan_beacon_evt_t * p_evt)
{
    uint32_t err_code;

    if((p_evt-&amp;gt;rcv_adv_packet.adv_data.major    == SEARCHED_MAJOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.minor    == SEARCHED_MINOR)
     &amp;amp;&amp;amp;(p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id == APP_COMPANY_IDENTIFIER)
		)
    {
			  printf(&amp;quot;\nMAJOR=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.major);
			  printf(&amp;quot;\nMINOR=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.minor);
			  printf(&amp;quot;\nNordicid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.manuf_id);
			  printf(&amp;quot;\nrssi=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.rssi);
			  printf(&amp;quot;\nuuid=%d\n&amp;quot;,p_evt-&amp;gt;rcv_adv_packet.adv_data.uuid);
        err_code = bsp_indication_set(BSP_INDICATE_ALERT_3);
        APP_ERROR_CHECK(err_code);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also checked as you suggest didn&amp;#39;t get error_info but&amp;nbsp; while I debug it took the code to place as seen in below image&lt;img alt="error" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/error1.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/159957?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 12:53:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11110c7a-9302-4196-8677-15762a7dd9f8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. I see.&lt;/p&gt;
&lt;p&gt;If you try to run your example in Keil. Try to disable your optimization. Go to your project settings (Options for target) -&amp;gt; C/C++ -&amp;gt; Optimization -&amp;gt; Level 0 (-O0). While you are there, add DEBUG to your Preprocessor Symbols.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then recompile your project, and set a breakpoint on line 54 in app_error.c.&lt;/p&gt;
&lt;p&gt;Does it stop there? If so, what are your .line_num, .p_file_name and .err_code? Add error_info to watch by right clicking it, and select &amp;#39;add error_info to -&amp;gt; Watch 1&amp;#39;.&lt;/p&gt;
&lt;p&gt;You should see what file, line number and what the err_code is. Then find this place in your project, and see what function that returned this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/159925?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 10:24:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80617f0e-4479-44a7-a1e8-310241708052</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;sorry for late reply and I have attached new file please add this folder to the sdk11/example/ble_central/ble_app_uart_c Hope it solve file inclusion errors&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_uart_5F00_c.rar"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_c.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have working on the same code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/159250?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 14:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48b37a23-c09d-4eae-af44-1b45c539984c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So this issue is not related to the bootloader?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where in nus_c_init() does it stop? Is it one of the APP_ERROR_CHECK(err_code) that receives an err_code != 0? If so, what is returned?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t compile your project, because you use complete paths:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;D:\SDK_Nordic\nRF5_SDK_11.0.0_89a8197\components\ble\ble_services\ble_nus_c\ble_nus_c.h&amp;quot;&lt;br /&gt;#include &amp;quot;D:\SDK_Nordic\nRF5_SDK_11.0.0_89a8197\components\libraries\uart\app_uart.h&amp;quot;&lt;/p&gt;
&lt;p&gt;I tried to fix this, but then it complained about files missing. Which project file did you use? I tried both s130 and s130_with_dfu, but none of them compiled when I changed the path for the ble_nus_c.h and app_uart.h files. It is still missing a lot of files. I just want to make sure I use the same project as you, so I don&amp;#39;t spend a lot of time fixing something you do not use.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, can you check where in nus_c_init() it gets &amp;quot;stuck&amp;quot;?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/159243?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 13:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef6bfc17-114e-4a7f-b7ef-e51a760e5cbb</guid><dc:creator>ud23</dc:creator><description>&lt;p&gt;Hi I programmed the Softdevice and bootloader for SDK11 with nrfgo Studio and device is advertising also and connect the device and do DFu.&lt;/p&gt;
&lt;p&gt;But for attached file stucked at nus_c_inti() function. I Ported nus service in sdk 11._ble_peripheral/ble_app_hrs&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1541.ble_5F00_app_5F00_hrs.rar"&gt;devzone.nordicsemi.com/.../1541.ble_5F00_app_5F00_hrs.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 add ota dfu service on hrs_scanner or ble_nus example</title><link>https://devzone.nordicsemi.com/thread/159233?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 13:13:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ba558a-c3bd-49e6-976d-284d72236481</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes. The bootloader from SDK11.0.0 and SDK12.3.0 are different. If you use the bootloader from SDK12.3.0, you will have to use the softdevice from SDK12.3.0 as well. So this is only if you have not come too far in the development.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did your application advertise before you added the DFU service? I can&amp;#39;t test your application. If you want me to, send the entire project folder, including the project file (Keil application file).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And I didn&amp;#39;t understand your answer, but did you flash the bootloader before running the application? How did you program the application? Did you do it via DFU, or the programmer? if programmer, did you use nrfjprog, nrfutil, nRFgo Studio, or your IDE (keil?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>