discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] embedded-python block for pocsag paging: help request


From: Kristoff
Subject: [Discuss-gnuradio] embedded-python block for pocsag paging: help request by first-time GR programer
Date: Sun, 26 Aug 2018 22:18:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi all,


I just did my first steps developing a embedded-python block for GR: a block to generate the data bitstream for sending pocsag paging messages.

See here: https://github.com/on1arf/gr-pocsag
(.grc-file, just look at the embedded-python block for the python code).

(the rest of the flow-graph is shamelessly stolen from the author of gr-mixalot).



After trying out some code, I managed to get something "kind-of working", but probably not implemented the correct way. Can somebody please help me with a couple of things I do not yet understand:

- Can somebody explain how to implement a source-block using embedded-python? In the code I have now, it is implemented as a sync-block, taking in a signal from a signal-generator block, but that is probably (surely!) not the correct way to do this.


I did notice that the signal-generator blocks that exists in GRC do have a input-port that is greyed-out and not connected. I probably need to implement something simular.

- is it possible to define a variable in a embedded-python block that can only have a predefined number of possible values (e.g. "bitrate" can only be 512, 1200 or 2400, "inverted" can be true or false)?

Or do you allow the user to insert just any value and throw a ValueError in the python block if the value is not correct?

- How do you interface your embedded-python code with variables that change during run-time? (e.g. a variable mapped to a GUI slider).
How does the embedded-python program known when a variable has changed?

- Basically, a pocsag paging-message is a packet, not a continuous stream.
It is possible to create a source-block that creates a stream of a limited length and then stop the execution of the graph?
(so, in essence, a GRC


Also, I've found a couple of presentations online concerning stream-tags.
Are there any examples of how to use the stream-tags API inside a embedded-python block?

- Anycase, (not strickly speaking not GR-related) ... how do you actually switch a hackRF between RX and TX mode?


Thanks in advance for any help.

Kristoff - ON1ARF






reply via email to

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