discuss-gnuradio
[Top][All Lists]
Advanced

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

GNU Radio web API


From: Steven Gillies
Subject: GNU Radio web API
Date: Wed, 24 Jun 2020 14:49:22 +0000

Hello everyone,

I am trying to build a web API to start and stop flowgraphs remotely and autonomously.

I am having trouble gracefully shutting down one flowgraph and moving on to the next.

My preferred way implement the services is by running top_block.start() from my main thread and allowing it to start its own thread. To shut it down I then call top_block.stop() followed by top_block.wait(). The threads appear to shut down gracefully but when I try to run another flowgraph (either the same flowgraph again or a different one) I start to get errors.

The two error types I get are either;
  1. that the second flowgraph cannot find the USRP device because it is being held by the first ($ uhd_find_devices also returns 'No Devices Found' until I exit the main thread at which point it finds my B210 again), or
  2. that a socket that the second wants to bind to is in use by the first
All threads I create are daemon threads, but since the main thread doesn't shut down in my software then I guess that's irrelevant while my code is running.

Are there any examples of how to programmatically teardown flowgraphs so that they free all resources?

Or ways that I can manually free up resources from outside of the top_block, for instance using the uhd library.

Im using GNU Radio 3.7, UHD 3.14 and the USRPs we use are Ettus UHD B210s.

Any help appreciated,


Steven

reply via email to

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