I am trying to extract 'Bus reported device description' and 'Bus Relations' informations for Universal Serial Bus Controllers in Matlab.
I can't find it in the registry and I don't know exactly how to use setupapi.dll function in Matlab to get the informations.
I want to do this because I have a plurality of Arduino Nano devices and all of them have different COMs. I also use other USB Serial Devices under Matlab and for all of them I must create different serial objects, with different COM port names.
I want to create a Matlab function which will return what devices are connected on USB ports and what COM port they use .
I hope someone can help me with some ideas or code examples.
Thanks in advance!
This is a very late answer, but I also run into this problem and I have found a solution to find the "Bus reported device description" after searching on the Internet. I do not need "Bus Relations" in my case but I guess it may be retrieved in a similar way. I am using Windows 10 21H1 and MATLAB R2021a.
In short, my solution has 4 steps:
Code:
This solution works but may not be clean. I am not a Windows expert anyway. Suggestions are highly appreciated.