I am encountering a problem accessing gqrx via a remote host. The article at https://gqrx.dk/doc/remote-control suggests that gqrx was designed for use with a remote host and suggests the commands can be sent via the MacOS Terminal window. That is helpful because C++ can send commands to the Terminal window using the "system(command_string);" statement, and therefore, seemingly could be used to send commands to gqrx.
According to the example at the link referenced above, the first command to send is a Bash "telnet" statement.
Unfortunately, MacOS Terminal scripts have changed. In about 2018 Apple removed telnet from the Bash commands. Then in 2019 the default scripting language was changed from Bash to zsh. One can still reach the Bash commands by temporarily changing the default scripting language but telnet is no longer available.
I wonder if anyone has figured out a work-around.
My previous post was looking for an alternative to telnet to communicate with the Gqrx server.
The post referenced https://gqrx.dk/doc/remote-control and pointed out that telnet is no longer available in Terminal.
Some responses suggested downloading telnet and that remains an option. Apparently the telnet command was removed because it lacked security. The existence of other ways to accomplish the same connection suggests those options have sufficient security.
In my search for alternatives, I found that the Mac system includes two alternatives.
They are:
Netcat using the short version, “nc”, and
ssh
While both are supposed to provide the solution, I have not been able to get them to work.
The responses I am getting from these two commands may be similar to what I would get from telnet. I say this because the telnet example, at the link shown above, shows how to establish a connection, but does not show how to enter the “f” parameter and get a response.
Below are my tests of those two Terminal functions.
USING THE NETCAT FUNCTION
The first use of the nc function tests for a connection and finds one.
The Terminal text is …
nc –vz 127.0.0.1 7356
and the final returned value is “succeeded!”
=== Begin Text from Terminal Screen
Last login: Mon May 9 15:16:34 on ttys000
[Computer ID goes here]$ nc -vz 127.0.0.1 7356
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif lo0
src 127.0.0.1 port 49229
dst 127.0.0.1 port 7356
rank info not available
TCP aux info available
Connection to 127.0.0.1 port 7356 [tcp/*] succeeded!
=== End of Text from Terminal Screen
Using the Netcat Small “L” Flag
Next is the nc command with a flag that tells it to listen to the port, followed by my entry of the small “f” to ask Gqrx for the frequency. The “-l” flag is a small “L”
=== Begin Text from Terminal Screen
[Computer ID goes here]$ nc -l 127.0.0.1 7356
f
=== End of Text from Terminal Screen
After the “f” was entered, there was no response from Gqrx.
USING THE SSH FUNCTION
The ssh function appears to be much simpler. It is entered as
ssh –p 7358 127.0.0.1
The –p specifies that the port number follows, and that is followed by the IP address.
Again, there is a pause while Terminal appears to be listening.
When I enter “f”, there is no response.
So the question now is, how do I get the Gqrx server commands from Terminal to Gqrx, and how do I return the values that are supposed to be provided as shown in the Gqrx documentation at:
--
You received this message because you are subscribed to a topic in the Google Groups "Gqrx SDR" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gqrx/hJprzkOkM4k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gqrx+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/8538be2a-7749-41b1-8b48-d3d2c0a23100n%40googlegroups.com.