# Clean remote kill of python flowgraph

**URL:** <https://www.ruby-forum.com/t/clean-remote-kill-of-python-flowgraph/220975>\
**Category:** GNU Radio\
**Created:** [June 27, 2012, 12:59am UTC](https://www.ruby-forum.com/t/clean-remote-kill-of-python-flowgraph/220975 "2012-06-27T00:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [June 27, 2012, 12:59am UTC](https://www.ruby-forum.com/t/clean-remote-kill-of-python-flowgraph/220975/1 "2012-06-27T00:59:17Z")

</div>

Hi all,

I would like to be able to remotely terminate a running Python-only  
flowgraph (no GRC). I basically set up the XMLRPC server to call  
“stop()” and “wait()” on the flowgraph object instance, but it leaves  
the USRP LO up. I would like the radio to be torn down completely.

Looking at gr\_uhd\_usrp\_sink, it appears that the “stop” method overrides  
gr\_top\_block’s by sending an end-of-burst message to UHD, but apparently  
this isn’t doing the trick. Any advice?

Thanks,  
Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [June 27, 2012, 1:08am UTC](https://www.ruby-forum.com/t/clean-remote-kill-of-python-flowgraph/220975/2 "2012-06-27T01:08:38Z")

</div>

On 06/26/2012 03:58 PM, Nowlan, Sean wrote:

> Hi all,
> 
> I would like to be able to remotely terminate a running Python-only  
> flowgraph (no GRC). I basically set up the XMLRPC server to call  
> “stop()” and “wait()” on the flowgraph object instance, but it leaves  
> the USRP LO up. I would like the radio to be torn down completely.

You need to make the source/sink object go out of scope. Disconnect it  
and assign all references to None. That tends to encourage the python GC  
to delete.

> Looking at gr\_uhd\_usrp\_sink, it appears that the “stop” method  
> overrides gr\_top\_block’s by sending an end-of-burst message to UHD,  
> but apparently this isn’t doing the trick. Any advice?

There is this unimplemented feature coming to mind. The user selects the  
frontend specification (deselects it actually) such that the software  
knows SBX frontend isnt mapped to any DSP channels and it gets shutdown  
by the software.

-josh
