How to hexdump in gnuradio realtime

Hi guys,

First of all my apologies for my bad English. I am a Dutch student and
for a internship I use GNURadio.

For test purposes I want to show the hexadecimals values of a stream of
chars realtime (while running).
I don’t want to use ‘printf’ in the c-code of a block because sometimes
it messes up the order of printing.

What I want to use is some kind of terminal what shows the hexadecimals
values.
In GNURadio I saw a block named terminal sink, but I couldn’t figure out
how to use it.

My question is as follows: Is there any way to show hexadecimal numbers
in some kind of terminal realtime?

Hopefully you understand my question and know an answer.

Best regards,
Nimsi

On Thu, May 26, 2011 at 07:55:33AM +0000, nimsi stouwdam wrote:

What I want to use is some kind of terminal what shows the hexadecimals values.
In GNURadio I saw a block named terminal sink, but I couldn’t figure out how to
use it.

My question is as follows: Is there any way to show hexadecimal numbers in some
kind of terminal realtime?

Hopefully you understand my question and know an answer.

I’m not sure… you want to print the hex values of chars, but not on
the same output as your regular stdout?
Try this:

  • Make a new block that converts chars to ASCII-hex (e.g. w/ sprintf)
  • Connect that block to a gr_file_sink (or a gr_file_descriptor_sink),
    and write to a file (or a named pipe).
  • When the flowgraph is running, open a separate xterm, and in there, do
    a ‘tail -f FILENAME’ (or ‘cat PIPENAME’).

The file approach will create a massive big text file, but perhaps you
want that.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

Hi,

Thank you for the fast reply. I will try what you suggested.
I will let you know if it worked.

regards
Nimsi

Date: Thu, 26 May 2011 11:12:51 +0200
From: [email protected]
To: [email protected]
Subject: Re: [Discuss-gnuradio] How to hexdump in gnuradio realtime

On Thu, May 26, 2011 at 07:55:33AM +0000, nimsi stouwdam wrote:

What I want to use is some kind of terminal what shows the hexadecimals values.
In GNURadio I saw a block named terminal sink, but I couldn’t figure out how to
use it.

My question is as follows: Is there any way to show hexadecimal numbers in some
kind of terminal realtime?

Hopefully you understand my question and know an answer.

I’m not sure… you want to print the hex values of chars, but not on
the same output as your regular stdout?
Try this:

  • Make a new block that converts chars to ASCII-hex (e.g. w/ sprintf)
  • Connect that block to a gr_file_sink (or a gr_file_descriptor_sink),
    and write to a file (or a named pipe).
  • When the flowgraph is running, open a separate xterm, and in there, do
    a ‘tail -f FILENAME’ (or ‘cat PIPENAME’).

The file approach will create a massive big text file, but perhaps you
want that.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstrae 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Wrttemberg and
National Laboratory of the Helmholtz Association

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs