First i am having issues getting CQRLog to see the flex. i do not have problems with any other logging program i have tried. wsjt-x works perfectly fine for it so i feed cqrlog with that. but i was wondering if anyone has a trick to getting the flex to work properly with cqrlog itself.
second i am having the dreaded issue of cqrlog disconnecting from my db and only finding out when i try log a contact in wsjt-x or when i try close the program.
even with the issues i do like the program.
PopOS 21.04
Flex 6400M
cqrlog 2.5.1
thank you for any help
Hi!
If you start rigctld with proper parameters for your rig from command console with additional -vvvvv parameter, something like:
rigctld -m 2036 -r /dev/yourserial_device -vvvvv
and then open another console, start
telnet 127.0.0.1 4532
Whan happens when you enter
fmv
to telnet connection?
You should get frequency, mode and vfo from Flex.
That is the way cqrlog pollls rigctld.
It is enough to get frequency and mode, vfo is not mandatory (most of old Icoms can not do that)
From rigctld console you may see some debug information wit -vvvvv. Are there any errors when fmv is issued?
Again I ask to read this https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/setting_rigctl...
You can not run wsjtx and cqrlog at same time if both are accessing same serial device.
If you have very latest Hamlib and use parameter "--vfo" with rigctld then you should upgrade cqrlog from GitHub source to get a version that works with latest rigctld.
There are some ideas. The testing with two consoles and telnet is the primary tool to resolve this.
I do use remote DB. Normally it is in same PC, but I have also used the replica of DB that is in my server in same LAN.
Both cases work fine.
Then I have used server database via ssh tunnel, and vpn tunnel using 3G and 4G mobile networks. Both works, but at the time of 3G usage the response times were sometimes quite long.
When cqrlog is closing it writes all log configuration information with window sizes and positions to database. How ever this should not be so big amount of data that it slows down closing (or even disables it) if network is working properly.
Have you tried to start cqrlog from console:
cqrlog --debug=1
and looked at the closing stage to get the latest debug lines before it stuck?
--
Saku
OH1KH
thank you for your reply.
the flex has two CAT lines that run on IP to and from the radio. one i am trying to set up to wsjt-x and its working perfectly fine(4533 for VFO-B0), the other that i try route to CQRLog (4532 VFO-A). On wsjt-x it runs off hamlib net rigctrl and the network server of 127.0.0.1:4533 designating the second VFO. I am using the actual IP connection VITA 49 lines not serial.
i get no errors from WSJT-x however with CQRLOG i get this;
6:55AM WRN Handler returned error error="required max 0 args, got 1" cmd=["f","mv"]
i will have more time to work on this tonight when i get home from work.
Hi!
Just another idea that is faster to test than compile cqrlog again.
See the device and port settings (ports are different!!) and "Run rigctrld when program starts" checked.
I assume your flex radio is SDR-1000. If not, or if you have older rigctld the rig number may be different.
Do not care about my "Path to rigctld" use the one that you have used, it is not mandatory to use same as me.
--
Saku
OH1KH
Hi!
Be aware that cqrlog may start rotctld and it uses 4533 port by default. So check preferences rotor control that the "Run rotctld at program start" is not checked.
Ok having those separate IP ports.
So all you need to set in TRXcontrol is rig #2 Net hamlib rigctld and be sure that "Run rigctld at program start" is NOT checked.
From that error message I think your Flex rigctld emulator at port 4532 does not accept combined commands.
It seems to want f(linefeed) m(linefeed) v(linefeed).
Simplest way to fix this is to change source code and compile.
With the very latest cqrlog source from GitHub locate line from file:
src/uRigControl.pas:538: cmd := '+f'+VfoStr+' +m'+VfoStr+' +v'+LineEnding;
Change both strings VfoStr to LineEnding and save file.
Then issue:
make
sudo make install
Start cqrlog and see what happens. It might work.
--
Saku
OH1KH
i am now getting the following errors afer changing the code as instructed
4:38PM WRN No handler found cmd=[" "]
4:38PM WRN No handler found cmd=["+"]
Please test the second suggestion I sent.
Without changes to source (The one that has TRXControl settings image)
Does it work?
--
Saku
OH1KH
when i change the setting after put the program back to normal. i get this
WRN No handler found cmd=["I"]
its from the terminal running the CAT program
Ok!
It seems to be that I do not know how Flex radio is working.
You have some kind of cat program there,eh ?
Is it the one that produces TCP ports localhost:4532 and :4533 ?
If so, when that cat program is running and you do not start rigctld or cqlog at all and telnet to localhost:4532 can you type in commands that are similar as rigctld has?
I.E lower case f gives frequency, uppercase F 3500000 set frequency to 3,5Mhz and so on
Or has the radio just "some kind of" TCP connection with its own protocol and you have to start rigctld to translate rig format commands to Hamlib commands?
--
Saku
OH1KH
here is a link to the github page where i found the program that works with wsjt-x perfectly fine.
https://github.com/kc2g-flex-tools/nCAT
i am not sure if its a tcp or udp connection over IP
i assume that its some sort of a standard becuase on other programs like wsjt-x all i have to do is select Hamlib NET rigctl for the rig and use 127.0.0.1:4533 designating the second VFO, (each vfo has its own port.) all other setting are default in wsjt-x. i did have to change the default rot port to prevent errors on the 4533 port in cqrlog but i dont use rot control anyway.
Hi k0qei,
reading your initial post it seemed like you were accessing the Slice B on your Flex-6400M from linux using only the Hamlib tools that comes with wsjtx. It was intriguing as I with my Flex-6300 have only managed to do this from linux using the nCAT program that you refered to in your last post.
On flex radio community board there are several postings related to the use of nCAT https://community.flexradio.com/discussion/comment/20587753#Comment_2058...
Can you please elaborate; do you access your Flex-6400M from wsjtx without using nCAT?
73 de LB2EG Richard
so i open mulitple terminals to run the program twice one for each vfo
user@pop-os:~$ /home/user/Downloads//nCAT-linux-amd64 -station Maestro -slice A -listen :4532
1:15PM INF Waiting for station station=Maestro
1:15PM INF Found client client_id=0x4FE492DB uuid=F4859FBE-9D29-4DAA-8DA3-4C6C6C7C1901
1:15PM INF Looking for slice slice_id=A
1:15PM INF Found slice slice_idx=0
and
user@pop-os:~$ /home/user/Downloads/nCAT-linux-amd64 -station Maestro -slice B -listen :4533
1:17PM INF Waiting for station station=Maestro
1:17PM INF Found client client_id=0x4FE492DB uuid=F4859FBE-9D29-4DAA-8DA3-4C6C6C7C1901
1:17PM INF Looking for slice slice_id=B
1:17PM INF Found slice slice_idx=
and the telnet does give me proper read outs
user@pop-os:~$ telnet 127.0.0.1 4532
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
f
14300000
user@pop-os:~$ telnet 127.0.0.1 4533
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
f
14074000
i connect wsjt-x with the 4533 port and comes up everytime
just to try something i did this
user@pop-os:~$ telnet 127.0.0.1 4532
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
f
14300000
m
USB
2400
v
VFOA
fmv
ERR
Hi !
----------
user@pop-os:~$ telnet 127.0.0.1 4532
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
f
14300000
m
USB
2400
v
VFOA
fmv <----------------------------- That is just the problem. rigctld commands can not be combined with Flex
ERR <-----------------------------
---------------------
If you have "ncat" (also called "nc") installed you can test what happens when you send +f +m +v separated with carriage return and linefeed copying the line below:
[saku@hamtpad ~]$ echo -ne "+f\x0D\x0A+m\x0D\x0A+v\x0D\x0A" | ncat 127.0.0.1 4532
get_freq:
Frequency: 144174000
RPRT 0
get_mode:
Mode: USB
Passband: 2400
RPRT 0
get_vfo:
RPRT -11
[saku@hamtpad ~]$
If that works, lets try this again with little bit different way:
With the very latest cqrlog source from GitHub locate line from file:
src/uRigControl.pas:538: (use cut and paste to replace source with following line)
cmd := '+f'+#13+#10+'+m'+#13+#10+'+v'+#13+#10;
That should make "cmd" contents to have:
+f (carriage return)(linefeed)
+m (carriage return)(linefeed)
+v (carriage return)(linefeed)
What is the "windows way" to send lines.
Then issue:
make
sudo make install
When running cqrlog check preferences/TRXControl that "use \chkvfo" is NOT checked.(that should force cqrlog to use the line you just edited)
---------------------------------------------------------------------------------------------------------
The original source:
---------------------------------------------------------------------------------------------------------
begin
if not ParmVfoChkd then
cmd := '\chk_vfo'+LineEnding
else
if ParmHasVfo=2 then
cmd := '+f'+VfoStr+' +m'+VfoStr+' +v'+VfoStr+LineEnding //chk this with rigctld v3.1
else
cmd := '+f'+VfoStr+' +m'+VfoStr+' +v'+LineEnding;
if DebugMode then
Writeln('Poll Sending: '+cmd);
rcvdFreqMode.SendMessage(cmd)
end;
---------------------------------------------------------------------------------------------------------
Should look like this after editing:
---------------------------------------------------------------------------------------------------------
begin
if not ParmVfoChkd then
cmd := '\chk_vfo'+LineEnding
else
if ParmHasVfo=2 then
cmd := '+f'+VfoStr+' +m'+VfoStr+' +v'+VfoStr+LineEnding //chk this with rigctld v3.1
else
cmd := '+f'+#13+#10+'+m'+#13+#10+'+v'+#13+#10;
if DebugMode then
Writeln('Poll Sending: '+cmd);
rcvdFreqMode.SendMessage(cmd)
end;
---------------------------------------------------------------------------------------------------------
When you check preferences/TRXControl "Show communication with TRX in console" and start cqrlog in command console (without --debug=1) you should see only the rig communication debug lines.
(this is with original source from my ic7300 that can not tell the VFO used and causes RPTR -11, but works)
Poll Sending: +f +m +v
Msg from rig: GET_FREQ: NONE
FREQUENCY: 7074000
RPRT 0
Msg from rig: GET_VFO: CURRVFO
RPRT -11
Poll Sending: +f +m +v
and so on...
The "Poll sending" line will look different after you have done source modification.
I am glad to see that Richard, LB2EG, has better knowledge about Flex and is willing to help you.
I hope we can find solution for this together.
Once Flex works we can look after SQL problem.
--
Saku
OH1KH
i still get errors but its a different error, i do think you are on to something and that its writen in the windows way since the primary OS to control one is on windows.
user@pop-os:~$ /home/user/Downloads//nCAT-linux-amd64 -station Maestro -slice A -listen :4532
6:34AM INF Waiting for station station=Maestro
6:34AM INF Found client client_id=0x77FC9A6B uuid=F4859FBE-9D29-4DAA-8DA3-4C6C6C7C1901
6:34AM INF Looking for slice slice_id=A
6:34AM INF Found slice slice_idx=0
6:35AM WRN No handler found cmd=["+"]
user@pop-os:~$ telnet 127.0.0.1 4532
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
+f +m +v
RPRT 1
i am not a coding person if i am doing something wrong please inform me on how to do the command properly
user@pop-os:~$ telnet 127.0.0.1 4532
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
get_mode
RPRT 1
get_mode
RPRT 1
get_vfo
RPRT 1
HI !
It is bit hard to try to fix the problem because I do not know Flex radio, or have one to test with.
But let me tell how cqrlog uses the rigctld.
Just some months ago I have rewritten the rig control patrt of cqrlog because latest hamlib, specially with wsjtx, needs starting parameter "--vfo"
This changes the one letter commands that cqrlog uses via telnet (tcp) connection to rigctld.
At that time I added also plus "+" signs to commands. That is because it makes decoding of answers from rigctld lot more easier.
Now I am not sure what version of cqrlog you are using.
The older ones (installed from package) will poll rig with "fmv" while the latest source compiled software requires the plus sign "+f+m+v"
Now the first thing to do is to clear out The Flex end.
If it has some kind of CAT program that emulates rigctld directly at localhost:4532 we have to find out what commands it accepts.
It has been shown that "fmv" causes ERR, but f, m and v as single letters seem to work when testing with telnet console connection.
Now what happens if you give "+f+m+v", I think it fails as "fmv" does also so.
But if you give "+f" or "+ḿ" or "+v" each one alone in telnet console. Does Flex CAT program accept the "+" sign in front of letter?
And if it accepts it should give differently formatted reply.
You can see properly formatted answers, and the difference "+" sign does, by stopping all Flex ealted programs. Then opening two command console windows.
To first one you type:
rigctld -m1
and press enter. Nothing happens and the prompt will not return.
Then go to second console and start telnet and give f and +f as single lines:
[saku@hamtpad ~]$ telnet localhost 4532
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
f
145000000
+f
get_freq:
Frequency: 145000000
RPRT 0
Give Q to close telnet and close rigctld in the 1st console with Ctlr+C
Now start Flex cat program. I assume it emulates rigctld.
telnet again to localhost 4532 and repeat "f" and "+f" commands.
Compare results to ones you did get from two console test.
I think "f" works but "+f" might fail. It will be a problem because latest cqrlog need the reply format "+" gives.
Perhaps there is a workaround. This is based now to my "feeling" that Flex cat program emulates rigctld. But I do not know is it so.
When Flex cat is running and it works at localhost:4532 we could try to cascade control with one extra rigctld. That is what I tred to explain in my message that has the preferences picture.
When flex cat is running at 127.0.0.1:4532 open two consoles.
On 1st console type
rigctld -m2 -r127.0.0.1:4532 -t14532
Note that "-t" parameter has five digits 1 4 5 3 2 and "-r" parameter port has four digits 4 5 3 2
On second console start
telnet localhost 14532
Note the port has five digits 1 4 5 3 2
Now telnet calls rigctld and then rigctld calls Flex cat program.
Try to give "f" command and "+f" command do both work now or not?
--
Saku
OH1KH
in a pop up window i get this.
TMySQL57Connection : Error executing query: MySQL server has gone away.
Press OK to ignore and risk data corruption.
Press Abort to kill the program.
here is the debug log from terminal.
Closing rigs...
1
1a
2
3
4
5
6
Section:frmNewQSO
Saving window size a position (frmNewQSO) (height|width|top|left):709|997|866|36
select count(*) from cqrlog001.cqrlog_config
Saving ini file to database
select count(*) from cqrlog001.cqrlog_config
Saving ini file to database
1
2
3
4
5
6
Closing DXCluster window
Closing TRXControl window
Closing GrayLine window
Closing dDXCC
[FORMS.PP] ExceptionOccurred
Killed
jim@pop-os:~$
Hi !
I can perhaps offer again another solution.
Do you have program flrig ? ( http://www.w1hkj.com )
Flrig seems to support at least FLEX1500 rig. Could it work wit your Flex?
If it works you can start Flrig check that it works and then set up cqrlog and wsjtx following way:
Settings are very minimal for both programs. And it works.
--
Saku
OH1KH
user@pop-os:~$ echo -ne "+f\x0D\x0A+m\x0D\x0A+v\x0D\x0A" |/home/user/Downloads//nCAT-linux-amd64 -station Maestro -slice A -listen :4532 127.0.0.1 4532
1:14PM INF Waiting for station station=Maestro
1:14PM INF Found client client_id=0x77FC9A6B uuid=F4859FBE-9D29-4DAA-8DA3-4C6C6C7C1901
1:14PM INF Looking for slice slice_id=A
1:14PM INF Found slice slice_idx=0
user@pop-os:~$ get_freq
get_freq: command not found
cqrlog v 2.5.2
+f+m+v
RPRT 1
i get this in the cat terinal
1:21PM WRN No handler found cmd=["+"]
+f+m+v
gives me
1:23PM WRN No handler found cmd=["+"]
i just tried
+f+m+v
get_freq:
Frequency: 14300000
RPRT 0
get_mode:
Mode: USB
Passband: 2400
RPRT 0
get_vfo:
VFO: VFOA
RPRT 0
telnet localhost 14532
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
f
14300000
+f
get_freq:
Frequency: 14300000
RPRT 0
my setting Radio to flexRadio 6xxx
host to 127.0.0.1
device to 127.0.0.1:4532
poll rate to 1000
port to 14532
frequenccy and mode show up properly in CQRLog i have to run rigctld -m2 -r127.0.0.1:4532 -t14532 in another terminal
I have now check that I understood ok:
These are your cqrlog TRXControl settings
my setting Radio to flexRadio 6xxx
host to 127.0.0.1
device to 127.0.0.1:4532
poll rate to 1000
port to 14532
But with these settings you do not get frequency and mode to cqrlog unless you start another rigctld
frequenccy and mode show up properly in CQRLog i have to run rigctld -m2 -r127.0.0.1:4532 -t14532 in another terminal
In preferences/TRXControl do you have proper "Path to rigctld binary:" ?
In preferences/TRXControl do you have "Run rigctld when progem starts" checked ?
If I understood OK it seems to me that either the path is wrong, or run rigctld when program starts is unchecked and cqrlog does not start it's own rigctld.
if you run cqrlog with your current settings from command console with:
cqrlog --debug=1
you should see these kind of lines in console right after cqrlog starts (these of course are my IC706 settings, so yours differ):
Settings:
-----------------------------------------------------
RigCtldPath:/usr/local/bin/rigctld
RigCtldArgs:-m 3009 -r /dev/rig -t 4532 -s 19200
RunRigCtld: TRUE
RigDevice: /dev/rig
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 1500
RigSendCWR: FALSE
RigChkVfo FALSE
RigId: 3009
Starting RigCtld ...
rigProcess.Executable: /usr/local/bin/rigctld
Parameters:
-m
3009
-r
/dev/rig
-t
4532
-s
19200
rigctld started!
Connected to rigctld @ localhost:4532
--
Saku
OH1KH
I think your settings should look like this picture below.
Path to rigctld binary may differ in your system. You get the correct path opening command console and typing:
whereis rigctld
Answer shows the full path that can be copied to cqrlog.
[saku@hamtpad ~]$ whereis rigctld
rigctld: /usr/local/bin/rigctld
[saku@hamtpad ~]$
--
Saku
OH1KH
you are right start rigctrl is selected i did not notice that. everything is the same as what you have in your picture. i did pull up the rig control window and was able to change frequency and mode as well.
Fine !
Can we count this rig problem to be solved then?
How about the database problem.
Can you describe what is your setup there and how the problem can be reproduced ?
Also would like to see the cqrlog version from command console, give:
cqrlog --version
--
Saku
OH1KH
yes radio is working properly thank you for all your help it was huge for my wanting to dump windows for good.
DataBase issue:
does not crash the program all together, however i seem to lose connectivity to my DB if there is no data being read (wsjt-x seems to keep it open if im running CQRLog remote for it), and the problem only comes up when i try enter a call sign or close the program. its a very strange problem.
set up
MariaDB container in my server on my home lan.
cqrlog version is 2.5.2
this is from the debug terminal:
Closing rigs...
1
1a
2
3
4
5
6
SaveForm: frmMain
Section:frmMain
Saving window size a position (frmMain) (height|width|top|left):773|986|867|1079
Closing QSO list window
Section:frmNewQSO
Saving window size a position (frmNewQSO) (height|width|top|left):709|997|867|78
select count(*) from cqrlog001.cqrlog_config
Saving ini file to database
select count(*) from cqrlog001.cqrlog_config
Saving ini file to database
1
2
3
4
5
6
Closing DXCluster window
Closing TRXControl window
Closing GrayLine window
Closing dDXCC
[FORMS.PP] ExceptionOccurred
Killed
this is from wireshark at time index 509 it pulled up a pile of errors
2840 509.004301152 192.168.1.30 192.168.1.91 TCP 66 3306 → 44472 [RST, ACK] Seq=1 Ack=1 Win=85 Len=0 TSval=2382146913 TSecr=2427006608
2841 509.004301402 192.168.1.30 192.168.1.91 TCP 66 3306 → 44470 [RST, ACK] Seq=1 Ack=1 Win=85 Len=0 TSval=2382146913 TSecr=2427006607
2842 509.004539749 192.168.1.30 192.168.1.91 TCP 66 3306 → 44468 [RST, ACK] Seq=1 Ack=1 Win=85 Len=0 TSval=2382146914 TSecr=2427006649
2843 509.042634357 192.168.1.30 192.168.1.91 TCP 66 3306 → 44474 [RST, ACK] Seq=1 Ack=1 Win=85 Len=0 TSval=2382146951 TSecr=2427006609
in digging through the packets it appears the connection is being reset,
.30 is the container for he sql server
.91 is the computer
HI!
First of all about cqrlog version.
Because version number does not change often (perhaps one a year) the date is significant.
Specially if cqrlog is self compiled from GitHub source.
Cqrlog Ver:2.5.2 (001) Date:2021-12-06
How ever I do not remember any bug fix in near past that would have effect to database connection.
It is a known problem that if cqrlog is open for a long time and there are very seldom database queries the connection may close. The keep alive does not work properly.
Also if database server is not in same PC the LAN may cause problems is there are routers that are closing connections when no traffic has been detected for some time. Those cases adjusting router connection close timeout may help.
How cqrlog closes depends what windows have been used. Usually there are some errors but they should not effect as everything is closing.
Your debug dump looks quite normal. But at the end there is a little difference.
Here is dump of my cqrlog
select count(*) from cqrlog004.cqrlog_config
Saving ini file to database
select count(*) from cqrlog004.cqrlog_config
Saving ini file to database
1
*********Invalid file handle
2
3
4
5
6
Closing DXCluster window
Closing TRXControl window
Closing GrayLine window
Closing dDXCC
Deleting config file: cqrlog.cfg
Deleting config file: 4cqrlog.cfg
Closing dData
[saku@hamtpad]$
After closing dDXCC You have
[FORMS.PP] ExceptionOccurred
Killed
That may shut down the process too early, before closing database connections (closing dDATA)
FORMS exception is related to graphics.
If you have compiled cqrlog from source you could try to make QT5 version.
You have to install packages:
Fedora, Mageia - sudo dnf install qt5pas qt5pas-devel
Ubuntu, Debian - sudo apt install libqt5pas1 libqt5pas1-dev
After they are installed go to cqrlog source directory and instead of issuing "make" issue "make cqrlog_qt5". After that normal way "sudo make install"
Then see with
cqrlog --debug=1
is closing still gives FORMS error.
--
Saku
OH1KH
the killed line is because i had to force close the program. the network errors showed up the same time i closed the program. then i tried to close the program this error came up in a pop up:
Press OK to ignore and risk data corruption.
Press Abort to kill the program.
the interesting part is when abort is selected it will freeze the program, and only cleared when clicked the "x" on that window and another window pops up saying force quick. when selecting force quit then it kills the program as seen in the terminal log.
I am on 2.5.2 (i did compile it myself from your sourse on GitHub) on both computers i use your program on. my sql is on the same lan as my computers you can see that from the wireshark lines. is there any part of the program that can be run to keep the connection active? if the keep alive feature does not work properly.
i will work on your qt5 idea shortly when i figure out how to get the package, i ran the line and termnal said "Unable to locate package libqt5pas1-dev"
Hi!
Have you tired to create a new empty log? Then try to operate with it.
Sometimes it may happen that log carries something with it that causes error splash to appear in various places.
There are perhaps some underlying bugs that can not be tracked easily (they can exist in cqrlog or FreePascal sql unit) that are sometimes causing error splash messages like ("" is not proper date) or (Press OK to ignore and risk data corruption.Press Abort to kill the program)
As there are several threads cqrlog uses, running some windows like RBN monitor and DXCluster can not guarantee all sql connections to keep alive.
You can dig the cqrlog.con forum by typing word "keepalive" to top right search box of the web page.
Perhaps the package name libqt5pas1-dev is not ok. If you have Synaptic packet manager (or similar) you can search package name using * as wildcard. ( libqt5p*).
Otherwise try install first just libqt5pas1 or libqt5pas and if that works add "-dev" or "-devel" to working package name.
--
Saku
OH1KH