On Thu, Mar 12, 2009 at 10:01:28AM -0700, yyzhuang wrote:
Hi Eric,
The command line: sudo ./tunnel.py --freq 2.44G --bitrate 500k -v (is
bitrate has something to do with buffer?)
I installed GNU Radio from here: svn co
http://gnuradio.org/svn/gnuradio/branches/releases/3.1 gnuradio
Thanks.
I never had that buffer problem before I moved the 2 boxes to another lab
(from computer science lab to ee lab). Will it because of the higher
interference in the busier channel that caused too many packets being queued
in the buffer, and caused the buffer over flow?
No, the error message most likely indicates an internal error in one
of the blocks. If you can reproduce the problem and can grab a gdb
backtrace when it happens, that would be very helpful in figuring out
which block has the problem.
Here’s how to use gdb with python. Add the code below to the top of
tunnel.py, after all the imports.
Debugging with gdb
If your block isn't working, and you can't sort it out through
python
test cases or a few printfs in the code, you may want to use gdb to
debug it. The trick of course is that all of GNU Radio, including
your
new block, is dynamically loaded into python for execution.
Try this: In your python test code, after the relevant imports,
print
out the process id and wait for a keystroke. In another window run
gdb
and tell it to attach to the python process with the given process
id. At this point you can set breakpoints or whatever in your code.
Go
back to the python window and hit Enter so it’ll continue.
#!/usr/bin/env python
from gnuradio import gr
# insert this in your test code...
import os
print 'Blocked waiting for GDB attach (pid = %d)' % (os.getpid(),)
raw_input ('Press Enter to continue: ')
# remainder of your test code follows...
Eric