# INFO: Detected an invalid packet at item INFO: Parser returned #f

**URL:** <https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993>\
**Category:** GNU Radio\
**Created:** [January 29, 2015, 1:38pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993 "2015-01-29T13:38:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 29, 2015, 1:38pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/1 "2015-01-29T13:38:46Z")

</div>

Hi all:  
Thank you in advance.I have searched the question"INFO:  
Detected an invalid packet at item INFO: Parser returned #f".  
The answer may be “RF settings are distorting your signal” or others.I  
want to ask a question.Which block in gnuradio give us this hint.Where  
is the source code of the block?And have someone can help me to explain  
this problem more details?Why will have this error/warning?  
Thank you.  
Best regards,  
zs

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 29, 2015, 1:45pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/2 "2015-01-29T13:45:38Z")

</div>

Hi,

On 01/29/2015 01:03 PM, zs wrote:

> Detected an invalid packet at item INFO: Parser returned #f".  
> The answer may be “RF settings are distorting your signal” or others.I  
> want to ask a question.Which block in gnuradio give us this hint.Where  
> is the source code of the block?And have someone can help me to explain  
> this problem more details?Why will have this error/warning?

~/src/gnuradio \>\> ack-grep -C 3 “an invalid packet”  
gr-digital/lib/packet\_headerparser\_b\_impl.cc  
80- );  
81-  
82- if (!d\_header\_formatter-\>header\_parser(in, tags)) {  
83: GR\_LOG\_INFO(d\_logger, boost::format(“Detected an invalid packet at  
item %1%”) % nitems\_read(0));  
84- message\_port\_pub(msg\_port\_id, pmt::PMT\_F);  
85- } else {  
86- pmt::pmt\_t dict(pmt::make\_dict());

I guess your packet header is corrupt.

Best,  
Bastian

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 29, 2015, 3:45pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/3 "2015-01-29T15:45:38Z")

</div>

Hi Bastian:  
Thank you so much for your kindly reply.Can you tell  
me,for general,in which circumstance,the packet header maybe corrupt?  
Thank you so much.  
Best regards,  
zs

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 29, 2015, 5:44pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/4 "2015-01-29T17:44:37Z")

</div>

Hi,

On 01/29/2015 03:13 PM, zs wrote:

> Can you tell me,for general,in which circumstance,the packet header maybe  
> corrupt?

This is very hard to tell since I don’t know what you are doing. I guess  
you use a header\_formatter in your flow graph and (for whatever reason)  
its header\_parse method returns false.

For example with the default header it looks like this happens if the  
CRC is not correct

> <https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_header_default.cc#L132>

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 30, 2015, 2:03pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/5 "2015-01-30T14:03:08Z")

</div>

Hi Bastian:  
Thank you so much.I use the ofdm example,and I think  
maybe the crc is wrong as you said,thank you.  
Can you give me some advices to avoid these  
warning?Thank you so much.

Best regards,  
zs

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 30, 2015, 3:08am UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/6 "2015-01-30T03:08:44Z")

</div>

Hi Bastian:  
Thank you so much.I use the ofdm example,and I think  
maybe the crc is wrong as you said,thank you.  
Best regards,  
zs

---

<div class="post-metadata">

**Author:** ![zszszs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5fc32e/32.png) [@zszszs](https://www.ruby-forum.com/u/zszszs)\
**Post date:** [January 31, 2015, 12:50pm UTC](https://www.ruby-forum.com/t/info-detected-an-invalid-packet-at-item-info-parser-returned-f/233993/7 "2015-01-31T12:50:32Z")

</div>

> On 30 Jan 2015, at 14:00, zs [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> Hi Bastian:  
> Thank you so much.I use the ofdm example,and I think maybe the  
> crc is wrong as you said,thank you.  
> Can you give me some advices to avoid these warning?Thank you  
> so much.

The fact that your CRC is not correct just means that _something_ does  
not work. This can have a lot of reasons. For example you could try  
different gain settings. Also assert that the samples that you stream to  
your USRP are in the interval [-1, 1].

If that doesn’t solve your problem you can debug your flow graph with  
graphical sinks and check if the signal looks as expected.

> > This is very hard to tell since I don’t know what you are doing. I guess
> > 
> > > > > this problem more details?Why will have this error/warning?  
> > > > > 85- } else {

–  
Dipl.-Inform. Bastian B.  
Distributed Embedded Systems Group  
University of Paderborn, Germany

> **[Home](https://www.bastibl.net/)**
>
> I'm Bastian Bloessl, a Research Group Leader at the Secure Mobile Networking Lab, TU Darmstadt. Checkout my blog, projects, publications, and resume; or connect on Github, Twitter, YouTube, or Facebook.
