alexlee188 / ghpsdr3-alex

Modifications of John Melton's ghpsdr3
GNU General Public License v3.0
64 stars 38 forks source link

Add --address option to dspserver #28

Closed g0hww closed 9 years ago

g0hww commented 9 years ago

Add --address option to dspserver, enabling multiple instances to be run on the same host, by binding to the specifed address only. The default remains as 0.0.0.0,

frohro commented 9 years ago

Hi Darren, et. al.,

I'm not sure if this is redundant or not, but I have a branch on github (ghpsdr3-alex) called specify-ports that will allow you to specify the base-ports for hpsdr-server and dspserver so that you can have several radios all connected to the same computer that is doing the hpsdr-server and dspserver functions. Is this redundant?

Thanks & 73,

Rob KL7NA

On 01/11/2015 04:38 AM, Darren Long wrote:

Add --address option to dspserver, enabling multiple instances to be run on the same host, by binding to the specifed address only. The default remains as 0.0.0.0,


    You can merge this Pull Request by running

git pull https://github.com/g0hww/ghpsdr3-alex master

Or view, comment on, or merge it at:

https://github.com/alexlee188/ghpsdr3-alex/pull/28

    Commit Summary

— Reply to this email directly or view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/pull/28.

Rob Frohne, PhD, PE Professor EF Cross School of Engineering Walla Walla University 100 SW 4th Street College Place, WA 99324 (509) 527-2075

g0hww commented 9 years ago

Hmm. Good question. I wanted to be able to run fcdpp-server/dspserver/QtRadio and kx3-server/dspserver/QtRadio on the same host, but found that the $RIG-servers and dspservers would, as written, bind to 0.0.0.0 and use fixed port numbers, effectively precluding multiple instances from being run.

My initial thought was to differentiate instances by port numbers, but it seemed that would only leave me with the problem of needing to specify the IP address and port number of the dspserver that an instance of QtRadio should connect to. That seemed like a little too much work and I worried about the need to elaborate the Quick Server List in QtRadio and the online server list and causing widespread mayhem.

I figured that an easy solution would be to bind the servers to a different IP addresses and leave everything else alone. I could:

sudo ifconfig lo:0 127.0.0.2 netmask 255.0.0.0 up

and run one set of servers on the lo address (127.0.0.1) and another on lo:0 (127.0.0.2). Or, I suppose I could bind one set of servers to eth0 address and another to the lo address. Then one of the dspserver's could have port forwarding through the NAT router if desired.

I think your approach is less whacky, but has wider ramifications and requires more effort. That said, I don't see why both solutions can't be applied to the master branch, if they will merge, as fundamentally they are orthogonal Some may want to specify the address of their $RIG-server and dspserver instances for reasons other than the ability to run multiple instances. Also, I've only elaborated fcdpp-server and kx3-server to allow the address to be specified, so most bets are off with other $RIG-servers at this time.

My solution may work for you if hpsdr-server can be easily tweaked to take an IP address argument. The tweaks to QtRadio in my fork will let you run multiple QtRadios on the same host with distinct user specified rigctl ports.

I asked in sdr-widget before starting my hacking spree if my plan was sane , but I didn't get any input. I'm fairly new around here and quite unfamiliar with the codebase so I don't want to tread on any toes or interfere with long term plans.

Cheers, 73

Darren, G0HWW

On 12/01/15 03:07, Rob Frohne wrote:

Hi Darren, et. al.,

I'm not sure if this is redundant or not, but I have a branch on github (ghpsdr3-alex) called specify-ports that will allow you to specify the base-ports for hpsdr-server and dspserver so that you can have several radios all connected to the same computer that is doing the hpsdr-server and dspserver functions. Is this redundant?

Thanks & 73,

Rob KL7NA

On 01/11/2015 04:38 AM, Darren Long wrote:

Add --address option to dspserver, enabling multiple instances to be run on the same host, by binding to the specifed address only. The default remains as 0.0.0.0,


You can merge this Pull Request by running

git pull https://github.com/g0hww/ghpsdr3-alex master

Or view, comment on, or merge it at:

https://github.com/alexlee188/ghpsdr3-alex/pull/28

Commit Summary

  • Modified dspserver to take optional --address argument, so multiple dspserver instances can bind to the same port
  • Make --address option default to any address, i.e. 0.0.0.0 instead of 127.0.0.1

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/pull/28.

Rob Frohne, PhD, PE Professor EF Cross School of Engineering Walla Walla University 100 SW 4th Street College Place, WA 99324 (509) 527-2075

— Reply to this email directly or view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/pull/28#issuecomment-69525958.