Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PIHPSDR TCP support #290

Closed
wants to merge 1 commit into from
Closed

Added PIHPSDR TCP support #290

wants to merge 1 commit into from

Conversation

g0orx
Copy link

@g0orx g0orx commented Jun 10, 2020

I noticed that the current version of PIHPSDR does not support connection via TCP/IP. I am not sure when this changed as the original version I has TCP/IP support only.

I have made some changes to add a TCP rig_cap to pihpsdr.c and and added an additional model RIG_MODEL_HPSDR_TCP.

-- John Melton g0orx/n6lyt

@mdblack98
Copy link
Contributor

mdblack98 commented Jun 10, 2020 via email

@g0orx
Copy link
Author

g0orx commented Jun 10, 2020 via email

@mdblack98
Copy link
Contributor

mdblack98 commented Jun 10, 2020 via email

@dl1ycf
Copy link
Contributor

dl1ycf commented Jun 11, 2020

The point is, that pihpsdr can do both TCP and serial. In this case, one must choose the model as "Serial" and hamlib then automatically falls back to TCP if the "port" is either of the form "a.b.c.d:e" or of the form ":e". Note that "localhost:e" does not work.

This is a limitation of hamlib: a serial rig can fall back to TCP but a TCP rig cannot do serial.

Note further, that recent changes in piHPSDR make an increased time-out in the pihpsdr rig model necessary (see my pending pull request).

Yours DL1YCF.

@mdblack98
Copy link
Contributor

mdblack98 commented Jun 11, 2020 via email

@mdblack98
Copy link
Contributor

mdblack98 commented Jun 11, 2020 via email

@dl1ycf
Copy link
Contributor

dl1ycf commented Jun 12, 2020

What John's solution is after is to allow "input boxes" such as "localhost:19090" . The current hamlib "serial to TCP" fallback mechanism cannot cope with that.

So in the current situation if put into the input box (that is, the string in rigport.pathname)

/dev/ttyUSB0 ==> hamlib will try to open serial port (fine)
:19090 ==> hamlib will try to open TCP (fine)
192.168.1.50:19090 ==> hamlib will try to open TCP (fine)
localhost:19090 ==> hamlib will try to open serial port (BAD).

The problem is that until recently, the last option worked when the piHPSDR backend was still TCP-only, so some users might get frustrated why things don't work that used to work.

Alternative:

Of course one could consider an improved "fallback" mechanism in src/rig.c (line 636ff) which falls back to TCP also in the case we have in the input box (aka rigport.pathname) strings like

localhost:19090
my.machine.com:19090

This then would also apply to all other "serial rigs" which are connected via TCP so other users might benefit as well (I know that TS-2000 is frequently used over TCP).
Please check this, but to me It seems this would solve the problem addressed by John and at the same time eliminate the headache (new machine model) of Mike so might be worth considering.

mdblack98 added a commit that referenced this pull request Jun 12, 2020
…type

network_open still does not recognize valid IPV6 addresses yet
#290
@mdblack98
Copy link
Contributor

Other fixes preclude the need for this. TCP connections now work on all rigs.

@mdblack98 mdblack98 closed this Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants