Re: [Hamlib-developer] Python API
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Stephen P. <st...@bi...> - 2025-03-30 08:06:27
|
Hi Erik, Thanks for responding. My Python 3 app is starting rigctld effectively in the background using the subprocessPopen() mechanism. Then to retrieve parameters from the radio, it is running subprocess.Run() which effectively executes "rigctl -m 2 f" for example to get the VFO frequency by capturing the response, but firing off a windows EXE program every second is pretty awful. I assumed I could via the API I assumed was available, open a channel/pipe/whatever and effectively do what ever rigctl is doing internally. I've looked at the API references and web pages, but they seem convulsively C. I see tantalizing references to python bindings (I'm not sure what that means) and in the Debian world I see a python3-hamlib library, but of course I'm looking for a Windows solution. Am I looking for something that doesn't exist Erik? 73 Steve VK3SPX On 30/03/2025 18:32, Erik Icket wrote: > Hi Steve, > > One way to obtain a better segregation between your Python app and the rig, > is to go via the rigctld daemon. > Once the daemon runs (local or remote), you may open a socket to it and > issue your commands. > For example, to know the frequency, just issue a write to socket with "f\n" > contents. > > It is not a straight program to rig interface, as you are looking for. > However, it does not require to launch the rigctl app each time you issue a > command. > > g'day ! > Erik > ON4PB > > -----Original Message----- > From: Stephen Pattinson via Hamlib-developer > <ham...@li...> > Sent: Saturday, 29 March 2025 09:06 > To: ham...@li... > Subject: [Hamlib-developer] Python API > > Hi, > I have written a Python (3.12.3) to talk to my IC7300 via Hamlib > (V4.6.2) in a Windows 10 environment, but I'm just issuing "rigctl" > commands and capturing the response. This works fine, but it's rather crude. > Of course I would like to use the API which I believe is available, but I > cannot find how to download the necessary additional software or library, or > find the documentation for the Python API. > I have looked at > "https://hamlib.sourceforge.net/manuals/4.3/index.html", but this seems > exclusively C Ironically, the most pertinent info I retrieved from a search > is from the Google AI (Sigh!) which suggests I need "hamlib-python", but I > can't find where the AI has scooped up this information. > If anybody can point me at installation instructions and documentation for > the API, I would be grateful. > Thanks/73 > Steve VK3SPX > > > _______________________________________________ > Hamlib-developer mailing list > Ham...@li... > https://lists.sourceforge.net/lists/listinfo/hamlib-developer > |