On 23 August 2016 at 21:08, Tormod Volden <lists.tor...@gmail.com> wrote: > On Tue, Aug 23, 2016 at 3:05 PM, Jay Aurabind wrote: >> >> I just managed to get it working. Simply added an exception for the >> try block for ValueError: continue >> >> Is this an acceptable solution generally? Is there a point in asking >> pyOCD to take it ? > > I would try to filter on vid/pid first. Are there many different > vid/pids possible, but they all have "CMSIS-DAP" in the product > string? >
I'm not sure if that can be generalized. The actual name it shows is "DAPLink CMSIS-DAP". Unless the debug adapter is running the DAPLink firmware[1], which is an open source project[2], this name can could be anything else. The device I am connecting to, is a baseboard for Hexiwear which has an OpenSDA debug port, which happens to have support for running DAPLink firmware. [1]:https://developer.mbed.org/handbook/DAPLink [2]:https://github.com/mbedmicro/DAPLink > IMO manually filtering through the product string is a bad idea, but > if it cannot be avoided, yes, you should an exception for devices > where you can't retrieve the product string. > Looks like that is quickest hack to get it fixed until pyOCD devs figure out a proper way to do it. I'm gonna add these 3 lines right after 88 and request them to take it: except ValueError: if board.idVendor is 0xd28 and board.idProduct is 0x204: continue > Try for instance "lsusb -v" versus "sudo lsusb -v" - a normal user > will often not see the product strings listed, whereas the superuser > does. > > Regards, > Tormod > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users -- Thanks and Regards, Aurabindo J ------------------------------------------------------------------------------ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users