The ZMQ pub sink and sub source pass tags transparently (when enabled).
Have you tested your system without ZMQ?

Maybe you're looking to send data from a Python script outside of GNU
Radio? When tags are enabled, they are encoded using PMT serialization and
added in before any data to be sent. The code to format the headers, if
that's what you're interested in, is in gr-zeromoq/lib/tag_headers.cc.

On Wed, May 24, 2023 at 1:06 PM Conner Awald <connerraw...@gmail.com> wrote:

> I'm trying to develop a flow graph for a system that will support
> half-duplex communications. I'm using an Ettus X300 and gnuradio 3.10.6. I
> want to set up a python script that will take in data packets from users
> and then send them over to the flowgraph for transmission using a zmq-PUB
> connection. The system should be in receive mode until a message is sent to
> the ZMQ Sub Source, at which point the UHD: USRP Source should be active
> and transmit the message before going back into RX mode. I have a basic
> version of the flowgraph working but the USRP source is reporting 1
> underflow on every packet because it's expecting a constant stream of
> samples and stopping when it doesn't get it  (I think). I looked into the
> documentation here https://wiki.gnuradio.org/index.php/USRP_Sink and it
> seems like I will need to add "tx_sob" and "tx_eob" tags to the stream to
> let the USRP know that this is a burst transmission with a limited amount
> of samples available.
>
> The tutorial on ZMQ blocks (
> https://wiki.gnuradio.org/index.php/Understanding_ZMQ_Blocks) for
> gnuradio says the following about tags "Next, if sending tags is enabled,
> any tags within the window of the data to be sent are encoded in a special
> format and prepended to the payload data. If tags are not enabled, this
> header is elided."
>
> Is there any more information or an example of how I can manually tag the
> incoming data stream in my python script and then send that over the ZMQ
> PUB-SUB connection? The tutorial mentions a "special format", what exactly
> is that? I looked through the examples in the gr-zeromq but it doesn't seem
> like those deal with adding or modifying tags in a ZMQ stream.
>
> - Conner
>

Reply via email to