k2 Elecraft Rig control not working

6 posts / 0 new
Last post
f5mog
k2 Elecraft Rig control not working

hi,

I would need some advice. I am back to amateur radio, using my old K2 Elecraft, and I installed CQRLog. I am trying to connect my RS232 K2 to my computer, (linux mint) using an RS232/USB adapter.
Thanks to the previous post from w3khd , rigctld is now apparently working. But the rig control is still not there, Could you give me some ideas on how to continue to investigate .... Thanks. 73 de Pierre
Below what I have

pf@pf-W240EU-W250EUQ-W270EUQ ~ $ cqrlog

Cqrlog Ver:2.3.0 (001) Date:2018-06-17
**** DEBUG LEVEL 0 ****
**** CHANGE WITH --debug=1 PARAMETER ****

Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 221 -r /dev/ttyUSB0 -t 4532 -s 4800 --set-conf=data_bits=8,stop_bits=2,serial_parity=None,serial_handshake=None,dtr_state=OFF,rts_state=OFF
RunRigCtld: TRUE
RigDevice: /dev/ttyUSB0
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 1000
RigSendCWR: FALSE
RigId: 221

Starting RigCtld ...
/usr/bin/rigctld -m 221 -r /dev/ttyUSB0 -t 4532 -s 4800 --set-conf=data_bits=8,stop_bits=2,serial_parity=None,serial_handshake=None,dtr_state=OFF,rts_state=OFF
rigctld started!
Connected to localhost:4532
Warning: For better performance, background image should be the same size as the output image
Warning: Can't find /home/pf/.config/cqrlog/xplanet/marker in
xplanet/markers
/home/pf/.xplanet/markers
/usr/share/xplanet/markers
Warning: Can't load marker file /home/pf/.config/cqrlog/xplanet/marker
Sending: fmv

rig_open: error = Communication timed out
Sending: fmv

Sending: fmv

Sending: fmv

Sending: fmv

./......

oh1kh
Hi!

Looks good.
Are you sure the rig port is /dev/ttyUSB0 ?

While having rig on and connected, no need to run cqrlog, open console and give:

ls -l /dev/ttyUSB*

You should see something like:

[saku@hamtpad ~]$ ls -l /dev/ttyUSB*
crw-rw----. 1 root dialout 188, 0 7.10. 15:27 /dev/ttyUSB0
crw-rw----. 1 root dialout 188, 1 7.10. 16:01 /dev/ttyUSB1
[saku@hamtpad ~]$

Pull the rig cable off (at PC's side) and give same command. Did ttyUSB0 disappear? If so, put it back and again give same command. You can use "arrow up" on keyboard to get last command without typing, it needs just enter then.

If the port really was right was there a text "dialout" after root?
Give next:
groups your_username

You should see something like:


[saku@hamtpad ~]$ groups saku
saku : saku dialout lock
[saku@hamtpad ~]$

Is the "dialout" there. If not give:
sudo adduser dialout your_username

After that it should work.

If all that is ok but no connection, you could try from console:
/usr/bin/rigctl -m 221 -r /dev/ttyUSB0 -vvvvv

NOTE that is rigctl (without d at the end)!

You should get long list and finally "Rig command:"

giving
f (enter)
should show frequency in Hz

If it does not work you see some error texts. What?

If it works giving
q (enter) stops program.
If that worked you could try TRXControl settings so that you put all selectors to "Default". Then it is the same situation as in console test.

Check also that your hamlib is latest version (at least 3.xx).

[saku@hamtpad ~]$ rigctl --version
rigctl, Hamlib 3.1

Copyright (C) 2000-2012 Stephane Fillod
Copyright (C) 2000-2003 Frank Singleton
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[saku@hamtpad ~]$

--
Saku
OH1KH

f5mog
Elecraft K2 rig control not working

Hello Saku,

Many thanks for your help and advice. Unfortunately, my system is still not working.
a) Hamlib is version 3.3
b)Port is ttyUSB0
c)I am member of dialout
d)running rigctl for my K2 (rig 221) finish with rig_open: error = Communication timed out
See file below. 73 de Pierre

pf@pf-W240EU-W250EUQ-W270EUQ ~ $ rigctl --version
rigctl, Hamlib 3.3

Copyright (C) 2000-2012 Stephane Fillod
Copyright (C) 2000-2003 Frank Singleton
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
pf@pf-W240EU-W250EUQ-W270EUQ ~ $ groups
pf adm proxy dialout cdrom sudo dip plugdev lpadmin sambashare
pf@pf-W240EU-W250EUQ-W270EUQ ~ $ /usr/bin/rigctl -m 221 -r /dev/ttyUSB0 -vvvvv
rigctl, Hamlib 3.3
Report bugs to

rig_init called
initrigs3_kenwood called
rig_register called
rig_register: rig_register (213)
rig_register called
rig_register: rig_register (201)
rig_register called
rig_register: rig_register (225)
rig_register called
rig_register: rig_register (203)
rig_register called
rig_register: rig_register (204)
rig_register called
rig_register: rig_register (216)
rig_register called
rig_register: rig_register (224)
rig_register called
rig_register: rig_register (205)
rig_register called
rig_register: rig_register (207)
rig_register called
rig_register: rig_register (209)
rig_register called
rig_register: rig_register (210)
rig_register called
rig_register: rig_register (222)
rig_register called
rig_register: rig_register (214)
rig_register called
rig_register: rig_register (230)
rig_register called
rig_register: rig_register (221)
rig_register called
rig_register: rig_register (229)
rig_register called
rig_register: rig_register (238)
rig_register called
rig_register: rig_register (202)
rig_register called
rig_register: rig_register (211)
rig_register called
rig_register: rig_register (206)
rig_register called
rig_register: rig_register (208)
rig_register called
rig_register: rig_register (215)
rig_register called
rig_register: rig_register (226)
rig_register called
rig_register: rig_register (217)
rig_register called
rig_register: rig_register (233)
rig_register called
rig_register: rig_register (220)
rig_register called
rig_register: rig_register (223)
rig_register called
rig_register: rig_register (227)
rig_register called
rig_register: rig_register (234)
rig_register called
rig_register: rig_register (231)
rig_register called
rig_register: rig_register (239)
rig_register called
rig_register: rig_register (237)
rig_register called
rig_register: rig_register (228)
rig_register called
rig_register: rig_register (219)
rig_register called
rig_register: rig_register (232)
rig_register called
rig_register: rig_register (236)
rig_register called
rig_register: rig_register (240)
kenwood_init called
kenwood_init: if_len = 37
rig_open called
port_open called
serial_open called
serial_setup called
k2_open called
elecraft_open called, rig version=20120615
elecraft_open: rig_model=221,238
verify_kenwood_id called
kenwood_get_id called
kenwood_transaction called
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2076 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2026 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2063 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2047 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2069 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2060 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2028 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2058 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.1452 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2067 seconds after 0 chars
kenwood_transaction: cmdstr = ID
serial_flush called
write_block called
write_block(): TX 3 bytes
0000 49 44 3b ID;
read_string called
read_string(): Timed out 2.2039 seconds after 0 chars
verify_kenwood_id: cannot get identification
rig_open: error = Communication timed out

oh1kh
Elecraft K2 rig control not working

HI!

Yep!
It seems that rigctld can not talk with rig. And that leads to situation that cqrlog can not get anything from rigctld.

I googled a littel bit and found this:
http://www.elecraft.com/manual/KIO2%20Pgmrs%20Ref%20rev%20E.pdf

Seems that communication format is same as with many Kenwoods. I have played a bit with TS50.
We have to look more what happens between rig and PC.

But before that, do you have an other program that works with K2? What I mean is that your connection cable and serial ports (at rig end and at pc end) are working and not broken that could be tested with that another program.

What kind of connection (cable) you have? Home made / bought from dealer ?

Try open console and give:
minicom -s

Minicom is a terminal program that is handy when testing serial ports. Originally made for operating with old phone line modems. If you do not have it you could install it:
sudo apt-get minicom

If minicom starts (with parameter -s) it goes right to setup. Choose serial port settings and set port to /dev/ttyUSB0
and speed to 4800 8N2 (8bits no parity 2 stop bits) that is default for Kenwoods.

Now you should be able to "talk" to K2
typing:
if;
should give lot of data (see link above, page 7)
Note that ; is "enter" for kenwoods You should end command with ; no enter/return is needed.

If you can not get anything pull the plug from rig and connect RXdata and TXdata together from rig end connector of your connection cable. When they are connected every character you type in minicom should return to your screen. And when you open connection this does not happen any more.
That verifies your PC's serial port and the connection cable. If there is no echo back you have faulty PC port, connection cable or the port device name is wrong and it is something else than ttyUSB0.

If characters echo back when RXdata and TXdata pins are together yo need to check that you have right speed and settings (4800,8N2) in minicom and also in rig (if they can be changed from rig setup).
If they are right you have to suspect rigs serial port. Is it broken?

That needs another setup (another ham) where you can test your rig to his PC and his rig to your PC.

How ever problem is now between rig and PC, not in cqrlog itself. It must be cleared out first,

File: 

--
Saku
OH1KH

f5mog
Elecraft K2 rig control not working

Hello Saku,

Your proposed logic of testing is very helpful, many thanks. I was travelling last days, so I was able to restart my tests only now.

My set-up is the following:
a) PC, with USB port cable.
b) serial USB / DB9 adapter. I have 2 cables, one FDTI and one with Prolific chip.
c)home made DB9 male/female cable, made, according to the elecraft instructions, specific for the Elecraft K2 use.
d) Rig K2 Elecraft.

I downloaded minicom, ran sudo minicom -s , set the serial parameters as per the elecraft sheet (4800 8N2 ), saved this configuration and than ran minicom.

My 2 usb/serial cables are echoing the typed characters when the TX/RX loop back is installed.
With my home made K2 communication cable, I also have the echo, when the loop back is installed at the end of these cables.

I do not have any answer from the K2, which has its port activated in the K2 set up menu.

So, with your help and guidance, it is now clear that the problem is with my K2. So I will later continue my investigations, first digging with the K2 software aspects, and then with the RS232 hard interface. I suspect a faulty interface....will see.

Since I am back to amateur radio after a long interruption, I need to rebuild some functioning capabilities, hard, but also intellectual.
Your advices were really helpful in this matter. Many thanks.
I will post my findings, if any.

73 de Pierre

oh1kh
Elecraft K2 rig control not working

HI Pierre!

Nice to hear that you succeeded with serial wire loopback tests. That proves your PC and cable are ok.
Sad to hear that problem is in rig.

I wish there is a parameter in setup that is forgotten to change. I do not know K2, so there is not much help to give about that.

One thing I must say:

REMEMBER GROUNDINGS !!!

Your PC, specially if it is a tower model, with its own power supply MUST be grounded to same ground as your rig.
BEFORE you pull or push any cable between them.

Laptops are not so critical as their power supply is isolated between mains and low voltage what comes to PC's case ground.

Tower PC powers have often (nearly 100%) switching power supply qrm filter at the mains line. That filter has 2 capacitors from Live(brown) to case Gnd(yellow/green) and from Neutral (blue) to case Gnd(yellow/green).
If case Gnd (yellow/green) is not connected at all (no Gnd at mains socket) , or has different potential than rig the potential difference between rig and PC may be 110VAC at worst case in 220V mains system.

Because these filter capacitors are very small (few nF) the floating case voltage is not dangerous between rig and PC when they have no connection you can feel it, but it has enough current and voltage to destroy serial port components. Either at PC end or rig end.

So remember grounding, at least have a wire between PC case and rig case that is under screws so that it is always present.

--
Saku
OH1KH