ICOM Powershell Serialport Command Sender
Was built for ICOM radio but can be used for anything that accepts Hex Codes/Binary over Serial Port π
Example of the script sending numbers over a serialport π
Known compatible targets
- ICOM IC-7610
- Anything over Serial Port (Arduino/etc...)
Usage
Clicking 'Run with Powershell' in the File Explorer
You will get a prompt for the mandatory arguments.
Once filled in, the script will run.
Since the shell dissapears running it this way, don't expect to catch the response from the serial device!
Default ReadLine with just two arguments:
.\icmd.ps1 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
Waiting for device to respond...
---
FEFEFD
---
Port Closed
Force a timeout instead of reading response:
.\icmd.ps1 COM4 'FE FE 94 E0 26 00 05 00 01 FD' -timeout 1000
Forcing a timeout!
Port Closed
OR
.\icmd.ps1 -timeout 1000 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
Forcing a timeout!
Port Closed
Chaining calls
You can write a powershell script that just calls this one!
The icmdchain.ps1
has the template π
# no response
.\icmd.ps1 -timeout 1000 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
# read response
.\icmd.ps1 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
# no response
.\icmd.ps1 -timeout 1000 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
# read response
.\icmd.ps1 COM4 'FE FE 94 E0 26 00 05 00 01 FD'
Development
Please read the CODE_OF_CONDUCT.md
file π
I use VSCode with two extensions for this project:
Please fork the project and make a Pull Request (PR) to contribute!
Reading Materials
- HEX to BIN table
- CI-V Reference Manual
- ICOM IC-7610 Reference Manual
- Old CT-17 Reference Manual with BASIC code blocks
- Decimal Array to Binary
$port.Write/3
- System.IO.Ports.SerialPort.Write .NET API
CI-V Manual Message Format Snippet