<?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>Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13671/master-emulator-go-crazy-after-a-connect-fail</link><description>Hi, 
 I&amp;#39;m using the Master Emulator DLL to build a VB, everything seems go fine. However I found that if there&amp;#39;s a device discovered but fail to connect by some result (eg. if the device just shut off the BLE; or if it&amp;#39;s too far away). Once connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 May 2016 09:17:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13671/master-emulator-go-crazy-after-a-connect-fail" /><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52233?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 09:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8adf3af-8422-4fca-ae87-ee1888af4cce</guid><dc:creator>Eric YY</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried the nRF Uart, still no luck... Seems the only work-around is close() then open() again...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52232?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 11:12:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db0a2e4d-37dd-4365-9390-e08b1bae3d0b</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;I can see that the log file is having duplicate entries, it&amp;#39;s not a good sign though it&amp;#39;s not necessarily a problem. I&amp;#39;m not sure why reset is not working, another approach would be to use Close()/Open(), though that requires running PerformPipeSetup() and Run() again. You could also try to use a different example project, nRF Uart is the most recent project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52230?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 08:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a761577-454d-4358-aa71-adb425063fd9</guid><dc:creator>Eric YY</dc:creator><description>&lt;h2&gt;Seems Reset() doesn&amp;#39;t work, I amended the program to:&lt;/h2&gt;
&lt;p&gt;Public Sub startDeviceDiscovery()
Dim scanPara As BtScanParameters = New BtScanParameters
scanPara.ScanType = BtScanType.ActiveScanning&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;If Not g.masterEmulator.IsDeviceDiscoveryOngoing Then
    If Not g.masterEmulator.StartDeviceDiscovery(scanPara) Then
        g.masterEmulator.Reset()
        g.isBusy = False
        MainForm.updateUI()
        Exit Sub
    End If
End If

g.isBusy = False
MainForm.updateUI()
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;End Sub&lt;/h2&gt;
&lt;p&gt;But it still failed after Reset(). You can have a look on the log.txt at: &lt;a href="https://www.dropbox.com/s/x7dj77tpwepwgsk/log.txt?dl=0"&gt;www.dropbox.com/.../log.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52231?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 07:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:795d9b55-6f7f-40af-9e10-b7d24bd0e850</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;It might be that MasterEmulator IsConnected state is not updated properly (by MasterEmulator itself) after a connection establishment has failed, and consequently the code that sets IsDeviceDiscoveryOngoing is unreachable. A log file (%ProgramData%/Nordic Semiconductor/MasterEmulator/log.txt) would be helpful.&lt;br /&gt;
As for workaround you could call Reset()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52229?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 01:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62946516-856f-45b2-a0b9-6a6388a3746c</guid><dc:creator>Eric YY</dc:creator><description>&lt;p&gt;Well, the IsDeviceDiscoveryOngoing is one of the property reported by the masterEmulator library... I expect it to be correctly set to false after the connection failed... Should I need to do something?&lt;/p&gt;
&lt;p&gt;BTW, seems this is a ReadOnly prperty, there&amp;#39;s no way I can set it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Master Emulator go crazy after a connect fail</title><link>https://devzone.nordicsemi.com/thread/52228?ContentTypeID=1</link><pubDate>Thu, 05 May 2016 19:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b50e0f-74eb-40ad-a4ee-9321498f4329</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;Could it be that the IsDeviceDiacoveryOngoing is out of sync, meaning it has not been correctly set to false when a connection establishment has failed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>