[Top][All Lists]

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

Re: [Discuss-gnuradio] Question about Benchmark_rx.py file code

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Question about Benchmark_rx.py file code
Date: Wed, 19 Mar 2008 23:24:32 +0000
User-agent: Thunderbird (Windows/20080213)

Eric Blossom wrote:
On Wed, Mar 19, 2008 at 06:02:17PM -0400, address@hidden wrote:
The application occasionally crashes on line 66 in the benchmark
file, the line is "(pktno,) = struct.unpack('!H', payload[0:2])".? The error I get is that struct.unpack should be passed a string of
at least size 2

That means that the code is being handed a string of length < 2 bytes.

Not getting the bug after your changes was probably coincidental. I've seen this happen on occasion when a packet is receive erroneously and the header is corrupted. The framer state machine looks for the repeated packet length after correlating with the access code. What's probably happening is the header is being read in as double 0's, so it passes on a packet of length zero. When unpacking, Python is throwing an exception.

The right thing to do here is catch the exception and mark it as a missed packet.


reply via email to

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