discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr-ctrlport and multiple applications


From: Alexandru Csete
Subject: Re: [Discuss-gnuradio] gr-ctrlport and multiple applications
Date: Thu, 16 May 2013 22:47:26 +0200

On Wed, May 15, 2013 at 7:01 PM, Tom Rondeau <address@hidden> wrote:
> On Wed, May 15, 2013 at 9:42 AM, Alexandru Csete <address@hidden> wrote:
>> Greetings,
>>
>> Today, we can configure gr-ctrlport to use a specific port. Doing so
>> leads to a problem when trying to execute more than one gnuradio
>> application even if they are not explicitly using controlport. The
>> first application will take control of the network socket and the
>> second will fail to start with:
>>
>> RuntimeError: Network.cpp:1104: Ice::SocketException:
>> socket exception: Address already in use
>>
>> According to Ice documentation, I can specify a different
>> configuration file for each application using ICE_CONFIG environment,
>> but this seems to be overruled by the gnuradio runtime.
>>
>> Is there a way to configure controlport so that application A uses one
>> port, application B uses another port, etc.?
>>
>> Is it possible to disable controlport at runtime?
>>
>> Alex
>
> You can configure ControlPort through the preference files and set
> enable/disable in ~/.gnuradio/config.conf using:
>
> [ControlPort]
> on = True
>
> The 'config' option allows you to point to an ICE configuration file,
> where you can define endpoints. One thing here is that you don't need
> to set a port number for your endpoint, at which point it will select
> an ephemeral port for you for each ControlPort app that's launched.
> You can also not use a configuration file, and in this case, again, it
> will find an open ephemeral port and enable it on all current
> interfaces.
>
> For programmatic control over if ControlPort is enabled/disabled in
> your application, you can set the environmental variable. In Python, I
> do it this way:
>
>   os.environ['GR_CONF_CONTROLPORT_ON'] = 'True' (or 'False')
>
> The environmental variables will override any settings in config.conf
> or the installed gnuradio-runtime.conf settings and are checked every
> time you query the preferences.
>
> You should also be able to use:
>
>   gr.prefs().set_string('ControlPort', 'On', 'False')
>
> I'm not sure if how we have it set up allows you to easily set
> different endpoints to different apps. Like I said, you can not
> specify the port, and it will select one for you. But if you want to
> control this for many different applications, maybe the best way is to
> set the GR_CONF_CONTROLPORT_CONFIG variable (or with the
> set_string('ControlPort', 'Config', 'FILENAME') method) for each
> application to point to your different ICE config files.
>

Hi Tom,

Thanks for the info. I tried setting GR_CONF_CONTROLPORT_ON and it
works just fine.
I will also try GR_CONF_CONTROLPORT_CONFIG later.

Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]