[Discuss-gnuradio] Problem trying to implement Reed Solomon encoder

2008-11-21 Thread Alvaro Palomo
Hello,

I'm trying to create a GNU Radio block that carries out a Reed Solomon
coding based on the functions provided into the
directory /gnuradio-core/src/lib/reed-solomon.

As an example I have taken the block gr_encode_ccsds_27 that can be
found in the directory /gnuradio-core/src/lib/general since it uses the
functions implemented in /gnuradio-core/src/lib/viterbi.

Basically the aspect of my gr_rs_encoder_vbb.cc file is the following:

#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include gr_rs_encoder_vbb.h
#include gr_io_signature.h

extern C {
#include ../reed-solomon/fixed.h
}

gr_rs_encoder_vbb_sptr 
gr_make_rs_encoder_vbb()
{
  return gr_rs_encoder_vbb_sptr(new gr_rs_encoder_vbb());
}

gr_rs_encoder_vbb::gr_rs_encoder_vbb()
  : gr_sync_block(rs_encoder_vbb,
 gr_make_io_signature(1, 1, (223)*sizeof(char)),
 gr_make_io_signature(1, 1, 255*sizeof(char)))
{
}

gr_rs_encoder_vbb::~gr_rs_encoder_vbb()
{
}

int 
gr_rs_encoder_vbb::work(int noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items)
{
  const unsigned char *in = (const unsigned char *)input_items[0];
  unsigned char *out = (unsigned char *)output_items[0];
  
  for (int i = 0; i  noutput_items; i++)
  {
unsigned char *temp_first_element = out;
for (int j = 0; j  (223); j++)
*out++ = *in++;
ENCODE_RS(temp_first_element,--out);
  }

  return noutput_items;
}

I include the file fixed.h since I want to use the implementation of the
CCSDS standard (255,223).

When I execute make into the main folder of GNU Radio for compiling
everything I get the following ERROR message:

/bin/bash ../../../libtool --tag=CXX   --mode=link g++ -g -O2 -Wall
-Woverloaded-virtual -pthread   -o benchmark_dotprod_fff
benchmark_dotprod_fff.o 
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/libgnuradio-core.la 
libtool: link: g++ -g -O2 -Wall -Woverloaded-virtual -pthread
-o .libs/benchmark_dotprod_fff
benchmark_dotprod_fff.o  
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/.libs/libgnuradio-core.so
 /home/apalomo/software/gnuradio-3.1.3/omnithread/.libs/libgromnithread.so -lrt 
/usr/lib/libfftw3f.so -lm -pthread
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/.libs/libgnuradio-core.so:
 undefined reference to `encode_rs_8'
collect2: ld returned 1 exit status
make[4]: *** [benchmark_dotprod_fff] Error 1
make[4]: Leaving directory
`/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/tests'
make[3]: *** [all-recursive] Error 1

It looks like I'm missing to include another file somewhere, but I have
no idea where.

Have anybody tried to implement this yet or anybody knows how I could
fix it?

Thank you very much.

Best regards.

Alvaro Palomo




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


[Discuss-gnuradio] exploring samples by scanning

2008-11-21 Thread Nathaniel Haggard
To explore this large sample of spectrum it would be nice to scan
through it using the ssb demodulator.

To implement a scanner in python it seems like I need an incrementing
block, but I don't see one of those.

By scanning I mean:
1. if break squelch then play until squelched or keypress
2. increment frequency
3. goto 1


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


Re: [Discuss-gnuradio] Problem trying to implement Reed Solomon encoder

2008-11-21 Thread stevie.glass

Hi,

Your problem is because you are not *linking* with the Reed/Solomon 
library.


The problem is that you've wrapped the '#include fixed.h' inside an 
'extern C' block.


If you remove it then you'll be one step closer to getting it working.

Is mise,

Stevie


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


[Discuss-gnuradio] USRP harware problem?

2008-11-21 Thread yyzhuang

we have 2 usrp boxes. 1 now doesn't work, only 2 works. we use 3 steps to
check if it is the hardware problem:

step 1) recognized by linux?

on good box:
lsusb
Bus 007 Device 001: ID : 
Bus 005 Device 001: ID : 
Bus 004 Device 001: ID : 
Bus 003 Device 001: ID : 
Bus 001 Device 004: ID 413c:3012 Dell Computer Corp.
Bus 001 Device 003: ID 413c:2003 Dell Computer Corp.
Bus 001 Device 001: ID : 
Bus 006 Device 012: ID fffe:0002 
Bus 006 Device 001: ID : 
Bus 002 Device 001: ID : 
on bad box:
lsusb
Bus 007 Device 001: ID : 
Bus 005 Device 001: ID : 
Bus 004 Device 001: ID : 
Bus 003 Device 001: ID : 
Bus 001 Device 004: ID 413c:3012 Dell Computer Corp.
Bus 001 Device 003: ID 413c:2003 Dell Computer Corp.
Bus 001 Device 001: ID : 
Bus 006 Device 013: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013
EZ-USB FX2 USB 2.0 Development Kit
Bus 006 Device 001: ID : 
Bus 002 Device 001: ID :

seems bad box is recognized??
-- 
View this message in context: 
http://www.nabble.com/USRP-harware-problem--tp20629596p20629596.html
Sent from the GnuRadio mailing list archive at Nabble.com.



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


Re: [Discuss-gnuradio] USRP harware problem?

2008-11-21 Thread yyzhuang

step 2) proper device driver loaded and device entry created in /dev ?

good box:
/dev/bus/usb$ ls -l
total 0
drwxr-xr-x 2 root root 100 2008-11-14 17:04 001
drwxr-xr-x 2 root root  60 2008-11-14 17:04 002
drwxr-xr-x 2 root root  60 2008-11-14 17:04 003
drwxr-xr-x 2 root root  60 2008-11-14 17:04 004
drwxr-xr-x 2 root root  60 2008-11-14 17:04 005
drwxr-xr-x 2 root root  80 2008-11-21 12:59 006
drwxr-xr-x 2 root root  60 2008-11-14 17:04 007

bad box:
/dev/bus/usb$ ls -l
total 0
drwxr-xr-x 2 root root 100 2008-11-14 17:04 001
drwxr-xr-x 2 root root  60 2008-11-14 17:04 002
drwxr-xr-x 2 root root  60 2008-11-14 17:04 003
drwxr-xr-x 2 root root  60 2008-11-14 17:04 004
drwxr-xr-x 2 root root  60 2008-11-14 17:04 005
drwxr-xr-x 2 root root  80 2008-11-21 13:00 006
drwxr-xr-x 2 root root  60 2008-11-14 17:04 007
-- 
View this message in context: 
http://www.nabble.com/USRP-harware-problem--tp20629596p20629620.html
Sent from the GnuRadio mailing list archive at Nabble.com.



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


Re: [Discuss-gnuradio] USRP harware problem?

2008-11-21 Thread yyzhuang

step 3) the control software access the device entry correctly?

good box
/gnuradio/gnuradio/gnuradio-examples/python/usrp$ ./usrp_benchmark_usb.py
Testing 2MB/sec... usb_throughput = 2M
ntotal= 100
nright= 999452
runlength = 999452
delta = 548
OK
Testing 4MB/sec... usb_throughput = 4M
ntotal= 200
nright= 1999583
runlength = 1999583
delta = 417
OK
Testing 8MB/sec... usb_throughput = 8M
ntotal= 400
nright= 3998943
runlength = 3998943
delta = 1057
OK
Testing 16MB/sec... usb_throughput = 16M
ntotal= 800
nright= 7999584
runlength = 7999584
delta = 416
OK
Testing 32MB/sec... usb_throughput = 32M
ntotal= 1600
nright= 15998150
runlength = 15998150
delta = 1850
OK
Max USB/USRP throughput = 32MB/sec 

bad box:
/gnuradio/gnuradio/gnuradio-examples/python/usrp$ ./usrp_benchmark_usb.py
Testing 2MB/sec... Traceback (most recent call last):
  File ./usrp_benchmark_usb.py, line 106, in module
main ()
  File ./usrp_benchmark_usb.py, line 96, in main
ok = run_test (rate, verbose)
  File ./usrp_benchmark_usb.py, line 63, in run_test
usrp_tx = usrp.sink_s (0, tx_interp)
  File /usr/local/lib/python2.5/site-packages/gnuradio/usrp.py, line 228,
in __init__
_ensure_rev2(which)
  File /usr/local/lib/python2.5/site-packages/gnuradio/usrp.py, line 83,
in _ensure_rev2
v = _look_for_usrp(which)
  File /usr/local/lib/python2.5/site-packages/gnuradio/usrp.py, line 77,
in _look_for_usrp
raise RuntimeError, Unable to find USRP #%d % (which,)
RuntimeError: Unable to find USRP #0



can anybody help us out? thanks a lot!
-- 
View this message in context: 
http://www.nabble.com/USRP-harware-problem--tp20629596p20629647.html
Sent from the GnuRadio mailing list archive at Nabble.com.



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