Have to re-plug Lime Mini Everytime

Perhaps someone can help.
I have below simple python script that works fine so far, but I always have to plug/unplug the Lime Mini to make it run properly, otherwise, the filter doesn’t set (GFIR LPF cannot be set to the requested bandwith…)

Any suggestion?

#!/usr/bin/env python3

-- coding: utf-8 --

from gnuradio import analog
from gnuradio import filter
from gnuradio.filter import firdes
from gnuradio import gr
import sys
from gnuradio.eng_arg import eng_float, intx
import limesdr
import time

class noise_source(gr.top_block):

def __init__(self):
    gr.top_block.__init__(self, "")
    ##################################################
    # Variables
    ##################################################
    self.sample_rate = sample_rate = 32000
    self.gain = gain = 10
    ##################################################
    # Blocks
    ##################################################
    #self.LimeSDR.calibrate(2.5e6, 0)
    self.Noise_Source = analog.noise_source_f(analog.GR_UNIFORM, 1, 0)
    self.LimeSDR = limesdr.sink('', 0, '', '')
    self.LimeSDR.set_sample_rate(sample_rate)
    self.LimeSDR.set_center_freq(500e6, 0)
    self.LimeSDR.set_bandwidth(5e6, 0)
    self.LimeSDR.set_digital_filter(sample_rate, 0)
    self.LimeSDR.set_gain(gain, 0)
    self.LimeSDR.set_antenna(255, 0)
    self.band_pass_filter_1 = filter.fir_filter_fcc(1,firdes.complex_band_pass(1,sample_rate,300,3500,50,firdes.WIN_HAMMING,6.76))

    ##################################################
    # Connections
    ##################################################
    self.connect((self.Noise_Source, 0), (self.band_pass_filter_1, 0))
    self.connect((self.band_pass_filter_1, 0), (self.LimeSDR, 0))

def set_sample_rate(self, sample_rate):
    self.sample_rate = sample_rate
    self.band_pass_filter_1.set_taps(firdes.complex_band_pass(1, self.sample_rate, 200, 3500, 50, firdes.WIN_HAMMING, 6.76))

def set_gain(self, gain):
    self.gain = gain
    self.LimeSDR.set_gain(self.gain, 0)

def main(gnu_block=noise_source):

gb = gnu_block()
gb.start()

for gain in range(10,73,2):
    print (gain)
    gb.set_gain(gain)
    time.sleep(1)
gb.stop()
sys.exit()

if name == ‘main’:
main()

What O/S and version etc?

Linux 5.4.0-54-generic x86_64

NAME=“Ubuntu”
VERSION=“20.04.1 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 20.04.1 LTS”
VERSION_ID=“20.04”

GNU Radio Companion 3.8.2.0

Python 3.8.5

Thanks, just wanted to check as ISTR an issue like this with OS X.

@Zack, anything to suggest?