Hey Gabriel,
I saw your messages in the #pothos, but you always signed off before I
work up. Timezones I guess :-)
You are right about needed an automated test message generator. I
actually made a simple one for the Lora demo for this exact purpose.
TestGen.cpp:
https://github.com/myriadrf/LoRa-SDR#lora-sdr-project
And I opened up an issue for a more general test generator:
https://github.com/pothosware/pothos-blocks/issues/40
On 07/04/2016 08:06 AM, Gabriel Laupre wrote:
> Hello,
>
> I am struggling trying to send a packet from a binary file, adding labels
> and using Frame Insert/Sync blocks.
>
> Tx Part
>
>
> <
https://lh3.googleusercontent.com/-4mDTyIiC9TY/V3p4E4W8ysI/AAAAAAAABWc/yXGw8Z8w3Dk3IFMjH5sFZFP_veEu0jwDgCLcB/s1600/Tx.png>
>
>
Basically, the frame insert block is looking for labels called "frameS"
and "frameE" that inform to insert synchronisation symbols. My intention
is that an upstream block would supply these labels at the correct position.
My original use-case involved a chat box which generates a packet with
payload ascii text. And a packet to stream block which would apply these
labels. If you take a closer look at the packet to stream block, there
is a parameter to specify both of these start and end labels.
If you want to supply bytes from a file, the only way that I can think
of to get the labels applied is to use file source -> stream to packet
-> bytes to symbols -> packet to stream. Because I don't there is a
block that forwards a stream and applies labels at a regular intervals.
One could be made...
>
> Rx Part
>
>
> <
https://lh3.googleusercontent.com/-HyyjfchyFlk/V3p4rcnfw3I/AAAAAAAABWg/9umE0OteFxkEfhWzwhidpL1I4ypWSqCoQCLcB/s1600/Rx.png>
>
Its sort of the same thing here is reverse. The frame sync has an option
to specify start and end labels. You can supply these same labels to the
stream to packet block. That way the block knows where the bounds are
located. So do check out the label options in both of these blocks as well.
>
> My last two plotters don't show anything as the Frame Sync doesn't
> intercept any preamble.
>
> <
https://lh3.googleusercontent.com/-gcrRsZ_PT-0/V3p6KHOR2sI/AAAAAAAABWw/hSfJrJ8WyU48TO_B_ikpPYMzwpvLmF0BwCLcB/s1600/Plotter.png>
>
>
> The issue I have is that if I don't activate the "Auto Rewind" option in
> the Binary File Source, I don't see anything in my plotters. But when I
> enable that option, the "Frame Insert" block seems not to work as I have an
> infinite stream with only one preamble, sent at the very beginning.
I have seen this happen. Its probably an initialization race where the
file source activates and produces the entire file before the downstream
blocks have been activated.
It might help to take a look at the gateway block controlled by a radio
widget or something. That way its possible to start and stop the stream
from the file source with a gui control after everything is started.
>
> How can I do to generate the stream X times per seconds (from the binary
> file) with the preamble from the Frame Insert block for each stream?
>
I'm sure the test message generator will help here. But you might also
be able to use the pacer to get regular messages from the file.
file source -> stream to packet -> pacer -> bytes to symbols...
The pacer can be set to allow only one message per second (for example)
and that will make it easier to debug with.
>
> I am also trying to add Labels using the "Stream to Packet" and "Packet to
> Steam" blocks but I can't make them work. I am not sure but, can we make
> working the Frame Sync block without labels in the data steam?
>
I hope the comments above helped. Its probably an issue of matching
label names.
Keep in mind there is more than one right way to do things. These blocks
were made to demo some basic comms ideas using streams, and packets, and
labels, and various display widgets.
I standardized around using a stream with labels and the blocks that go
between. But it could just as easily be implemented like this lora demo
which doesn’t use decorated streams. Everything is a packet until you
get to the lora mod block:
https://myriadrf.org/blog/lora-modem-limesdr/
Anyway, hope that all makes sense.
Let me know if I can clarify something,
-josh