Hi All,
I have always had the problem of figuring out which COM port number is assigned to which USB-RS232 adapter.
Now this has bugged me for a number of years until a friend of my son stated, "yeah no problem. Use PowerShell", in Windows OS.
Anyway, he started me off, and in the end I have resolved the mission, yes I did choose to accept it!
To get into PowerShell, in the Command Line type "powershell".
Takes a while to show up, but you'll see the standard prompt with PS in-front of it. Then enter "gwmi Win32_PnPEntity -Filter "PNPCLASS='PORTS'" | select name" (everything between the outer "). Keep all the spaces EXACTLY as they are shown.
You should now have a table of Comm Ports (and an LPT port (at least on my PC without a LPT being available?)).
Realistically, no-one wants to have to remember that line just to get the Comm Port numbers. It's about the same time as going into Device Manager and finding out from there!
So what to do??
Search on-line and download a program called PowerGUI. With this, the PowerShell script can be made into an EXE file. Can't remember how I did that, but if I can do it, you can too.
This can then be saved in a convenient folder, make a shortcut to the desktop. I found the first time was problematic with my AntiVirus, but after that had no issues.
This has been tested to work in Win10.
I hope this helps someone out there in PICAXE land.
I have always had the problem of figuring out which COM port number is assigned to which USB-RS232 adapter.
Now this has bugged me for a number of years until a friend of my son stated, "yeah no problem. Use PowerShell", in Windows OS.
Anyway, he started me off, and in the end I have resolved the mission, yes I did choose to accept it!
To get into PowerShell, in the Command Line type "powershell".
Takes a while to show up, but you'll see the standard prompt with PS in-front of it. Then enter "gwmi Win32_PnPEntity -Filter "PNPCLASS='PORTS'" | select name" (everything between the outer "). Keep all the spaces EXACTLY as they are shown.
You should now have a table of Comm Ports (and an LPT port (at least on my PC without a LPT being available?)).
Realistically, no-one wants to have to remember that line just to get the Comm Port numbers. It's about the same time as going into Device Manager and finding out from there!
So what to do??
Search on-line and download a program called PowerGUI. With this, the PowerShell script can be made into an EXE file. Can't remember how I did that, but if I can do it, you can too.
This can then be saved in a convenient folder, make a shortcut to the desktop. I found the first time was problematic with my AntiVirus, but after that had no issues.
This has been tested to work in Win10.
I hope this helps someone out there in PICAXE land.