<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you explain this a bit more? Should we not prefer the deviceLabel IF<br>
we can get it?<br></blockquote><div><br></div><div>When I created that patch I thought that it would be better to use only </div><div>the device address to identify if the device is already in the list. This is</div><div>due the fact that currently the pattern of the deviceLabel is</div><div><b>$deviceName ($deviceAddress) $pairingStatus </b>. There are moments</div><div>when the device name is missing and moments when the pairing status is</div><div>different.</div><div>Now if I think more clearer if we don't update the devices state it would lead</div><div>to some inconsistent states. </div><div><br></div><div>Probably it would be a better idea to clear the list with the discovered devices </div><div>when a new device lookup is initiated. In this way we will show only the devices</div><div>that are in range during the last scanning.  </div><div> </div><div>If you agree with this I can send you another patch. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
b) did you write all this from scratch or was this inspired by some<br>
existing BT code for Windows from some other project? This is a<br>
non-trivial chunk of code in an area I'm not very familiar with...<br>
(and just to avoid email communication issues - no, I'm not doubting that<br>
you wrote this code... I just want to make sure that if there is a source<br>
we should credit that we do).<br></blockquote><div><br></div><div>The code is written from scratch but I used two sources of inspiration:</div><div>- for the implementation of our custom serial callbacks I looked over the</div><div>Native bluetooth communication sample created by Jef</div><div>- for the device lookup I looked over a sample[1] provided by Microsoft Corporation</div><div>to demonstrate how to use Winsock 2.2 Api and RFCOMM protocol</div><div><br></div><div>I didn't know where I should mention them :) . While Jef is probably already</div><div>mentioned for his help I am not sure if Microsoft should be mentioned when </div><div>you get inspiration from one of their samples. </div><div><br></div><div>Also you should know that our custom serial implementation is based on the</div><div>native serial implementation provided by Jef (the design). I thought that it is</div><div>obvious but I just wanted to be clear :). </div><div><br></div><div>Claudiu</div><div><br></div><div>[1] - <a href="https://code.msdn.microsoft.com/windowsdesktop/Bluetooth-Connection-e3263296">https://code.msdn.microsoft.com/windowsdesktop/Bluetooth-Connection-e3263296</a></div><div> </div></div><br></div></div>