开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Raspberry Pi, FLRig, rigctl problem


 

I have posted this on the Log4om forum but as of yet got no help, so am trying here now.
?
I have flrig installed on a raspberry pi running bookworm. Also installed is wsjtx. They work great together with flrig connected to my Yaesu ftdx3000 and sending receiving data to and from wsjtx.
I have log4om on a laptop running win 10, this receives logged contacts from wsjtx on the pi no problem. I can also setup wsjtx and mshv and sstv on my laptop and all will connect to flrig on the raspberry pi without a problem. BUT I cannot get any CAT control on log4om from flrig on the pi. I have read and tried all the posts on this forum....I think. I have been trying for 2 days.
The log seems to show that log4om is trying to make the connection with hamlib and the pi is refusing it as I guess hamlib is not running, Is flrig supposed to start it?

I am trying to start the connection on port 12345 which flrig is listening to but the log shows it just trying port 4532 which is the hamlib port.??



2024-09-02 15:07:32.1903 INFO: [dje_zPCBPMEHTH9SH9NH4H6TTR_ejd] : [CAT START] by CAT usercontrol
2024-09-02 15:07:32.1910 INFO: [dje_zP76V78FDQZAS4HFJ52QLF_ejd] : [HAMLIB] Starting Hamlib service
2024-09-02 15:07:32.1910 INFO: [dje_zP76V78FDQZAS4HFJ52QLF_ejd] : [HAMLIB] Using existing connection: False
2024-09-02 15:07:32.1920 INFO: [ProgramStorage] : [CAT STATUS CHANGED] Running: True
2024-09-02 15:07:32.3463 INFO: [dje_zNBCSQG5R_ejd] : [HAMLIB] DAEMON STARTED: C:\Users\gowze\AppData\Roaming\Log4OM2\hamlib\rigctld.exe --model=4 --rig-file=192.168.1.152:12345 -vvv -Z --vfo
2024-09-02 15:07:35.3687 ERROR: [HamlibEngine][dje_zPBPHTU87HY4EFV59739YSMY2L3WA_ejd] : [EXCEPTION] No connection could be made because the target machine actively refused it 192.168.1.152:4532 System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.152:4532
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at L4ONG.BL.CAT.HamlibEngine.dje_zPBPHTU87HY4EFV59739YSMY2L3WA_ejd()
2024-09-02 15:07:35.3697 INFO: [HamlibEngine] : [HAMLIB] Stop polling. Timeout True
2024-09-02 15:07:35.3707 INFO: [HamlibEngine] : [HAMLIB] Stopping Hamlib process...
2024-09-02 15:07:35.3707 INFO: [HamlibEngine] : [HAMLIB] Hamlib process stopped successfully
2024-09-02 15:07:35.3717 INFO: [ProgramStorage] : [CAT STATUS CHANGED] Running: False
2024-09-02 15:07:35.3747 INFO: [dje_zNBCSQG5R_ejd] : [HAMLIB] Hamlib Process exit code: -1
2024-09-02 15:07:35.3747 INFO: [dje_zNBCSQG5R_ejd] : [HAMLIB] DAEMON STOPPED. Hamlib instance terminated


 

On Thu, Sep 5, 2024 at 06:16 PM, GW0WZL wrote:
because the target machine actively refused it 192.168.1.152:4532
On the Pi check that port 4532 is open.? "Actively refused" may mean that the server (in this case, the pi) is not accepting inbound connections on the port.? You will also want to be sure, on the pi, that hamlib is listening to that port.??


 

开云体育

I have been looking at other problems, and this message always misleads me. I immediately think that it's been refused becaused of e.g. an authentication error. It's "acrtively" refused - to me that means that the server has analysed the request and decided to refuse it. Is this an American/British language issue?

73 Phil GM3ZZA


From: [email protected] <[email protected]> on behalf of Richard Jackson, KD8NOA <richard7298@...>
Sent: 11 September 2024 10:41 PM
To: [email protected] <[email protected]>
Subject: Re: [linuxham] Raspberry Pi, FLRig, rigctl problem
?
On Thu, Sep 5, 2024 at 06:16 PM, GW0WZL wrote:
because the target machine actively refused it 192.168.1.152:4532
On the Pi check that port 4532 is open.? "Actively refused" may mean that the server (in this case, the pi) is not accepting inbound connections on the port.? You will also want to be sure, on the pi, that hamlib is listening to that port.??


 

开云体育

Phil, John (GW0WZL),

it's not a left-right pondian issue. “Actively refused” means that the operating system (OS) has decided not to accept any connections on, in this case, port 4532. That will be because flrig on the Pi is listening on port 12345. No server is listening on port 4532, so there is nothing for a connection to be made to. When the request to connect to port 4532 is made from computer A (the Win 10 laptop in this case) the the OS at computer B (the Pi in this case) replies “request refused”. This is done so that computer A “knows” that there is no point in continuing the procedure, and thus computer A may safely and cleanly abort whatever was behind the connection request (in this case log4om trying to connect to flrig on the Pi.)

It is necessary for both machines to be using the same port number as a pre-condition, but not guarantee, of success. So what clues might these differing port numbers offer us?

The first clue is that Log4OM is trying to connect to Hamlib. Modern Hamlib development includes rigctld () which acts as a server for use by other programs. The default port for rigctld is 4532.

My understanding is that it is possible to run flrig and rigctld, and one configures rigctld to talk to flrig, so that ultimately flrig is the single program that directly talks to the radio. There is a very clear discussion of how at , by AD8JL. (That link wasn't easy to find, but is essential reading.)

Now a picture's worth a thousand words, so your configured system would look something like this, simplified slightly, to take the least complication approach:


The key point is that rigctld is configured to use flrig to control radios &c., rather than controlling any radio directly from itself. A possible point of confusion is that rigctld is configured by setting flrig as the type of radio that it talking to. Then, when required, Log4OM talks to rigctld, which in turn talks to flrig, which then talks directly to whatever radio is in use. flrig acts as the single point of contact with the radio.

Any necessary debugging of the operation of the connected radio (FT-3000 in your case) is limited to the link between flrig and the radio.

[There is a lot more to this, but that is not germane to your troubles.]

73, HTH,

Robin, G8DQX

P.S. Checking, the FT-3000 supports setting & reading the antenna state via CAT control. However, flrig does not appear to be designed to support a radio with switchable antennas.


On 11/09/2024 22:59, Philip Rose, GM3ZZA via groups.io wrote:

I have been looking at other problems, and this message always misleads me. I immediately think that it's been refused becaused of e.g. an authentication error. It's "acrtively" refused - to me that means that the server has analysed the request and decided to refuse it. Is this an American/British language issue?

73 Phil GM3ZZA


 

Thanks Robin,

So it's not the server app that's "actively refused" the request but the OS the app is running on. I'll bear that in mind when I next drill down into my remote operating.

Phil GM3ZZA



On 14 September 2024, at 01:51, G8DQX <list@...> wrote:


Phil, John (GW0WZL),

it's not a left-right pondian issue. “Actively refused” means that the operating system (OS) has decided not to accept any connections on, in this case, port 4532. That will be because flrig on the Pi is listening on port 12345. No server is listening on port 4532, so there is nothing for a connection to be made to. When the request to connect to port 4532 is made from computer A (the Win 10 laptop in this case) the the OS at computer B (the Pi in this case) replies “request refused”. This is done so that computer A “knows” that there is no point in continuing the procedure, and thus computer A may safely and cleanly abort whatever was behind the connection request (in this case log4om trying to connect to flrig on the Pi.)

It is necessary for both machines to be using the same port number as a pre-condition, but not guarantee, of success. So what clues might these differing port numbers offer us?

The first clue is that Log4OM is trying to connect to Hamlib. Modern Hamlib development includes rigctld () which acts as a server for use by other programs. The default port for rigctld is 4532.

My understanding is that it is possible to run flrig and rigctld, and one configures rigctld to talk to flrig, so that ultimately flrig is the single program that directly talks to the radio. There is a very clear discussion of how at , by AD8JL. (That link wasn't easy to find, but is essential reading.)

Now a picture's worth a thousand words, so your configured system would look something like this, simplified slightly, to take the least complication approach:


The key point is that rigctld is configured to use flrig to control radios &c., rather than controlling any radio directly from itself. A possible point of confusion is that rigctld is configured by setting flrig as the type of radio that it talking to. Then, when required, Log4OM talks to rigctld, which in turn talks to flrig, which then talks directly to whatever radio is in use. flrig acts as the single point of contact with the radio.

Any necessary debugging of the operation of the connected radio (FT-3000 in your case) is limited to the link between flrig and the radio.

[There is a lot more to this, but that is not germane to your troubles.]

73, HTH,

Robin, G8DQX

P.S. Checking, the FT-3000 supports setting & reading the antenna state via CAT control. However, flrig does not appear to be designed to support a radio with switchable antennas.


On 11/09/2024 22:59, Philip Rose, GM3ZZA via wrote:
I have been looking at other problems, and this message always misleads me. I immediately think that it's been refused becaused of e.g. an authentication error. It's "acrtively" refused - to me that means that the server has analysed the request and decided to refuse it. Is this an American/British language issue?

73 Phil GM3ZZA


 

开云体育

Phil,

if there's no server running that's listening on port XXXX, then the OS has nowhere to forward any connection request to. That triggers the “actively refused” response from the OS. Anthropomorphically, It's as if you've gone to some street address and asked to speak to someone who doesn't live there.

For security reasons, the reply is usually exactly the same whether the required server/d?mon is not installed, is not running, or the server/d?mon is running, but the request has been blocked for some reason.

73,

Robin, G8DQX

On 14/09/2024 10:29, Philip Rose, GM3ZZA via groups.io wrote:

Thanks Robin,

So it's not the server app that's "actively refused" the request but the OS the app is running on. I'll bear that in mind when I next drill down into my remote operating.

Phil GM3ZZA


 

开云体育

Robin/Phil

To show listening sockets (aka servers) on a Linux terminal;
sudo lsof -i -P -n | grep LISTEN
or
sudo netstat -tulpn | grep LISTEN
of course also possible to check a particular port

In Windows I found;
Start menu → All Programs → Accessories → System Tools → Resource Monitor
or run resmon.exe,
or from TaskManager → Performance tab.
and expand the Network | Listening Ports items list

This is where you would see rigctld's 4532 and flrig's 12345. There are of course methods that can block listening ports being accessed despite them being visible as above. Firewalls can do that, but not usually on the same host.

Cheers Bob VK2YQA



On 14/9/24 21:42, G8DQX wrote:

Phil,

if there's no server running that's listening on port XXXX, then the OS has nowhere to forward any connection request to. That triggers the “actively refused” response from the OS. Anthropomorphically, It's as if you've gone to some street address and asked to speak to someone who doesn't live there.

For security reasons, the reply is usually exactly the same whether the required server/d?mon is not installed, is not running, or the server/d?mon is running, but the request has been blocked for some reason.

73,

Robin, G8DQX

On 14/09/2024 10:29, Philip Rose, GM3ZZA via groups.io wrote:

Thanks Robin,

So it's not the server app that's "actively refused" the request but the OS the app is running on. I'll bear that in mind when I next drill down into my remote operating.

Phil GM3ZZA


 

On that note, often the portion of the OS responsible for directing the packets to the correct process doesn't and can't know the difference between those

On Sat, Sep 14, 2024, 7:42?AM G8DQX via <list=[email protected]> wrote:

Phil,

if there's no server running that's listening on port XXXX, then the OS has nowhere to forward any connection request to. That triggers the “actively refused” response from the OS. Anthropomorphically, It's as if you've gone to some street address and asked to speak to someone who doesn't live there.

For security reasons, the reply is usually exactly the same whether the required server/d?mon is not installed, is not running, or the server/d?mon is running, but the request has been blocked for some reason.

73,

Robin, G8DQX

On 14/09/2024 10:29, Philip Rose, GM3ZZA via wrote:

Thanks Robin,

So it's not the server app that's "actively refused" the request but the OS the app is running on. I'll bear that in mind when I next drill down into my remote operating.

Phil GM3ZZA


 

Thanks Robin,
Yes I got it working nicely with rigctld, but just thought it was messy doing it that way. As far as the antenna switching goes, using the additional commands settings, it does not change the anteenas when the correct commands are sent through flrig, not tested with hamlib yet, but read another post whee they work through hamlib on the ftdx3000. I will carry on trying different settings.
?


 

On Sat, Sep 14, 2024 at 06:01 AM, Bob Cameron, VK2YQA wrote:
Bob VK2YQA
Thanks for that info Bob, I have run the command and I get:
?
?sudo lsof -i -P -n | grep LISTEN
vncserver ? ?861 ? ? ? ? ?root ? 11u ?IPv6 ? 2981 ? ? ?0t0 ?TCP *:5900 (LISTEN)
vncserver ? ?861 ? ? ? ? ?root ? 12u ?IPv4 ? 2982 ? ? ?0t0 ?TCP *:5900 (LISTEN)
sshd ? ? ? ? 871 ? ? ? ? ?root ? ?3u ?IPv4 ? 8538 ? ? ?0t0 ?TCP *:22 (LISTEN)
sshd ? ? ? ? 871 ? ? ? ? ?root ? ?4u ?IPv6 ? 8540 ? ? ?0t0 ?TCP *:22 (LISTEN)
murmurd ? ? 1333 mumble-server ? 12u ?IPv6 ? 9590 ? ? ?0t0 ?TCP *:64738 (LISTEN)
flrig ? ? 186783 ? ? ? ?GW0WZL ? 11u ?IPv4 271398 ? ? ?0t0 ?TCP *:12345 (LISTEN)
cupsd ? ? 234401 ? ? ? ? ?root ? ?7u ?IPv6 337800 ? ? ?0t0 ?TCP [::1]:631 (LISTEN)
cupsd ? ? 234401 ? ? ? ? ?root ? ?8u ?IPv4 337801 ? ? ?0t0 ?TCP 127.0.0.1:631 (LISTEN)
?
From this I see that GWOWZL (my unix name) is owner?? of this port. Could this be the reason I cannot connect from another LAN IP address, does the user need adding to dial out group or something similar?
?
Thanks
John


 

I see I am already a userof the dialout group.
?
GW0WZL@ssd-WSJTX:~ $ getent group dialout
dialout:x:20:GW0WZL