Hi,
I'm looking to use Hamlib as part of an Automated Test Equipment controller program, written in AutoIT, running on Windows 10/11.
I'm planning to control the radio under test, setting frequencies and modes, using a Command window running RigCtl.exe, interrogated by my program. I can manually operate the radio using RigCtl.exe in such a window.
My program can 'type' the required commands to RigCtl.exe. When querying the radio, however, AutoIT has no definitive detection of when RigCtl.exe has completed its response. At present, I'm using a timer, which is a risky solution.
That's the background. My question is about the RigCtl.exe response. Is it the case that the response string is always terminated in CR/LF? Can there be several CR/LF in one response (as in formatted lists)? Is there a way of detecting that RigCtl.exe is ready for the next command, as in a prompt, for example?
Or even more basic, is there a better way of integrating HamLib into my program?
Any ideas welcomed.
Thanks
John G0GCD
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm looking to use Hamlib as part of an Automated Test Equipment controller program, written in AutoIT, running on Windows 10/11.
I'm planning to control the radio under test, setting frequencies and modes, using a Command window running RigCtl.exe, interrogated by my program. I can manually operate the radio using RigCtl.exe in such a window.
My program can 'type' the required commands to RigCtl.exe. When querying the radio, however, AutoIT has no definitive detection of when RigCtl.exe has completed its response. At present, I'm using a timer, which is a risky solution.
That's the background. My question is about the RigCtl.exe response. Is it the case that the response string is always terminated in CR/LF? Can there be several CR/LF in one response (as in formatted lists)? Is there a way of detecting that RigCtl.exe is ready for the next command, as in a prompt, for example?
Or even more basic, is there a better way of integrating HamLib into my program?
Any ideas welcomed.
Thanks
John G0GCD
Thanks for the quick response, Mike.
Currently RigCtl.exe with a form of pipe - AutoIT actually manipulates an open window, even if that's hidden from the user. I open a window and 'execute' RigCtl.exe in interactive mode, reading the screen text for its responses.
However, with typical G0GCD skill, the moment I posted the question, I found this tidbit:
*Entering interactive mode allows successive commands to be entered without exiting rigctl. Recent additions to rigctl allow command editing and history recall through use of the Readline library.
Interactive mode is indicated by the spartan prompt:
Rig command:
.. which I think will give me the hook that I seek. I've no idea how I missed that, either in the docs or whilst actually using RigCtl.exe.
I'll take a look at the documentation for RigCtlD.exe to see if that is easier.
Thanks for the steer,
John G0GCD
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm looking to use Hamlib as part of an Automated Test Equipment controller program, written in AutoIT, running on Windows 10/11.
I'm planning to control the radio under test, setting frequencies and modes, using a Command window running RigCtl.exe, interrogated by my program. I can manually operate the radio using RigCtl.exe in such a window.
My program can 'type' the required commands to RigCtl.exe. When querying the radio, however, AutoIT has no definitive detection of when RigCtl.exe has completed its response. At present, I'm using a timer, which is a risky solution.
That's the background. My question is about the RigCtl.exe response. Is it the case that the response string is always terminated in CR/LF? Can there be several CR/LF in one response (as in formatted lists)? Is there a way of detecting that RigCtl.exe is ready for the next command, as in a prompt, for example?
Or even more basic, is there a better way of integrating HamLib into my program?
Any ideas welcomed.
Thanks
John G0GCD
I take it you are using rigctld? Or are you using a pipe to rigctl?
Most commands have a single response but there are exceptions....getting mode for example returns mode and bandwidth.
f
145000000
m
FM
15000
Setting things will return a "RPRT 0" if successful otherwise a non-zero error
F 14074000
RPRT 0
M USB -1
RPRT 0
Mike W9MDB
On Sunday, June 2, 2024 at 08:51:00 AM CDT, John Powers g0gcd@users.sourceforge.net wrote:
Hi,
I'm looking to use Hamlib as part of an Automated Test Equipment controller program, written in AutoIT, running on Windows 10/11.
I'm planning to control the radio under test, setting frequencies and modes, using a Command window running RigCtl.exe, interrogated by my program. I can manually operate the radio using RigCtl.exe in such a window.
My program can 'type' the required commands to RigCtl.exe. When querying the radio, however, AutoIT has no definitive detection of when RigCtl.exe has completed its response. At present, I'm using a timer, which is a risky solution.
That's the background. My question is about the RigCtl.exe response. Is it the case that the response string is always terminated in CR/LF? Can there be several CR/LF in one response (as in formatted lists)? Is there a way of detecting that RigCtl.exe is ready for the next command, as in a prompt, for example?
Or even more basic, is there a better way of integrating HamLib into my program?
Any ideas welcomed.
Thanks
John G0GCD
RigCtl.exe response terminator?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/25919/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thanks for the quick response, Mike.
Currently RigCtl.exe with a form of pipe - AutoIT actually manipulates an open window, even if that's hidden from the user. I open a window and 'execute' RigCtl.exe in interactive mode, reading the screen text for its responses.
However, with typical G0GCD skill, the moment I posted the question, I found this tidbit:
*Entering interactive mode allows successive commands to be entered without exiting rigctl. Recent additions to rigctl allow command editing and history recall through use of the Readline library.
Interactive mode is indicated by the spartan prompt:
Rig command:
.. which I think will give me the hook that I seek. I've no idea how I missed that, either in the docs or whilst actually using RigCtl.exe.
I'll take a look at the documentation for RigCtlD.exe to see if that is easier.
Thanks for the steer,
John G0GCD
Hmm,
RigCtlD.exe definitely a better solution. Thank you!
John G0GCD