-
Notifications
You must be signed in to change notification settings - Fork 481
OpenwebRX and ZMQ approach #100
Comments
What does this output?
|
Hi András
is like netcat for ZMQ. I got it from https://github.com/zacharyvoase/zmqc Also I am testing with GNURadio models from CSDR library in particular with test_fft_grc.grc: I got this output, with the expected behavior: I got this output but the behavior is unexpected: I really don`t know why is a different behavior with the GNURadio ZMQ-SUB block and the ZMQC-SUB from the console. |
What is the data type of the output of
|
OK, I checked the output data with this small python program: from gnuradio import analog
from gnuradio import blocks
from gnuradio import gr
from gnuradio import zeromq
import zmq
import array
socket_str = "tcp://127.0.0.1:5557"
def zmq_consumer():
context = zmq.Context()
results_receiver = context.socket(zmq.PULL)
results_receiver.connect(socket_str)
while True:
# pull in raw binary data
raw_data = results_receiver.recv()
print raw_data
# convert to an array of floats
#float_list = array.array('f', raw_data) # struct.unpack will be faster
# print flowgraph data
#for signal_val in float_list:
# print signal_val
# build simple flowgraph that outputs a repeating ramp from 0 to 1
class simple_flowgraph(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
samp_rate = 4000 #32000.0
# generate repeating ramp from 0 to 1
self.analog_sig_source_x_0 = analog.sig_source_f(
samp_rate,
analog.GR_SAW_WAVE,
1e3,
1,
0)
self.blocks_throttle_0 = blocks.throttle(
gr.sizeof_float*1,
samp_rate,
True)
self.zeromq_push_sink_0 = zeromq.push_sink(gr.sizeof_float,
1,
socket_str,
100,
False,
-1)
self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_float * 1, '/tmp/osmocom_fifo', False)
##################################################
# Connections
##################################################
self.connect(
(self.analog_sig_source_x_0, 0),
(self.blocks_throttle_0, 0)
)
self.connect(
(self.blocks_throttle_0, 0),
(self.zeromq_push_sink_0, 0)
)
self.connect((self.blocks_throttle_0, 0), (self.blocks_file_sink_0, 0))
# instantiate and start the flowgraph
flowgraph = simple_flowgraph()
flowgraph.start()
# start the receiver socket
zmq_consumer() It is a GNURadio flowgraph with a signal source connected to a FIFO and to ZMQ PUSH Sink block. If you execute the code |
Hi, I'm trying to use OpenwebRX wih GNURadio and ZMQ PUB/SUB. My goal is to replace FIFO and all the TCP stuff for ZMQ . In my first approach I add the ZMQ PUB SINK block with address 'ipc:///tmp/fifo-pipe' to the flowgraph in GNURadio-Companion keeping the FIFO (GNURadio File sink block).
Then in csdr.py changed the variable
any_chain_base = "nc -v 127.0.0.1 {nc_port} | "
forany_chain_base = "zmqc SUB -rc 'ipc:///tmp/fifo-pipe' | "
Execute openwebrx.py and all I get in the browser is a white screen in FFT getting network usage, server CPU and all others status variables.
Any ideas?
The text was updated successfully, but these errors were encountered: