<?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>Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8902/scan-in-a-single-channel</link><description>Hi, 
 As mentioned in this post:
 devzone.nordicsemi.com/.../ 
 the struct ble_gap_adv_params_t --&amp;gt; ble_gap_adv_ch_mask_t give the option to turn any advertising channel OFF. I tested this approach and could advertise on only one channel. 
 The problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Nov 2017 14:06:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8902/scan-in-a-single-channel" /><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32755?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2017 14:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db40ed6f-2a87-4048-9624-01021037df4b</guid><dc:creator>Lars</dc:creator><description>&lt;p&gt;It scans all channels as default. Follow the &lt;em&gt;channel&lt;/em&gt; variable in &lt;em&gt;ll_scan.c&lt;/em&gt; and how it is handled in the code. If you just remove the increment, it will be set to 37 (or whatever you choose as initial value).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32754?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 07:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bedac591-a466-416e-8100-ce89f3625c05</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Hi Hung,
Also has the same question as Milan, which channel is scanned in this sample code? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32753?ContentTypeID=1</link><pubDate>Thu, 05 May 2016 05:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af39eae2-2c23-454c-93cb-36ad05629a75</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Which particular channel is scanned in the observer code given by you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32752?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2015 14:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ec61a4-ab29-49bb-a4a7-f3294870e540</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi FA,&lt;/p&gt;
&lt;p&gt;Sorry for a late response. I have made an example to integrate the proximity example in SDK 9.0 with the observer. The example worked with both S110 and S130. It&amp;#39;s attached in the answer above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32751?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2015 21:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a85473c-8c49-45b5-a617-aba6f6e4a032</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;I included the handler you posted. Off course there was no sys_evt_dispatch() in the Observer example, and I added it similar to the Timeslot Tutorial (&lt;a href="https://devzone.nordicsemi.com/tutorials/16/setting-up-the-timeslot-api/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt; with also the pstorage_sys_event_handler(sys_evt). Right now it works with S110 SDK 9 and the softdevice_handler.c included, but still not with S130. If it helps, the errors and warnings that I had to correct after using SDK 9 were all in nrf_adv_conn.c: 1- sd_ble_gatts_sys_attr_set and sd_ble_gap_sec_params_reply: missing 1 argument (passed NULL). 2- Used BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED for ble_adv_data.flags. 3- ble_gap_bond_params: one additional assignment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32750?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2015 12:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d65d8cfb-35ed-45c9-b4f8-4bba023f0085</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi FA,&lt;/p&gt;
&lt;p&gt;Removing softdevice_handler.c maybe not the best idea here. What you should do is to remove the SD_EVT_IRQHandler function. Then create a new function like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void timeslot_sys_event_handler(uint32_t evt)
{

 switch (evt)
    {
      case NRF_EVT_RADIO_SESSION_IDLE:
      case NRF_EVT_RADIO_BLOCKED:
        /* Request a new timeslot */
        ASSERT (btle_scan_enable_set (scan_enable) == BTLE_STATUS_CODE_SUCCESS);
        break;

      case NRF_EVT_RADIO_SESSION_CLOSED:
        break;
      
      case NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN:
        ASSERT(false);
        break;

      case NRF_EVT_RADIO_CANCELED:
        ASSERT (btle_scan_enable_set (scan_enable) == BTLE_STATUS_CODE_SUCCESS);
        break;

      default:
        /* This should not happen */
        __LOG (&amp;quot;%s: Program failure, undefined event = %d&amp;quot;, __FUNCTION__, evt);
        ASSERT(false);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you can add a call &lt;code&gt;timeslot_sys_event_handler(sys_evt);&lt;/code&gt; in sys_evt_dispatch() function so that it will be executed when there is a system event. This way you can merge 2 interrupt handler into one with no problem.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a little bit sort on time to be able to port ( modifying the code so that it would work on SDK 9.0) the github example code to SDK9.0. I could be able to do it some time next week, but I&amp;#39;m not sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32749?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2015 04:41:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c22c73a0-cd73-4680-b4b3-c79392bfc77d</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;1- Yes, I&amp;#39;m changing the headers from S110 to S130 when changing the soft device. The program will scan on a single channel and after receiving an advertisement from a specific address, toggles an LED. Didn&amp;#39;t work means that it will enter the program, but it fails to capture any advertisement, which means it&amp;#39;s not scanning properly.
2- After removing softdevice_handler.c, I&amp;#39;m using exactly the same SWI2_IRQHandler that is used in the GitHub and I think I didn&amp;#39;t notice any pstorage event.
You suggested PORTING the example to SDK 9, can you give more information about it? Is there a way to do it automatically? I included all the example files in a SDK 9 project and tried to fix any errors that Keil was showing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32748?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2015 09:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7534eace-015b-4eb7-bcba-99c99fe735c9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;No there should be no difference. But you would need to use the correct API headers matching with your Softdevice (S110 or S130). You mentioned it didn&amp;#39;t work, could you be more specific ?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes, the example on github created for S110.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you remove softdevice_handler.c, please make sure you have in your SWI2_IRQHandler that you fetch all the system event out, and handle them correctly. Including the pstorage event handle.
My suggestion for you is to port the example on Github to SDK 9. After that you add your own application code in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32747?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2015 03:28:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61a6f1bb-ee88-4358-88a0-997818322974</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;To troubleshoot step by step, I decided to make my program as close as possible to the GitHub example. I noticed that in that example, softdevice_handler.c is not included in the scan project. So, I removed that file from the project. The program now works with S110 provided in SDK 9, but it doesn&amp;#39;t work with S130.
1- Is there any difference between S110 and S130 in using the time slot?
2- Even if I use S110 I should be able to scan with time slot and advertise just like any S110 device, right?
I still have the problem of adding softwdevice_handler.c which is needed for the part of my program that is advertising, but I think I&amp;#39;ll ask it in a separate post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32746?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2015 11:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbbd50d5-2269-44ec-9b53-a5621911a8c6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi FA,&lt;/p&gt;
&lt;p&gt;SWI2_IRQHandler is used in main.c under the name of SD_EVT_IRQHandler, check the macro define.
The reason you got duplicate is that in your application you already have SWI2_IRQHandler in softdevice_handler.c. You would need to merge this 2 handlers into one.&lt;/p&gt;
&lt;p&gt;SWI1 is used for radio notification, if you don&amp;#39;t use radio notification you can use it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32745?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2015 21:52:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beb48048-7ca3-4872-85c9-3d6056ac7c13</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;Hi Hung,
I tried to replace the scanning parts of my program with the one in main.c of the observer example. Again the example is SDK 6 I think and I&amp;#39;m using SDK 9, so a couple of errors came but I could get rid of those. However, I&amp;#39;m getting one error, which I don&amp;#39;t know how to solve. It says (&amp;quot;SWI2_IRQHandler multiply defined by softdevice_handler.o and main.o). I had a similar error for SWI0_IRQHandler in main.c and app_timer.o. I changed all the SWI0 in main to SWI1. One error was gone, but there is no SWI2_IRQHandler defined in my main. So, where the error is coming from? Is it OK just to change the software interrupt numbers to get rid of duplicate definition error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan in a Single Channel</title><link>https://devzone.nordicsemi.com/thread/32744?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2015 13:46:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a34156e8-8245-4be2-9795-2aed1116e264</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi FA,&lt;/p&gt;
&lt;p&gt;Scanning with selective channel(s) is not supported yet. I will report internally to fix it in the documentation.&lt;/p&gt;
&lt;p&gt;Thanks for reporting.&lt;/p&gt;
&lt;p&gt;If you want to do scanning on single channel, you may want to have a look at &lt;a href="https://github.com/NordicSemiconductor/nRF51-multi-role-conn-observer-advertiser"&gt;this observer example&lt;/a&gt;. We do scanning manually on S110 softdevice using timeslot feature.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_proximity-_2D00_-Observer.zip"&gt;ble_app_proximity - Observer.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>