Skip to content

selfup/icom-cmd

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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 πŸŽ‰

icom-cmd-example-script-env

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

  1. RealTerm
  2. com0com

Please read the CODE_OF_CONDUCT.md file πŸ™

I use VSCode with two extensions for this project:

  1. Powershell
  2. Editorconfig

Please fork the project and make a Pull Request (PR) to contribute!

Reading Materials

  1. HEX to BIN table
  2. CI-V Reference Manual
  3. ICOM IC-7610 Reference Manual
  4. Old CT-17 Reference Manual with BASIC code blocks
  5. Decimal Array to Binary $port.Write/3
  6. System.IO.Ports.SerialPort.Write .NET API

CI-V Manual Message Format Snippet

basic-message-format-icom

About

ICOM Powershell Serialport Command Sender - Sends binary/hex over USB

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published