Re: [Discuss-gnuradio] How i can implement this python block
Thank you Marcus , Are you have any suggestion for header header_formatter maximum payload length problem ? 0X0FFF or 4095 is very small . I use Header/Payload Demux in this configuration : attached image . With header_formatter payload size limit i just send and receive packets whit maximum size of 4095 bit which is very small . i use TUNTAP and it need at least packet with size of 1 bit . Are there any useful frame synchronization method in gnu radio ? ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
;) Welcome to the wonderful world of open source, where we can ask you to fix that header_formatter and submit your changes so that they become available in future versions! On 09/08/2017 08:05 PM, mohammad nejati wrote: > Thank you Marcus , > I change line number 139 of file es_event.cc from this : > > memset(output_items[j], 0x00, noutput_items*itemsize); > > To this : > > int i; > for (i = 0; i < noutput_items; i++) { > memset((char*)output_items[j]+i, rand(), 1); > } > > And it's works . > > > But i have one unexpected problem , i use header_formatter and > unfortunately it work only when packet length is under 0x0FFF or 4095 > ! OOPS ... > > On Fri, Sep 8, 2017 at 6:49 PM, Marcus Müllerwrote: >> Hi Mohammad, >> >> >> On 09/08/2017 03:57 PM, mohammad nejati wrote: >> >> I need to insert random bit (to satisfy scrambling too) whenever there's no >> input packet . >> >> so, just edit the es_source to not zero out the buffers but fill them with >> what you want – either simply in the source code of the eventstream source, >> or, more elegantly, by adding an optional stream input to the es_source from >> which you copy into the output buffer instead of filling it with zeros! >> >> I'd, again, strongly recommend not trying to reinvent the wheel, but making >> small changes where necessary. >> >> Best regards, >> Marcus > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
Thank you Marcus , I change line number 139 of file es_event.cc from this : memset(output_items[j], 0x00, noutput_items*itemsize); To this : int i; for (i = 0; i < noutput_items; i++) { memset((char*)output_items[j]+i, rand(), 1); } And it's works . But i have one unexpected problem , i use header_formatter and unfortunately it work only when packet length is under 0x0FFF or 4095 ! OOPS ... On Fri, Sep 8, 2017 at 6:49 PM, Marcus Müllerwrote: > Hi Mohammad, > > > On 09/08/2017 03:57 PM, mohammad nejati wrote: > > I need to insert random bit (to satisfy scrambling too) whenever there's no > input packet . > > so, just edit the es_source to not zero out the buffers but fill them with > what you want – either simply in the source code of the eventstream source, > or, more elegantly, by adding an optional stream input to the es_source from > which you copy into the output buffer instead of filling it with zeros! > > I'd, again, strongly recommend not trying to reinvent the wheel, but making > small changes where necessary. > > Best regards, > Marcus ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
Hi Mohammad, On 09/08/2017 03:57 PM, mohammad nejati wrote: I need to insert random bit (to satisfy scrambling too) whenever there's no input packet . so, just edit the es_source to not zero out the buffers but fill them with what you want – either simply in the source code of the eventstream source, or, more elegantly, by adding an optional stream input to the es_source from which you copy into the output buffer instead of filling it with zeros! I'd, again, strongly recommend not trying to reinvent the wheel, but making small changes where necessary. Best regards, Marcus ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
I need to insert random bit (to satisfy scrambling too) whenever there's no input packet . ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
I don't understand – gr-eventstream inserts zeros whenever there's no input packet. Its purpose is exactly what you describe, as far as I can tell! On 09/08/2017 03:20 PM, mohammad nejati wrote: Hi Marcus ,thank you for your reply . gr-eventstream just insert zero to output and can't be useful in this case , i need something like this block : https://github.com/drmpeg/gr-mpe In gr-mpe block if there are no packet in TUNTAP it produce null packet to satisfy output rate , i need do same sing in python block . Are there any documentation available for doing some thing similar with python blocks ? Is that even possible ? ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
Hi Marcus ,thank you for your reply . gr-eventstream just insert zero to output and can't be useful in this case , i need something like this block : https://github.com/drmpeg/gr-mpe In gr-mpe block if there are no packet in TUNTAP it produce null packet to satisfy output rate , i need do same sing in python block . Are there any documentation available for doing some thing similar with python blocks ? Is that even possible ? ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] How i can implement this python block
Hi Mohammad, what you decribe as use case very well matches what gr-eventstream does! So, no need to invent such a block (it's generally non-trivial to do so, as the GNU Radio scheduler as is will only call your block if either there's new input or new output space). Best regards, Marcus On 09/08/2017 01:05 PM, mohammad nejati wrote: Hi , I need one block that connect input port 0 to output if there are items on that and if there are no items then connect input port 1 to output , my idea is never stop qam modulator even when there are no packet in input (TUNTAP PDU) , in other word i want fill the time gaps between packets with random bits , in receiver side i will find my packets with correlating access code without problem . I attached an image of grc flow graph that shows what i mean . I don't want implement a bursty transceiver which is quite complicated . I want implement this block with python but i have no idea of how i can start and what type of block i need , i search internet but didn't find useful guide . i just implemented python sync block so far . Cheers . ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio