compuphase/Black-Magic-Probe-Book

bmscan fails if multiple BMPs have been connected

sidprice opened this issue · 4 comments

I have more than one BMP, plus my own ctxLink probe which is based upon BMP.

The find_bmp method appears to only search for "interface" "0", here is a snapshot of the registry on my PC.

BMP_Reg_1

Sorry, I misunderstood the "interface", I need to dig deeper to find why the BMP is not being found.

I believe the issue is that the code is assuming there is only a single entry under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_1D50&PID_6018&MI_00", when in fact on my system, because I have multiple BMPs and ctxLinks that have been attached I have five devices. The first device entry tested is not the one currently connected and so the find fails.

I think I have fixed this issue with this PR.

Only able to test using Windows.

Commit d228b6c fixes this issue (tested under Microsoft Windows and Linux).