[Trlog] TRlog-Linux 0.52 Radio Settings for TCI support question

Carlin Royal n5oe at nctwb.net
Tue Jul 12 06:45:13 EDT 2022


I have a cronjob to start the tciadapter @reboot like this:

"@reboot tciadapter -t localhost:50001" so the adapter was already 
running upon a fresh start.

verified by "ps -aux | grep tci" produces below:

root         884  0.0  0.0   2888   960 ?        Ss   05:00 0:00 /bin/sh 
-c tciadapter -t localhost:50001
root         889  1.1  0.0 1599396 14556 ?       Sl   05:00   0:29 
tciadapter -t localhost:50001

I then issued the command suggested :

ncat 127.0.0.1 -p 4532

And below is the response from the command line:

libnsock mksock_bind_addr(): Bind to 0.0.0.0:4532 failed (IOD #1): Address already in use (98)
Ncat: Connection refused.

A quick netstat -l produces below:

Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:domain        0.0.0.0:*               LISTEN
tcp        0      0 localhost:7001          0.0.0.0:*               LISTEN
tcp        0      0 localhost:25001         0.0.0.0:*               LISTEN
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 localhost:20015         0.0.0.0:*               LISTEN
tcp        0      0 localhost:12001         0.0.0.0:*               LISTEN
tcp6       0      0 [::]:4532               [::]:*                  LISTEN
tcp6       0      0 ip6-localhost:7001      [::]:*                  LISTEN
tcp6       0      0 ip6-localhost:ipp       [::]:*                  LISTEN
tcp6       0      0 [::]:4000               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 [::]:50001              [::]:*                  LISTEN
udp        0      0 0.0.0.0:45276           0.0.0.0:*
udp     8448      0 n5oe-desktop:mdns       0.0.0.0:*
udp        0      0 0.0.0.0:mdns            0.0.0.0:*
udp        0      0 0.0.0.0:mdns            0.0.0.0:*
udp        0      0 localhost:domain        0.0.0.0:*
udp        0      0 0.0.0.0:631             0.0.0.0:*
udp6       0      0 [::]:44685              [::]:*
udp6       0      0 [::]:mdns               [::]:*
udp6       0      0 [::]:50001              [::]:*
udp6       0      0 [::]:50002              [::]:*
raw6       0      0 [::]:ipv6-icmp          [::]:*                  7

Port 500001 is my TCI settings on ExpertSDR3, and Port 4532 of course is the rigctl port by default, I find only an ipv6 listing that would possibly be the cause for the connection refusal by netcat? I see on the README section for the tciadapter, the following stating default ports are given if no parameters are used during startup:

/The TCI-Hamlib Adapter is a command-line application. It has the 
following parameters:/

//

/|-h, --help help for tciadapter -l, --local_address string Use this 
local address to listen for incoming Hamlib connections (default 
"localhost:4532") -d, --no_digimodes Use LSB/USB instead of the digital 
modes DIGL/DIGU -t, --tci_host string Connect the adapter to this TCI 
host (default "localhost:40001") -x, --trx int Use this TRX of the TCI 
host |/

/When there are no parameters given, the adapter uses both for Hamlib 
and TCI the default ports.
/

Looking at the ///|/etc/systemd/system/tciadapter.service |/|config 
file, I have the following which is in line with the statements above.|/|
|/

/|ExecStart=/usr/bin/tciadapter -l localhost:4532 -t localhost:50001|/

|I think I understand that rigctld is not actually running, but 
tciadapter does establish the connection port, and is written to handle 
the rigctl commands and processes them for the tciadapter. I cannot find 
rigctld running under "ps -aux" and in CQRlog, the box to launch rigctld 
is unchecked.
|

|
|

|_Thank you Kevin once again for your time and efforts on this. _
|/||/


On 7/10/22 21:22, w9cf at arrl.net wrote:
> Carlin,
> Could you try the following and report the results. This will help
> me know where the problem occurs.
>
> First without running trlog:
> 1. start the tciadapter software on port 4532.
> 2. In a terminal at the command line type
> ncat 127.0.0.1 -p 4532
> Then in that same terminal (i.e. as standard input to ncat) type
> |f
> followed by an enter
>
> 3. ncat should respond with something like
>
> get_freq:|Frequency: 14028064|RPRT 0
>
> where the number is the frequency in Hertz.
>
> If this works as expected:
> 1. Be sure to remove the lines
> RADIO ONE TYPE = TS-480
> RADIO ONE CONTROL PORT = SERIAL /dev/tnt1
> RADIO ONE BAUD RATE = 57600
> 2. Have the only RADIO ONE line as
> RADIO ONE TYPE = rigctld;4532;/dev/ttyTS590sg_a;2037;115200;38;timeout=500;
> or equivalent.
> 3. Start tciadapter
> 4. Be sure to start trlog with the PATH environment before the command
> PATH=`pwd`:$PATH trlog
> 5. If this isn't working, stop tciadapter, and restart trlog
> 6. Then in  a terminal run
> ncat -l  127.0.0.1 4532
> and you should see the trlog queries.
>
>
> Let me know where this fails.
> 73 Kevin w9cf
> On Sun, Jul 10, 2022 at 07:35:47PM -0500, Carlin Royal wrote:
>> Thank you Kevin for the quick response. However I still cannot get the two
>> to communicate over the tciadapter. I have never seen or used a CFG line
>> like you provided here, only just like the one you provided in the trlinux
>> manual from years ago you had made for us.  Below is what I have and works
>> on ExpertSDR2 and with the tciadaptor and tt0tty setup:
>>
>> WINKEYER PORT = SERIAL /dev/ttyUSB0
>> RADIO ONE TYPE = TS-480
>> RADIO ONE CONTROL PORT = SERIAL /dev/tnt1
>> RADIO ONE BAUD RATE = 57600
>>
>> I did as you suggested, and created the rigctld file, made it exucutable,
>> placed it in the working directory I launch ./trlog from, and still nothing.
>> I had changed the CFG line to read RADIO ONE TYPE =
>> rigctld;4532;/dev/tnt1;2028;57600;38;timeout=500; and deleted the CONTROL
>> PORT and BAUD RATE lines listed above. Since you mentioned, with the dummy
>> rigctld and your statement "everything but the rigctld and 4532 will be
>> ignored" I guess what else I added/changed did not matter. None the less,
>> trlinux started, keyer worked, but no radio communication unfortunately.
>>
>> I wish I could help with option 1 below in the code, but my experience with
>> that is extremely limited and I feel lucky I could follow along and
>> understand your procedures below :)
>>
>> Interesting thing I did notice, was while CQrlog was running, I issued from
>> a terminal "ps -aux | grep rigctld" and nothing showed it was running,,,
>> same with TRlinux even during the setup with ExpertSDR2 working and
>> ExpertSDR3 that does not work. It does list the tciadaptor as shown on the
>> previous email although.
>>
>> Thanks again for all you have done for the group.
>>
>> I will keep looking and trying to learn to get this all going.
>>
>> Looking forward to building the SO2Rmini soon and keeping up with all the
>> new changes Ive seen come on the reflector lately.
>>
>>
>> On 7/10/22 16:29,w9cf at arrl.net  wrote:
>>> I am unsure how the Expert rig works, but I'll make some assumptions
>>> and maybe this can help. TR currently interfaces with rigctld by using
>>> a command like:
>>>
>>> RADIO ONE TYPE = rigctld;4532;/dev/ttyTS590sg_a;2037;115200;38;timeout=500;
>>>
>>> which forks rigctld as a subprocess receiving on port 4532. The other
>>> entries are options to rigctld. TR then forks ncat and sends
>>> hamlib rigctld commands to ncat which are sent to the rigctld port.
>>>
>>> If what you want is to have TR just send rigctld commands to the port
>>> without starting a rigctld process, you could either:
>>> 1. Change the code or help us change it for this purpose.
>>> 2. Use a dummy rigctld that does nothing.
>>>
>>> For 2, I just tried the following.
>>> 1. Added the line
>>> RADIO ONE TYPE = rigctld;4532;/dev/ttyTS590sg_a;2037;115200;38;timeout=500;
>>> everything but the rigctld and 4532 will be ignored, but something needs
>>> to be in those slots.
>>> 2. In the directory where you plan to run trlog, create the file
>>> rigctld containing
>>>
>>> #!/bin/sh
>>> sleep infinity
>>>
>>> and make this file executable
>>> chmod +x rigctld
>>>
>>> 3. Start trlog with
>>> PATH=`pwd`:$PATH trlog
>>>
>>> Since the working directory is at the front of the path for this command,
>>> TR will fork the dummy rigctld process, and then start sending hamlib
>>> commands to the port specified above, i.e 4532.
>>>
>>> 73 Kevin w9cf
>>>
>>> On Sun, Jul 10, 2022 at 03:20:43PM -0500, Carlin Royal wrote:
>>>> Hello and thank you for reading this email.
>>>>
>>>> To the point: Can TRlinux interface with the localhost (127.0.0.1:4532
>>>> hamlib/rigctl default) someway that I am missing versus something like
>>>> /dev/xxx?
>>>>
>>>> I am trying to setup TRlinux 0.52 with an ExpertSDR QRP transceiver. The SDR
>>>> has NO physical Com ports for CAT control, but offers settings for the use
>>>> of Virtual Com Ports in their software ExpertSDR2 and with the help of
>>>> tt0tty (a Linux virtual com port solution) I could and have had everything
>>>> working for some time now. In TRlinux, simply setting :
>>>>
>>>> RADIO ONE TYPE = TS480
>>>> RADIO ONE CONTROL PORT = SERIAL /dev/tnt1
>>>> RADIO ONE BAUD RATE = 57600
>>>>
>>>> The above will work just fine on ExpertSDR2, (and yes the SDR appears as a
>>>> TS480 for hamlib purposes with CAT) but I cannot use that with ExpertSDR3,
>>>> as there is no virtual com ports. Lately, I have been testing/using the
>>>> newer ExpertSDR3 software, and it appears they are going away from even
>>>> Virtual Com Ports and using strictly there own interface called Transceiver
>>>> Connection Interface or TCI support linked here:
>>>> https://github.com/maksimus1210/TCI
>>>>
>>>> I installed the "tciadapter" software that interfaces rigctl/hamlib linked
>>>> here:https://github.com/ftl/tciadapter  ,, and it works great with CQRlog so
>>>> it seems I have everything setup correctly,, but when trying to make the
>>>> necessary changes to the CFG file in TRlinux, I cannot get them to
>>>> communicate for rig data. I have tried several things, but TRlinux just
>>>> fails and doesn't start. Examples below:
>>>>
>>>> RADIO ONE CONTROL PORT = SERIAL localhost:4532
>>>>
>>>> RADIO ONE CONTROL PORT = SERIAL localhost
>>>>
>>>> RADIO ONE CONTROL PORT = SERIAL 127.0.0.1:4532
>>>>
>>>> RADIO ONE CONTROL PORT = SERIAL 127.0.0.1
>>>>
>>>> ETC ETC
>>>>
>>>> Am I missing something really easy here, I am still wanting to communicate
>>>> with Hamlib/rigctl as far as I understand like CQRlog is doing, but TRlinux
>>>> just doesn't start with the above examples?
>>>>
>>>> I have attached two PNG files, on of the running tciadapter service, and one
>>>> of the CQRlog settings that work.
>>>>
>>>> THANKS!!!!
>>>>
>>>> _______________________________________________
>>>> Trlog mailing list
>>>> Trlog at contesting.com
>>>> http://lists.contesting.com/mailman/listinfo/trlog
>> _______________________________________________
>> Trlog mailing list
>> Trlog at contesting.com
>> http://lists.contesting.com/mailman/listinfo/trlog


More information about the Trlog mailing list