<?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>How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/770/how-to-simply-process-advertising-data</link><description>Hello to everyone, 
 My problem/question now is about the MasterEmulator. I&amp;#180;m working with the nRF51822(SoftDevice) and i have my own program already working more or less like I want. The main idea is that the device will send some information in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Nov 2013 13:58:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/770/how-to-simply-process-advertising-data" /><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3889?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2013 13:58:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c47dd4e-7140-455f-ba42-62facd5b3f8c</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;It would be better to post separately, yes. Which packets will be responded to with different advertising types is given in the Core specification, Volume 6, Part B, table 4.1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3888?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2013 10:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1234cb3-79bd-4a8c-a947-30ab8314e749</guid><dc:creator>Alvaro</dc:creator><description>&lt;p&gt;These are not  good news for me. :(&lt;/p&gt;
&lt;p&gt;I have another question but maybe should be in a new post.&lt;/p&gt;
&lt;p&gt;I have notice that to have both packet Advertising and Scan Response with a broadcaster in not connectable mode is not possible.&lt;/p&gt;
&lt;p&gt;With BLE_GAP_ADV_TYPE_ADV_NONCONN_IND, I see the advertising packet but not the Scan response one.&lt;/p&gt;
&lt;p&gt;With BLE_GAP_ADV_TYPE_ADV_SCAN_IND, I see the Scan response packet but no the Advertising one.&lt;/p&gt;
&lt;p&gt;Only with a connectable mode can I see both. And the point is that I would like to have both in a non connectable mode, Is that possible?&lt;/p&gt;
&lt;p&gt;Thanks one more time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3887?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 15:49:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:694f0b1d-9827-4737-a341-81751e436bb6</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;It seems that you actually want to get the same field from both the Advertisement packet and the Scan Response. This is not possible with the Manufacturer specific data field and the current version of the Master Emulator API.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve requested it to be added to a future release, but I can&amp;#39;t currently guarantee that it will happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3886?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 13:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:096feb4a-673e-48be-8aa1-8d2d281c8b59</guid><dc:creator>Alvaro</dc:creator><description>&lt;p&gt;Sorry about my terminology and my poor English, I have edit to attach the screenshot of the Master Control Panel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3885?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 13:43:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf927d7f-bc1a-42ac-8e7c-30eea5dcaef6</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Your terminology is a tad confusing, there is only an advertisement packet and a scan response packet, the latter which the scanner only receives if it does active scanning. Can you please edit your post to also include a screenshot of the Master Control Panel showing your device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3884?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 11:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe859211-6183-435c-93e7-70d3ce4ab96e</guid><dc:creator>Alvaro</dc:creator><description>&lt;p&gt;Thanks for the comment, but till now i can´t get the data, I see that usually i get the data from the advertising packet, and sometimes take the data from the scan response packet when i read from the DeviceInfoType.ManufacturerSpecificData, so how can I take both?&lt;/p&gt;
&lt;p&gt;That´s my small code for testing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   MasterEmulator master = new MasterEmulator();       
            var usbdevices = master.EnumerateUsb(UsbDeviceType.AnyMasterEmulator);
            foreach (string usbdevice in usbdevices)
            {
                master.Open(usbdevice);
                Console.WriteLine(&amp;quot;Device {0} Opened.&amp;quot;,usbdevice);
                master.Reset();
                Console.WriteLine(&amp;quot;MasterEmulator Reset.&amp;quot;);
            }
            BtScanParameters scanParameters = new BtScanParameters();
            scanParameters.ScanType = BtScanType.ActiveScanning;
            master.Run();

            while (true)
            {
                try
                {

                    IEnumerable&amp;lt;BtDevice&amp;gt; devices;
                    devices = master.DiscoverDevices(1, scanParameters);
            
                    foreach (BtDevice dev in devices)
                    {
                        IDictionary&amp;lt;DeviceInfoType, string&amp;gt; deviceInfo = dev.DeviceInfo;
                        
                        var servData = dev.DeviceInfo[DeviceInfoType.ManufacturerSpecificData];

                        Console.WriteLine(&amp;quot;Device found... {0}&amp;quot;, dev);
                      
                        foreach (String test in dev.DeviceInfo.Values)
                        {
                            Console.WriteLine(&amp;quot;... {0}&amp;quot;, test);
                        }                 

                        ////Console.WriteLine(deviceInfo[DeviceInfoType.ServiceData]);

                    }
                    Console.WriteLine(&amp;quot;---------------------------------&amp;quot;);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(&amp;quot;Exception in StartDeviceDiscovery {0}&amp;quot;, ex.Message);
                }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have put the UUID 0007 in the scandata info and the UUID 0008 in the response packet that i can know when I read one or the other.
I get usually always the info from the scandata but not the response packet (that only appear sometimes).&lt;/p&gt;
&lt;p&gt;That´s the console output:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i41.tinypic.com/xdxbhu.jpg" alt="http://i41.tinypic.com/xdxbhu.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ConsoleCapture.jpg" alt="ConsoleCapture.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/DongleCapture3.jpg" alt="DongleCapture3.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3883?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 10:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:431ed481-5fe7-4ecd-a3bd-cb53ecd39804</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Great that you&amp;#39;ve been able to get some progress on your own! Unfortunately, we don&amp;#39;t have any more documentation on the Master Emulator API than what is already there, but combined with the example applications, I believe that you should be able to get things working.&lt;/p&gt;
&lt;p&gt;As for your problem with getting the Scan Responses, remember that you must set the scan type to active, or else the Master Emulator dongle won&amp;#39;t send any Scan Requests, and hence don&amp;#39;t get any responses. This can be done by setting the ScanType field of the BtScanParameters struct before starting scanning:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
BtScanParameters scanParams = new BtScanParameters();
scanParams.ScanType = BtScanType.ActiveScanning;
...

&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3882?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 17:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02fbaa96-3fce-4d6b-9890-af0088758c9b</guid><dc:creator>Alvaro</dc:creator><description>&lt;p&gt;Oook, one more time I´m here again, now I´m able to take the ManufacturerSpecificData (now I change my data to be there) from the advertising packet, but I have no idea of how I can take the same data from the ScanResponse packet where the other half of my info is.&lt;/p&gt;
&lt;p&gt;Please some clue or indication will be great.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Simply process Advertising Data</title><link>https://devzone.nordicsemi.com/thread/3881?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 13:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4357b46-ae1a-4a04-bbb8-12c8c169a5ee</guid><dc:creator>Alvaro</dc:creator><description>&lt;p&gt;Ok, i have been working with the HealthThermoDemo app, and i found that it is also only able to get the same information from the adv/scan packet that i make with &amp;quot;my little console program&amp;quot;.&lt;/p&gt;
&lt;p&gt;So now i´m wondering if it is possible to get the entire packet (as it is), that i could process and take my adv.data and scanresponse.data by my self.&lt;/p&gt;
&lt;p&gt;thanks one more time, Alvaro.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>