Skip to main content
Explorer
December 3, 2020
Question

Detecting ST-Link V2-1 virtual COM port with C#?

  • December 3, 2020
  • 1 reply
  • 730 views

Hello,

I want to connect to the VCP of a Nucleoboard by a C# application. I don't want to iterate through all available COM ports on the system, so I'm searching a way to detect if one or more Nucleoboards are connected and connect to the corresponding VCPs. Has anyone already tried that and can give me some hints?

Regards

    This topic has been closed for replies.

    1 reply

    Graduate II
    December 3, 2020

    Well, you have to iterate through the registry. In bl*ckm*g*c does that to find the gdb port. BMP is on github https://github.com/blacksphere/ The iteration is in src/platforms/pc/serial_win.c

    Graduate II
    December 3, 2020

    +1

    Both COM port and USB assocativity can be fished out of the registry​ trees/nodes