I have been wrting a Rig module for Hamlib to support SDRAngel. I have most of the code copleted and now testing. Using the RIGCTL application I have the following parts working:
f, F Frequency
m, M mode
v, V VFO
t, T PTT
When I run CQRLOG I see the frequency and the mode are following the radio and staying current.
When I try to change the frequency by selecting a different option in the drop down no change is made to the radio and the frequency in CQRLOG remains the like it was. I also see no different activity in Debug=1.
Same is true for the MODE. Stays current but updates not allowed from CQRLOG side.
Question: Should changes in CQRLOG flow through to the radio. Is that a configuration change I must make to get this working?
Question: Which other Hamlib functions should be supported for CQRLOG; fmv t
Comment: There is a Hamlib command _: get_info, I would like to include this one and have the data placed in the CQRLOG Comment to callsign box. Is this possible, or can it be added in a later version of CQRLOG?
Question: I am just getting started so I have no data in logs. I started with mySQL, created a CQRLOG user and password then gave the root Privileges. CQRLOG seems to have setup the database but I see complaining about UPGRADEMAINDATABASE. Am I going to have trouble if I do not do this? I wanted to be able to move my SQL to other servers running mySQL later.
mysql Ver 8.0.23-0ubuntu0.20.10.1 for Linux on x86_64 ((Ubuntu))
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| cqrlog001 |
| cqrlog_common |
| information_schema |
| mysql |
| performance_schema |
| sys |
73,
Bob N5BRG
I am including a copy of my current debug results for reference:
Cqrlog Ver:2.5.2 (001) Date:2021-02-19
**** DEBUG LEVEL 1 ****
OS:
Linux version 5.8.0-43-generic (buildd@lgw01-amd64-036) (gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #49-Ubuntu SMP Fri Feb 5 03:01:28 UTC 2021
SSL libraries:
libssl.so
libcrypto.so
Loaded 134350 LoTW users
Loaded 125829 eQSL users
Loaded 36919 SCP calls
*
User home directory: /home/bob/
Program home directory: /home/bob/.config/cqrlog/
Data directory: /home/bob/.config/cqrlog/database/
Memebers directory: /home/bob/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
*
56 us states loaded
Grid map created
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
[UpgradeMainDatabase] Old version: 18 cDB_MAIN_VER: 18
select * from cqrlog_common.db_version
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF
SELECT * FROM cqrlog_common.bands
Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 25020 -t 4532
RunRigCtld: TRUE
RigDevice:
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 25020
Starting RigCtld ...
rigProcess.Executable: /usr/bin/rigctld
Parameters:
-m
25020
-t
4532
rigctld started!
Connected to rigctld @ localhost:4532
Radio1 CW settings:
CW init keyer type:0
CW keyer reloaded by TRControl radio1 change
Settings:
-----------------------------------------------------
RotCtldPath:/usr/bin/rotctld
RotCtldArgs:-m 1 -t 4533
RunRotCtld: FALSE
RotDevice:
RotCtldPort:4533
RotCtldHost:localhost
RotPoll: 500
RotId: 1
Not started rotctld process. (Run is set FALSE)
Connected to rotctld @ localhost:4533
FreqmemSql:select id,freq,mode,bandwidth,info from freqmem order by id
FreqmemNR:0=0
FreqmemFirst:0 FreqmemLast:0
Sending: fmv
Msg from rig: 1133000000
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
Msg from rig: USB
2500
VFOA
Sending: fmv
Msg from rig: 1133000000 <---- Note this is 1.133 GHz. I will use on Microwave up to 122 GHz.
Msg from rig: USB
2500
Msg from rig: VFOA
Sending: fmv
Msg from rig: 1133000000
Msg from rig: USB
2500
Msg from rig: VFOA
Sending: fmv
Sending: fmv
***********************************************
Some blocks deleted here which were all
exactly the same.
***********************************************
Msg from rig: 1133000000
Msg from rig: USB
2500
VFOA
Sending: fmv
Msg from rig: 1133000000
Msg from rig: USB
2500
VFOA
Sending: fmv
Msg from rig: 1133000000
USB
2500
Msg from rig: VFOA
Sending: fmv
Msg from rig: 1133000000
Msg from rig: USB
2500
VFOA
Closing rigs...
1
1a
2
3
4
5
6
Section:frmNewQSO
Saving window size a position (frmNewQSO) (height|width|top|left):709|1032|215|226
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: cqrlog.cfg
Deleting config file: 1cqrlog.cfg
Closing dData
N5BRG
Hi !
"When I try to change the frequency by selecting a different option in the drop down"
You can not control rig via NewQSO. Dropdown is there for people who do not have rig cat. I.E. manual logging.
Open NewQSO/Window/TRXControl that is the way to control rig.
"Question: Should changes in CQRLOG flow through to the radio."
Means what? Changes in TRXControl affects radio, changes in radio(manual adjust by radio knobs) affects to NewQSO and TRXControl freq and mode.
"Question: Which other Hamlib functions should be supported for CQRLOG"
All commands as user can define own buttons at TRXControl, but for normal operation f,m and F,M are enough. v is not used (Icoms can not even response to it) and V is used as option in TRXControl.
Look at file uRIgConrol.pas in cqrlog source src directory for more information.
Recommended reading are also cqrlog help files !!! Specially "TRX/ROT Control" chapters in "Quick start" and "Operation"
"Comment: There is a Hamlib command _: get_info"
With Open Source everything is possible. Just write the procedure that sends "get_info" and reads result. That goes to uRigControl.pas. Then decide what way you initiate that procedure. Right click of Comment to callsign, a key combination or what.
It is mainly not very useful information. my IC7300 answers "None".
"Question: I am just getting started so I have no data in logs"
Upgrade database should appear only once when cqrlog notices the database version is older than current.
After upgrade this should not happen.
You should create mysl user cqrlog and grant all privileges:
GRANT ALL PRIVILEGES ON *.* TO 'cqrlog'@'%' IDENTIFIED BY 'cqrlog';
At linux side you should run cqrlog with regular user account.
If no qsos yet you can drop all cqr* databases and let cqrlog create new ones. Database update should not appear in normal use after database creations. Be sure you are running latest cqrlog. Do not use old ones from some Linux distor's repository.
--
Saku
OH1KH
Hi Saku,
Thank you for your feedback. It took me a bit to realize I needed to take extra steps to get CQRLOG in a mode of sending commands back through Hamlib to the radio. I now have this work and see I need to debug some issues on my side beofore post my code to Hamlib.
I would like to sugeest making the following improvements to the Quick State documentation online.....
Quick start
The TRX Control ……
Replace this:
The TRX Control displays actual frequency. You can change band and mode. The radio will change the freq/mode after you double click on a spot from dx cluster or on an item in bandmap.
CQRLOG uses the rigctld utilty from HamLib. It controls the radio and programs communicate with it through UDP. CQRLOG supports operating with two TRX but only one can be active at a time.
With this.
The TRX Control displays actual frequency. If you open the DX Cluster window and connect to a DX Cluster server, you will see a list of activity displayed. You can change band and mode of your radio by double clicking on a listing in the dx cluster. The radio will change the freq/mode after you have double clicked by sending Hamlib rigctld utility commands F and M to your radio with the proper frequency and mode. CQRLOG supports operating with two TRX radios but only one can be active at a time.
After you have the DX Cluster window open and connected you may also open the Band Map Window. You can then make a frequency change on the radio by double clicking on a line listed in the Band Map.
Replace:
User defined TRXControl buttons can be defined here. First column is button name shown (4char max) and second column is command to execute. Definition can consist one, or several in queue, rigctld commands or if definition starts with word run it can be a program or script name with full path.
With this:
User defined TRXControl buttons can be defined here. Your defined buttons will shown in the TRX Control window after you drop selct this option in using the Preferences tab in the TRXControl window. The first column is button name shown (4char max) you can change this name by clicking it in the main File->Preferences->TRX Control. In the same area the second column is the command(s) to execute. Definition can consist one command or several in a queue, rigctld commands may be used or if definition starts with word RUN it can be a program or script name with full file path for your computer.
I pasted the above from a MS word document I hope it stays together in the web page text handling. If not I will spend more time studying the font format info and use a different editor in the future.
Thanks for all your efforts and the fine program.
N5BRG
N5BRG
Hi!
Thanks for suggestions.
Some notes:
"double click on listing" DXCluster "listings" are commonly called "spots". Spot is the right name for a line holding DX information.
If I translate "double click on listing" with my poor skills it means in my language something about: "click on any line of dx spot list" How ever click must be done on that specified line of listing where the information about DX of interest is located.
So I prefer " double click on a spot "
The talk about UDP is nonsense. It is clear bug.
And another:
" with word RUN "
No! It is word "run". Case matters here. (If I remember right. Must check from source)
New suggestion:
The TRX Control displays actual frequency. If you open the DX Cluster window and connect to a DX Cluster server, you will see a list of DX spots displayed. You can change band and mode of your radio by double clicking on a DX spot line in the DX cluster. The radio will change the freq/mode after you have double clicked by sending Hamlib rigctld utility commands F and M to your radio with the proper frequency and mode taken from DX spot line. Note how ever that settings in Preferences/Bands/Frequencies will affect what mode will be selected.
CQRLOG supports operating with two TRX radios but only one can be active at a time.
After you have the DX Cluster window open and connected you may also open the Band Map Window. You can then make a frequency change on the radio by double clicking on a callsign line listed in the Band Map.
-------
User defined TRXControl buttons can be defined here. Your defined buttons will shown in the TRX Control window after you drop select this option in using the Preferences tab in the TRXControl window. For setting up buttons use "preferences" option from TRXControl drop select option "Preferences". From TRX Control tab you will find group box named "User defined TRX control buttons".
The first column is button name shown (4char max). In the same area the second column is the command(s) to execute. Definition can consist one command or several in a queue, rigctld commands may be used or if definition starts with word "run" (without quotes) it can be a program or script name with full file path for your computer.
Your comments, please ?
--
Saku
OH1KH
Hi Saku,
Your last changes are clear to me. The way you have the word "spot" used is also clear and easy to follow your meaning.
Fine on the word run also, I made the word all caps at the last minute while typing when I could not get this editor to let me make it bold as you have it in the text.
I know you have a chalange to make the instructions clear and work for many people when english is not their first languange. Having good documentation will reduce the amount of questions and feedback on the forum.
I am a retired engineer developer and I spent a good deal of time traveling the world working with people from many countries so I know this can be difficult. I found people writing in english when it was not their mother's toung or lanugage typically do better. My skills are not so good.
You are doing a fine job with this project and should be proud of your efforts.
73,
Bob N5BRG
N5BRG