Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-09 Thread Barry Duggan

Hi Ali,

I suggest you take a look at the top level functions to get a 
perspective of your overall plan. I am guessing that it would look 
something like this:

A  your C program which outputs text ->
B. Text stream or message ->
C. Input to SDR
D. Whatever GR functions you need
E. Output to USB, audio, etc

You might consider writing your C program as an OOT source block for 
your flowgraph. That way you won't have a problem getting the text to 
the next block. You might not even need the text per se, depending on 
what you want to do with it next (encoding, packets, etc.).


Some of the others might want to offer their thoughts as well.

Cheers!
---
Barry Duggan


On 2019-10-08 23:06, ali mokdad wrote:

Hi,

Thanks for you,

At the end, I want to write a separate application, for example a c
language program, then each data i send from this application i want
it to be an input to the gnuradio flowgraph then using this flowgraph
i want to transmit this data.

The connection between this application and gnuradio, i suggest to be
a unix pipe instead of tcp or udp socket. Therefore, as a beginning
test i was trying the previous test between $ cat > in and message
debug in gnuradio.

What you suggest to do and which one is better.

Thanks for your time.

Best wishes


On Oct 8, 2019, at 9:21 PM, Barry Duggan  wrote:

Hi Ali,

I am trying to get an idea of what you really want to accomplish. If 
it is simply to get text input to your flowgraph, there are several 
choices, but all of them that I have found buffer a line at a time 
(ending with return / enter). I have had similar issues. Here are two 
choices:


1) Use file input from /dev/stdin (The terminal screen).
2) Use a Message Edit block. If you want to do this one, I can give 
you more information. (Thanks to Volker Schroer for his help on that).


If there is more to what you want to accomplish, maybe you can restate 
your goal.


We're here to help.
--
Barry Duggan

P.S. Use 'Reply All' to get this into the discussion thread.


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-09 Thread ali mokdad
Hi, 

Thanks for you,

At the end, I want to write a separate application, for example a c language 
program, then each data i send from this application i want it to be an input 
to the gnuradio flowgraph then using this flowgraph i want to transmit this 
data.

The connection between this application and gnuradio, i suggest to be a unix 
pipe instead of tcp or udp socket. Therefore, as a beginning test i was trying 
the previous test between $ cat > in and message debug in gnuradio.

What you suggest to do and which one is better. 

Thanks for your time.

Best wishes 

> On Oct 8, 2019, at 9:21 PM, Barry Duggan  wrote:
> 
> Hi Ali,
> 
> I am trying to get an idea of what you really want to accomplish. If it is 
> simply to get text input to your flowgraph, there are several choices, but 
> all of them that I have found buffer a line at a time (ending with return / 
> enter). I have had similar issues. Here are two choices:
> 
> 1) Use file input from /dev/stdin (The terminal screen).
> 2) Use a Message Edit block. If you want to do this one, I can give you more 
> information. (Thanks to Volker Schroer for his help on that).
> 
> If there is more to what you want to accomplish, maybe you can restate your 
> goal.
> 
> We're here to help.
> -- 
> Barry Duggan
> 
> P.S. Use 'Reply All' to get this into the discussion thread.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-08 Thread Barry Duggan

Hi Ali,

I am trying to get an idea of what you really want to accomplish. If it 
is simply to get text input to your flowgraph, there are several 
choices, but all of them that I have found buffer a line at a time 
(ending with return / enter). I have had similar issues. Here are two 
choices:


1) Use file input from /dev/stdin (The terminal screen).
2) Use a Message Edit block. If you want to do this one, I can give you 
more information. (Thanks to Volker Schroer for his help on that).


If there is more to what you want to accomplish, maybe you can restate 
your goal.


We're here to help.
--
Barry Duggan

P.S. Use 'Reply All' to get this into the discussion thread.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-08 Thread Volker Schroer

Hi,

I just tried a very simple example:

file source(in ) -> File sink (/dev/stdout )

As long as I feed a few characters to the fifo, nothing happens on the
flowgraph side.

Finishing the cat command by ctrl-d or ctrl-c leads to

attachthread[thread-per-block[0]: ]: fread error

But if I write a lot of characters to the fifo
For instance the COPYING file of gnuradio I get a lot of output, but not
the whole file.


The gnuradio scheduler does not process the input byte by byte, but it
collects the input and distributes it to the different blocks.

So you must provide enough input before you see some output.

-- Volker

Am 08.10.19 um 08:07 schrieb ali mokdad:

Dear all

Moreover,

as I mentioned before no data is transmitted in the following case
1- $ mkfifo in
2-: $ cat > in
3- gnuradio : file source (in)  --> stream to tagged stream --> throttle -->
tagged stream to pdu --> message debug
till I press ctrl c, where in file source repeat in no.

if repeat is yes then I have the following error
[/build/gnuradio-BBYmSv/gnuradio-3.7.11/gr-blocks/lib/file_source_impl.cc]
fseek failed

can anyone inform me what is the problem?

Best regards

On Tue, Oct 8, 2019 at 8:00 AM ali mokdad mailto:aa.mokdad...@gmail.com>> wrote:

Dear

thx for your reply

even by using stdbuf  the problem remains the same
$ stdbuf -i 0 -o 0 cat > in

I think the problem must be solved from gnuradio because if I run
two terminals in
first terminal: $ cat > in
second terminal: $ cat in
then whatever I write in the first terminal is sent to the second
terminal after pressing enter.

while
if instead of the second terminal I used gnuradio with the following
flowgraph
in gnuradio : file source (in)  --> stream to tagged stream -->
throttle -->
tagged stream to pdu --> message debug

the data are not sent till I press ctrl c.

thanks again for your help, but my problem is not solved if there is
any one can help me

Best regards




Virus-free. www.avast.com





<#m_6056736687892377648_m_1211741247935538308_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Oct 7, 2019 at 7:06 PM mailto:discuss-gnuradio-requ...@gnu.org>> wrote:

Send Discuss-gnuradio mailing list submissions to
discuss-gnuradio@gnu.org 

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
or, via email, send a message with subject or body 'help' to
discuss-gnuradio-requ...@gnu.org


You can reach the person managing the list at
discuss-gnuradio-ow...@gnu.org


When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss-gnuradio digest..."


Today's Topics:

    1. fifo / file source (ali mokdad)
    2. Re: fifo / file source (Müller)
    3. Re: fifo / file source (ali mokdad)
    4. Re: fifo / file source (N. Benes)


--

Message: 1
Date: Mon, 7 Oct 2019 13:41:47 +0300
From: ali mokdad mailto:aa.mokdad...@gmail.com>>
To: discuss-gnuradio@gnu.org 
Subject: [Discuss-gnuradio] fifo / file source
Message-ID:

mailto:cacn2bhndhnwhkddjfojnm1pgps%2bnrhdudm7zyeaa6abptke...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Dear all

I tested the following

1- in terminal, I created a fifo file by: mkfifo in
2- in terminal, I run: cat > in
3- in gnuradio i run : file source (in)  --> stream to tagged
stream -->
tagged stream to pdu --> message debug
4- in terminal, I write and press enter nothing is sent, only if
I press
ctrl c the all the data written in the terminal are sent to the
message
debug.

How can I solve this problem?
-- next part --
An HTML attachment was scrubbed...
URL:



--

Message: 2
Date: Mon, 7 Oct 2019 11:11:52 +
From: Müller, Marcus (CEL) mailto:muel...@kit.edu>>
To: "discuss-gnuradio@gnu.org "
mailto:discuss-gnuradio@gnu.org>>,
         "aa.mokdad...@gmail.com
" mailto:aa.mokdad...@gmail.com>>
Subject: Re: 

Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-08 Thread ali mokdad
Dear all

Moreover,

as I mentioned before no data is transmitted in the following case
1- $ mkfifo in
2-: $ cat > in
3- gnuradio : file source (in)  --> stream to tagged stream --> throttle -->
tagged stream to pdu --> message debug
till I press ctrl c, where in file source repeat in no.

if repeat is yes then I have the following error
[/build/gnuradio-BBYmSv/gnuradio-3.7.11/gr-blocks/lib/file_source_impl.cc]
fseek failed

can anyone inform me what is the problem?

Best regards

On Tue, Oct 8, 2019 at 8:00 AM ali mokdad  wrote:

> Dear
>
> thx for your reply
>
> even by using  stdbuf  the problem remains the same
> $ stdbuf -i 0 -o 0 cat > in
>
> I think the problem must be solved from gnuradio because if I run two
> terminals in
> first terminal: $ cat > in
> second terminal: $ cat in
> then whatever I write in the first terminal is sent to the second terminal
> after pressing enter.
>
> while
> if instead of the second terminal I used gnuradio with the following
> flowgraph
> in gnuradio : file source (in)  --> stream to tagged stream --> throttle
> -->
> tagged stream to pdu --> message debug
>
> the data are not sent till I press ctrl c.
>
> thanks again for your help, but my problem is not solved if there is any
> one can help me
>
> Best regards
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_6056736687892377648_m_1211741247935538308_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Mon, Oct 7, 2019 at 7:06 PM  wrote:
>
>> Send Discuss-gnuradio mailing list submissions to
>> discuss-gnuradio@gnu.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>> or, via email, send a message with subject or body 'help' to
>> discuss-gnuradio-requ...@gnu.org
>>
>> You can reach the person managing the list at
>> discuss-gnuradio-ow...@gnu.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Discuss-gnuradio digest..."
>>
>>
>> Today's Topics:
>>
>>1. fifo / file source (ali mokdad)
>>2. Re: fifo / file source (Müller)
>>3. Re: fifo / file source (ali mokdad)
>>4. Re: fifo / file source (N. Benes)
>>
>>
>> --
>>
>> Message: 1
>> Date: Mon, 7 Oct 2019 13:41:47 +0300
>> From: ali mokdad 
>> To: discuss-gnuradio@gnu.org
>> Subject: [Discuss-gnuradio] fifo / file source
>> Message-ID:
>> <
>> cacn2bhndhnwhkddjfojnm1pgps+nrhdudm7zyeaa6abptke...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Dear all
>>
>> I tested the following
>>
>> 1- in terminal, I created a fifo file by: mkfifo in
>> 2- in terminal, I run: cat > in
>> 3- in gnuradio i run : file source (in)  --> stream to tagged stream -->
>> tagged stream to pdu --> message debug
>> 4- in terminal, I write and press enter nothing is sent, only if I press
>> ctrl c the all the data written in the terminal are sent to the message
>> debug.
>>
>> How can I solve this problem?
>> -- next part --
>> An HTML attachment was scrubbed...
>> URL: <
>> https://lists.gnu.org/archive/html/discuss-gnuradio/attachments/20191007/c17ad733/attachment.html
>> >
>>
>> --
>>
>> Message: 2
>> Date: Mon, 7 Oct 2019 11:11:52 +
>> From: Müller, Marcus (CEL) 
>> To: "discuss-gnuradio@gnu.org" ,
>> "aa.mokdad...@gmail.com" 
>> Subject: Re: [Discuss-gnuradio] fifo / file source
>> Message-ID: <5878b0c98107f9bf6ef01c5853d135ab80888ef5.ca...@kit.edu>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi Ali,
>>
>> it's not quite certain which program you run in that terminal, but:
>> File I/O is usually buffered, and this sounds like the data is never
>> written to your FIFO before you exit your terminal program.
>>
>> Solution: Use a terminal program that doesn't buffer or flushes
>> regularly.
>>
>> Best regards,
>> Marcus
>>
>> On Mon, 2019-10-07 at 13:41 +0300, ali mokdad wrote:
>> > Dear all
>> >
>> > I tested the following
>> >
>> > 1- in terminal, I created a fifo file by: mkfifo in
>> > 2- in terminal, I run: cat > in
>> > 3- in gnuradio i run : file source (in)  --> stream to tagged stream
>> --> tagged stream to pdu --> message debug
>> > 4- in terminal, I write and press enter nothing is sent, only if I
>> press ctrl c the all the data written in the terminal are sent to the
>> message debug.
>> >
>> > How can I solve this problem?
>> >
>> >
>> >
>> > ___
>> > Discuss-gnuradio mailing list
>> > Discuss-gnuradio@gnu.org
>> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>> -- next part --
>> A non-text attachment was scrubbed...
>> Name: smime.p7s
>> Type: 

Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 204, Issue 6

2019-10-07 Thread ali mokdad
Dear

thx for your reply

even by using  stdbuf  the problem remains the same
$ stdbuf -i 0 -o 0 cat > in

I think the problem must be solved from gnuradio because if I run two
terminals in
first terminal: $ cat > in
second terminal: $ cat in
then whatever I write in the first terminal is sent to the second terminal
after pressing enter.

while
if instead of the second terminal I used gnuradio with the following
flowgraph
in gnuradio : file source (in)  --> stream to tagged stream --> throttle -->
tagged stream to pdu --> message debug

the data are not sent till I press ctrl c.

thanks again for your help, but my problem is not solved if there is any
one can help me

Best regards



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Oct 7, 2019 at 7:06 PM  wrote:

> Send Discuss-gnuradio mailing list submissions to
> discuss-gnuradio@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> or, via email, send a message with subject or body 'help' to
> discuss-gnuradio-requ...@gnu.org
>
> You can reach the person managing the list at
> discuss-gnuradio-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Discuss-gnuradio digest..."
>
>
> Today's Topics:
>
>1. fifo / file source (ali mokdad)
>2. Re: fifo / file source (Müller)
>3. Re: fifo / file source (ali mokdad)
>4. Re: fifo / file source (N. Benes)
>
>
> --
>
> Message: 1
> Date: Mon, 7 Oct 2019 13:41:47 +0300
> From: ali mokdad 
> To: discuss-gnuradio@gnu.org
> Subject: [Discuss-gnuradio] fifo / file source
> Message-ID:
> <
> cacn2bhndhnwhkddjfojnm1pgps+nrhdudm7zyeaa6abptke...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear all
>
> I tested the following
>
> 1- in terminal, I created a fifo file by: mkfifo in
> 2- in terminal, I run: cat > in
> 3- in gnuradio i run : file source (in)  --> stream to tagged stream -->
> tagged stream to pdu --> message debug
> 4- in terminal, I write and press enter nothing is sent, only if I press
> ctrl c the all the data written in the terminal are sent to the message
> debug.
>
> How can I solve this problem?
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.gnu.org/archive/html/discuss-gnuradio/attachments/20191007/c17ad733/attachment.html
> >
>
> --
>
> Message: 2
> Date: Mon, 7 Oct 2019 11:11:52 +
> From: Müller, Marcus (CEL) 
> To: "discuss-gnuradio@gnu.org" ,
> "aa.mokdad...@gmail.com" 
> Subject: Re: [Discuss-gnuradio] fifo / file source
> Message-ID: <5878b0c98107f9bf6ef01c5853d135ab80888ef5.ca...@kit.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Ali,
>
> it's not quite certain which program you run in that terminal, but:
> File I/O is usually buffered, and this sounds like the data is never
> written to your FIFO before you exit your terminal program.
>
> Solution: Use a terminal program that doesn't buffer or flushes
> regularly.
>
> Best regards,
> Marcus
>
> On Mon, 2019-10-07 at 13:41 +0300, ali mokdad wrote:
> > Dear all
> >
> > I tested the following
> >
> > 1- in terminal, I created a fifo file by: mkfifo in
> > 2- in terminal, I run: cat > in
> > 3- in gnuradio i run : file source (in)  --> stream to tagged stream -->
> tagged stream to pdu --> message debug
> > 4- in terminal, I write and press enter nothing is sent, only if I press
> ctrl c the all the data written in the terminal are sent to the message
> debug.
> >
> > How can I solve this problem?
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> -- next part --
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/x-pkcs7-signature
> Size: 6582 bytes
> Desc: not available
> URL: <
> https://lists.gnu.org/archive/html/discuss-gnuradio/attachments/20191007/5f1b0f0b/attachment.bin
> >
>
> --
>
> Message: 3
> Date: Mon, 7 Oct 2019 14:34:49 +0300
> From: ali mokdad 
> To: Müller, Marcus (CEL) , discuss-gnuradio@gnu.org
> Subject: Re: [Discuss-gnuradio] fifo / file source
> Message-ID:
>  4ejotfeztrft+prmezezlew0kwh8-rdigy3ou83k...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Thx for your reply
>
> "it's not quite certain which program you run in that terminal"
> I just wrote cat > in
> even I run a .c file in the .c file I opened a file and the data are not
> sent only when I close the file.
> do you