[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Getting values from external program.

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Getting values from external program.
Date: Wed, 12 Oct 2016 14:36:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Hi Jeon,

Your use case is not what you'd use controlport for; I think you've got it right: use modtool to create a sync block, but set its number of in- and outputs to zero; override the start() method to spawn a new thread that contains a function which has a loop that executes the external command, publishes a message, and repeat.

Anyway, your requirement:

> One condition is, I need to retrieve contents from "hcitool clock" as fast as the system (GNU Radio) can.

conflicts with the idea of message passing – message passing doesn't allow backpressure, so you'll just flood the message receiver's message input, and that would be useless.

What do you want to do with that data? If it's something that makes sense to be understood as stream of samples, go for the classical GNU Radio source block and write the data to the output stream.

Best regards,


On 12.10.2016 14:16, Jeon wrote:
Just get to the point.

I have a Bluetooth dongle connected to my PC. I can read a MAC address and internal clock value by typing `hcitool dev` and `hcitool clock` in command line. You can see demo in link below:

What I want is to make GNU Radio get those values/contents.

Currently, I've planned to make a source block expressed in pseudocode:

    work(args) {
        file_pointer = popen("hcitool dev"); // or "hcitool clock"
        buf = read(fp);
        val = some_char_array_manipulation(buf);

Recently, I found that ControlPort can bridge GNU Radio and other programs. Well, however, I am new to ControlPort (just used for PerfMonitor) and seems more complicated than the pseudocode above.

Which would you recommend? One condition is, I need to retrieve contents from "hcitool clock" as fast as the system (GNU Radio) can.


Discuss-gnuradio mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]