I've searched through similar issues folk have had with their rigs not connecting but although I can query the rig's freq via the terminal CQRLog does not connect. I have flrig and xlog connecting okay using 231 Kenwood TS-590S, /dev/ttyUSB3, 115200, RTS/CTS and I have updated hamlib. The path to the binary is /usr/bin/rigctld Hopefully there's something in this debug readout that spotlights the fix.
Ed - ad7gr
------
ed@ed-den ~ $ /usr/bin/rigctl -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200
Rig command: f
Frequency: 7114000
------
ed@ed-den ~ $ rigctl -V
rigctl, Hamlib 3.0.1
------
ed@ed-den ~ $ cqrlog --debug
**** DEBUG LEVEL 1 ****
SSL libraries:
/lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Loading libmysqlclient: /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20
**************************
MySQL version: 5.7
**************************
**********************************
MySQL version assigned: 5.7
**********************************
Loaded 112496 LoTW users
Loaded 111747 eQSL users
Loaded 41620 SCP calls
*
User home directory: /home/ed/
Program home directory: /home/ed/.config/cqrlog/
Data directory: /home/ed/.config/cqrlog/database/
Memebers directory: /usr/share/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
TConnection to MySQL: 5.7
*
56 us states loaded
/usr/sbin/mysqld --defaults-file=/home/ed/.config/cqrlog/database/mysql.cnf --datadir=/home/ed/.config/cqrlog/database/ --socket=/home/ed/.config/cqrlog/database/sock --port=64000
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:1
select * from tables where table_schema = 'cqrlog_common'
SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
SELECT * FROM cqrlog_config
select * from db_version
select * from cqrlog_common.db_version
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,serial_handshake=None,rts_state=ON
RunRigCtld: FALSE
RigDevice: /dev/ttyUSB3
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 231
rigctld started!
Connected to localhost:4532
Settings:
-----------------------------------------------------
RotCtldPath:/usr/bin/rotctld
RotCtldArgs:
RunRotCtld: FALSE
RotDevice:
RotCtldPort:4533
RotCtldHost:localhost
RotPoll: 500
RotId: 1
rotctld started!
Connected to localhost:4533
select id,freq,mode,bandwidth from freqmem order by id
Sending: fmv
CW init
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = -1
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = -1
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Sending: fmv
Section:frmGrayline
Saving window size a position (frmGrayline) (height|width|top|left):238|436|75|1162
1
2
3
4
5
6
Section:frmTRXControl
Saving window size a position (frmTRXControl) (height|width|top|left):238|331|75|907
Closing rigs...
Closing Details window
Section:frmQSODetails
Saving window size a position (frmQSODetails) (height|width|top|left):238|284|75|620
Section:frmPropagation
Saving window size a position (frmPropagation) (height|width|top|left):76|155|841|461
Section:frmNewQSO
Saving window size a position (frmNewQSO) (height|width|top|left):578|975|344|621
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
Deleting config file: 1cqrlog.cfg
Deleting config file: cqrlog.cfg
Closing dData
/home/ed/.config/cqrlog/database/ed-den.pid
Command:
kill 7079
Closing ini file ...
ed@ed-den ~ $
Hi !
In the beginning of your message you have tested with
/usr/bin/rigctl -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200
Could you try with rigctld. I.E. add just 'd' to the line
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200
And after that start another command window and try
telnet localhost 4532
When connected give 'f', do you get frequency then?
If ok, cqrlog should work. If not, try to add one more parameter for command line:
-t
--send-cmd-term=char
Change the termination char for text protocol when using the send_cmd command. The default value is (0x0d). Non ASCII printable characters can be specified as an ASCII number, in hexadecimal format, prepended with 0x. You may pass an empty string for no termination char. The string ’-1’ tells rigctl to switch to binary protocol. See the send_cmd command for further explanation.
I think your TS needs end of line char as ';' not 'CR'
That is just a guess. When played with my TS-50s with minicom it was required but I can not remember what happened with rigctld. Does the rig model carry the EOL information or not.
But that is easy and fast to try!
I have used TS-50s with cqrlog, but interfacing has been via home made WiFi interface done with ESP12e microcontroller.
It has rigctld emulation built in and I just change localhost:4532 to ESP.IP.ARR:4532 and rig model to '2' in prferences of cqrlog. The emulation takes care of EOL char.
--
Saku
OH1KH
--
Saku
OH1KH
Just making the first test more informative:
Could you try with rigctld. I.E. add just 'd' to the line
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 -vvvvv
Adding -vvvvv shows all information in terminal window of rigctld while you connect with telnet from other terminal window.
Might give a glue.
--
Saku
OH1KH
--
Saku
OH1KH
More results...
I responded too fast... here's the response in the second terminal...
73,
Ed - AD7GR
More testing.
Now that I'm awake I'm trying to follow your directions... not what I think you said. In addition, I'm real new to Linux with less than three weeks on my installation of Mint 18.3
73,
Ed - AD7GR
Adding d to the line does not work Saku. After doing that, in the separate terminal I have the following...
ed@ed-den ~ $ telnet localhost 4532
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Ed - ad7gr
73,
Ed - AD7GR
The problem is here:
RigCtldArgs:-m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,serial_handshake=None,rts_state=ON
RunRigCtld: FALSE
Please go to Preferences -> TRX control and check "Run rigctld when program starts"
73 Petr
--
http://HamQTH.com/ok2cqr
https://ok2cqr.com
With Preferences -> TRX control -> "Run rigctld when program starts" checked I still have frequency reading 0
Ed - ad7gr
73,
Ed - AD7GR
Hi Ed!
We are both too fast to response.
What Petr says is true. I tested, before reply, with my kitchen laptop and got same lines as you. Did not get notice to RunRigCtld: FALSE as I do not work qsos with that computer and the "Run rigctld when program starts" unchecked also here. It should give RunRigCtld: TRUE as it does when "Run rigctld when program starts" is set.
How ever if your rig does still not give frequency we could try again with 2 command line windows.
On first window give:
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 -vvvvv
On second give
telnet localhost 4532
After that on second (the telnet window) hit f (and enter)
you should get frequency as reply and in first window, because of -vvvvv you see what happens inside rigcltd
If f (enter) on telnet window did show rig frequency it should work also with cqrlog.
If not:
give telnet window q (enter) to close telnet connaction
on first (rigctld window). five Ctrl+C to stop rigctld.
Check that yor rig really is ttyUSB3 and that no other program is using that serial device at same time.
Forget the --send-cmd-term=char rigctl and rigctld have different commands. Even different meanings for same one letter commands.
I did mix them (once again).
IF you want to use CAT for several programs at same time you should first star cqrlog (that starts rigctld), Other programs (wsjtx, fldgi, etc.) should use rigctld as -m 2 (rig model2) at localhost:4532 (wsjtx says this "Net Hamlib ricgtld").
You can use only one rig CAT to ttyUSB3 at time. That's why cqrlog startred rigctld is used to share rig data to several other porgrams.
What does "cqrlog debug=1" give now when "Run rigctld when program starts" is set?
--
Saku
OH1KH
--
Saku
OH1KH
Saku,
>>> Comments Added.
How ever if your rig does still not give frequency we could try again with 2
command line windows.
On first window give:
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 -vvvvv
ed@ed-den ~ $ /usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 -vvvvv
rigctld, Hamlib 3.0.1
Report bugs to
rig:rig_init called
initrigs3_kenwood called
rig_register (213)
rig_register (201)
rig_register (225)
rig_register (203)
rig_register (204)
rig_register (216)
rig_register (224)
rig_register (205)
rig_register (207)
rig_register (209)
rig_register (210)
rig_register (222)
rig_register (214)
rig_register (230)
rig_register (221)
rig_register (229)
rig_register (238)
rig_register (202)
rig_register (211)
rig_register (206)
rig_register (208)
rig_register (215)
rig_register (226)
rig_register (217)
rig_register (233)
rig_register (220)
rig_register (223)
rig_register (227)
rig_register (234)
rig_register (231)
rig_register (239)
rig_register (237)
rig_register (228)
rig_register (219)
rig_register (232)
rig_register (236)
kenwood_init called
kenwood_init: if_len = 37
rig:rig_open called
kenwood_open called
kenwood_transaction called
kenwood_transaction: cmdstr = FV
write_block(): TX 3 bytes
0000 46 56 3b FV;
read_string(): RX 7 characters
0000 46 56 32 2e 30 32 3b FV2.02;
kenwood_open: found f/w version 2.02
kenwood_get_id called
kenwood_transaction called
kenwood_transaction: cmdstr = ID
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string(): RX 6 characters
0000 49 44 30 32 31 3b ID021;
kenwood_open: found match 021
kenwood_set_trn called
kenwood_safe_transaction called
kenwood_transaction called
kenwood_transaction: cmdstr = AI0
write_block(): TX 4 bytes
0000 41 49 30 3b AI0;
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string(): RX 6 characters
0000 49 44 30 32 31 3b ID021;
kenwood_get_vfo_if called
kenwood_get_if called
kenwood_safe_transaction called
kenwood_transaction called
kenwood_transaction: cmdstr = IF
write_block(): TX 3 bytes
0000 49 46 3b IF;
read_string(): RX 38 characters
0000 49 46 30 30 30 30 37 31 37 32 30 30 30 20 20 20 IF00007172000
0010 20 20 20 30 30 30 30 30 30 30 31 36 30 31 30 30 0000000160100
0020 30 30 30 38 30 3b 00080;
Opened rig model 231, 'TS-590S'
Backend version: 0.9.1, Status: Beta
Connection opened from 127.0.0.1:54686
rigctl(d): f 'currVFO' '' '' ''
kenwood_get_freq called
kenwood_safe_transaction called
kenwood_transaction called
kenwood_transaction: cmdstr = FA
write_block(): TX 3 bytes
0000 46 41 3b FA;
read_string(): RX 14 characters
0000 46 41 30 30 30 30 37 31 37 32 30 30 30 3b FA00007172000;
^C
ed@ed-den ~ $
On second give
telnet localhost 4532
ed@ed-den ~ $ telnet localhost 4532
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
After that on second (the telnet window) hit f (and enter)
you should get frequency as reply and in first window, because of -vvvvv you
see what happens inside rigcltd
f
7172000
If f (enter) on telnet window did show rig frequency it should work also
with cqrlog.
>>> It showed the frequency in the terminal but not in cqrlog.
If not:
give telnet window q (enter) to close telnet connaction
on first (rigctld window). five Ctrl+C to stop rigctld.
Check that yor rig really is ttyUSB3 and that no other program is using that
serial device at same time.
>>> ttyUSB is used by several other programs successfully, but no other program is using it during these tests.
...
IF you want to use CAT for several programs at same time you should first
star cqrlog (that starts rigctld), Other programs (wsjtx, fldgi, etc.) should
use rigctld as -m 2 (rig model2) at localhost:4532 (wsjtx says this "Net
Hamlib ricgtld").
You can use only one rig CAT to ttyUSB3 at time. That's why cqrlog startred
rigctld is used to share rig data to several other porgrams.
>>> Flrig connects the the TS-590s with /dev/ttyUSB3
>>> Fldigi connects via XML-RPC and is linked to Flrig
What does "cqrlog debug=1" give now when "Run rigctld when program starts"
is set?
ed@ed-den ~ $ cqrlog debug=1
**** DEBUG LEVEL 1 ****
SSL libraries:
/lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Loading libmysqlclient: /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20
**************************
MySQL version: 5.7
**************************
**********************************
MySQL version assigned: 5.7
**********************************
Loaded 112496 LoTW users
Loaded 111747 eQSL users
Loaded 41620 SCP calls
*
User home directory: /home/ed/
Program home directory: /home/ed/.config/cqrlog/
Data directory: /home/ed/.config/cqrlog/database/
Memebers directory: /usr/share/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
TConnection to MySQL: 5.7
*
56 us states loaded
/usr/sbin/mysqld --defaults-file=/home/ed/.config/cqrlog/database/mysql.cnf --datadir=/home/ed/.config/cqrlog/database/ --socket=/home/ed/.config/cqrlog/database/sock --port=64000
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:1
select * from tables where table_schema = 'cqrlog_common'
SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
use cqrlog001
SELECT * FROM cqrlog_config
select * from db_version
select * from cqrlog_common.db_version
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,rts_state=ON
RunRigCtld: TRUE
RigDevice: /dev/ttyUSB3
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 231
Starting RigCtld ...
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,rts_state=ON
rig_open: error = Invalid configuration
rigctld failed to start!
1
2
3
4
5
6
Settings:
-----------------------------------------------------
RotCtldPath:/usr/bin/rotctld
RotCtldArgs:
RunRotCtld: FALSE
RotDevice:
RotCtldPort:4533
RotCtldHost:localhost
RotPoll: 500
RotId: 1
rotctld started!
Connected to localhost:4533
select id,freq,mode,bandwidth from freqmem order by id
CW init
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = -1
SELECT * FROM profiles WHERE visible > 0 ORDER BY nr
SELECT * FROM profiles WHERE nr = -1
Section:frmGrayline
Saving window size a position (frmGrayline) (height|width|top|left):238|436|75|1162
Section:frmTRXControl
Saving window size a position (frmTRXControl) (height|width|top|left):238|331|75|907
Closing rigs...
Closing Details window
Section:frmQSODetails
Saving window size a position (frmQSODetails) (height|width|top|left):238|284|75|620
Section:frmPropagation
Saving window size a position (frmPropagation) (height|width|top|left):76|155|841|461
Section:frmNewQSO
Saving window size a position (frmNewQSO) (height|width|top|left):578|975|344|621
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
Deleting config file: 1cqrlog.cfg
Deleting config file: cqrlog.cfg
Closing dData
/home/ed/.config/cqrlog/database/ed-den.pid
Command:
kill 16288
Closing ini file ...
ed@ed-den ~ $
>>> I hope this all helps.
73,
Ed - AD7GR
Hi Ed!
Fine. You have proved that rigctld works with 2 command windows with that parameter line you have given.
And from cqrlog debug=1 we can see that it says "invalid configuration".
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,rts_state=ON
RunRigCtld: TRUE
RigDevice: /dev/ttyUSB3
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 231
Starting RigCtld ...
/usr/bin/rigctld -m 231 -r /dev/ttyUSB3 -t 4532 -s 115200 --set-conf=stop_bits=1,serial_parity=None,rts_state=ON
rig_open: error = Invalid configuration
rigctld failed to start!
At the point you started cqrlog were the 2 comand lines closed and 1st window rigctld closed with Ctrl+C?
As there can not be 2 instances of rigctld running at same time.
Before starting cqrlog you can check from console window that no rigctld is running with:
ps ax | grep rig
If it just gives line like:
2734 pts/1 S+ 0:00 grep --color=auto rig
And nothing more it is ok. But if you see rigctld with parameters as another line it is running there in background. Then you can give:
killall rigctld
so many times that it says "no processes".
So if we assume that at the time you started "cqrlog debug=1" there were no other rigctld(s) running already and you got: rig_open: error = Invalid configuration
the failure compared to your command line tests must be in part: --set-conf=stop_bits=1,serial_parity=None,rts_state=ON
I have only TS-50s (others are Icoms) and at least that rig wants 2 stop bits to work.
Next job is to play with Preferences/"Radio one serial parameters". If 2 stop bits does not help you could also try setting all "default" on top row and "none unset unset" on bottom row.
Unless some same model Kenwood rig owner gives the right settings here, (or you can chek these from your other ok running programs).
You are very close now!
--
Saku
OH1KH
--
Saku
OH1KH
... play with Preferences/"Radio one serial parameters". If 2 stop
bits does not help you could also try setting all "default" on top row and
"none unset unset" on bottom row.
That did it Saku! Interesting that explicitly setting the configuration as successfully used in Flig and QSSTV did not work in CQRLog but you made it come together for me.
My thanks to you and Petr for your patience and encouragement to this Linux newbie during this challenge. You've gone "the extra mile".
73,
Ed - AD7GR