compuphase / Black-Magic-Probe-Book

A guide plus associated utilities for the Black Magic Probe.
Apache License 2.0
147 stars 26 forks source link

bmscan fails if multiple BMPs have been connected #4

Closed sidprice closed 5 years ago

sidprice commented 5 years ago

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

sidprice commented 5 years ago

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

sidprice commented 5 years ago

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.

sidprice commented 5 years ago

I think I have fixed this issue with this PR.

Only able to test using Windows.

compuphase commented 5 years ago

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