I do a lot of screwing around with microcontrollers which has me connecting random serial devices very regularly. Windows being Windows, this means I'm constantly trying to figure out which COM port was just created and then trying to create another new session with the right port/speed/etc combination to talk to it.
I'm looking to create a dynamic folder which will contain terminal sessions for local serial devices. I've knocked together this quick PowerShell script as a starting point:
"Baud" and "BaudRate" don't appear to work. I'd like to set the speed, parity, data bits, stop bits, etc from this script.
Digging through the RoyalJSON documentation, I find no reference to how one might set the various Advanced Properties of a SerialPort object. Is that property exposed to this functionality?
If I might add a feature request to this post - it would be super helpful if an "export to JSON" option was available for existing connections. Then one could setup a connection manually, export it, and use that as a guide for scripting out dynamic connections.
Best Answer
A
Allen Derusha
said
over 5 years ago
Between posting that question and having it approved I found the answer and finished the script.
Details
I've submitted this RTS Dynamic Folder to the RTS toolbox repo which will create a set of connections for all available serial ports with various (configurable) speed and framing options. On my system the result looks like this:
Here's the documentation for this simple PowerShell script:
Attached Serial Devices Dynamic Folder
This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing.
The resulting folder structure will look something like the following:
This solution only works under Windows due to its use of WMI to identify available COM ports.
Custom Properties
Port Speeds
This field must contain comma-separated list of serial port speeds in numeric format.
Example 1: 9600
Example 2: 9600,19200,115200
Frame Settings
This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
Between posting that question and having it approved I found the answer and finished the script.
Details
I've submitted this RTS Dynamic Folder to the RTS toolbox repo which will create a set of connections for all available serial ports with various (configurable) speed and framing options. On my system the result looks like this:
Here's the documentation for this simple PowerShell script:
Attached Serial Devices Dynamic Folder
This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing.
The resulting folder structure will look something like the following:
This solution only works under Windows due to its use of WMI to identify available COM ports.
Custom Properties
Port Speeds
This field must contain comma-separated list of serial port speeds in numeric format.
Example 1: 9600
Example 2: 9600,19200,115200
Frame Settings
This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
Example 1: "8N1"
Example 2: "8N1","7E1"
Stefan Koell
said
over 5 years ago
Glad you figured it out - and thanks for sharing your solution!
Allen Derusha
I do a lot of screwing around with microcontrollers which has me connecting random serial devices very regularly. Windows being Windows, this means I'm constantly trying to figure out which COM port was just created and then trying to create another new session with the right port/speed/etc combination to talk to it.
This get tedious pretty quickly.
I'm looking to create a dynamic folder which will contain terminal sessions for local serial devices. I've knocked together this quick PowerShell script as a starting point:
"Baud" and "BaudRate" don't appear to work. I'd like to set the speed, parity, data bits, stop bits, etc from this script.
Digging through the RoyalJSON documentation, I find no reference to how one might set the various Advanced Properties of a SerialPort object. Is that property exposed to this functionality?
If I might add a feature request to this post - it would be super helpful if an "export to JSON" option was available for existing connections. Then one could setup a connection manually, export it, and use that as a guide for scripting out dynamic connections.
Between posting that question and having it approved I found the answer and finished the script.
Details
I've submitted this RTS Dynamic Folder to the RTS toolbox repo which will create a set of connections for all available serial ports with various (configurable) speed and framing options. On my system the result looks like this:
Here's the documentation for this simple PowerShell script:
Attached Serial Devices Dynamic Folder
This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing.
The resulting folder structure will look something like the following:
Requirements
This solution only works under Windows due to its use of WMI to identify available COM ports.
Custom Properties
Port Speeds
This field must contain comma-separated list of serial port speeds in numeric format.
Example 1: 9600
Example 2: 9600,19200,115200
Frame Settings
This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
Example 1: "8N1"
Example 2: "8N1","7E1"
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstAllen Derusha
Between posting that question and having it approved I found the answer and finished the script.
Details
I've submitted this RTS Dynamic Folder to the RTS toolbox repo which will create a set of connections for all available serial ports with various (configurable) speed and framing options. On my system the result looks like this:
Here's the documentation for this simple PowerShell script:
Attached Serial Devices Dynamic Folder
This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing.
The resulting folder structure will look something like the following:
Requirements
This solution only works under Windows due to its use of WMI to identify available COM ports.
Custom Properties
Port Speeds
This field must contain comma-separated list of serial port speeds in numeric format.
Example 1: 9600
Example 2: 9600,19200,115200
Frame Settings
This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
Example 1: "8N1"
Example 2: "8N1","7E1"
Stefan Koell
Glad you figured it out - and thanks for sharing your solution!
-
What happened to the forum?
-
About this Forum
-
Security Information
-
Supported Secure Gateway (SSH) ciphers
-
Why is no remote file browser in SCP available?
-
What encryption is used in the rtsz files when enabled?
-
Royal TS V4 License File
-
How to resolve RDP resolution issues in Windows 7 with high resolution screen
-
Auto Fill in web page connection
-
How to reference custom properties in tasks and templates?
See all 275 topics