Funcube Dongle source block for GNU Radio

Greetings,

There is now a working GNU Radio block for the Funcube Dongle which
encapsulates the audio input and the USB HID control interface into
one source block with a complex I/Q output stream (similar to the USRP
and UHD sources). It uses the new audio architecture, therefore it
requires gnuradio-core and gnuradio-audio from git. It is implemented
as a C++ hier_block and is available to both C++, Python and GRC
applications.

Project page: https://www.cgran.org/wiki/FuncubeDongle
Source code: GitHub - csete/gr-fcd: This repository is obsolete since gr-fcd is now included in GNU Radio.

I invite people to take a look even if they don’t have a Funcube
Dongle; it is my first GNU Radio block and I have probably messed a
few things up. Feedback is welcome.

Currently only the linux/libusb version works. The source files for
Mac and Windows HID API are there too, I just have to figure out what
to do in the Makefile.am to make it use different file on different
OS.

Alex

On Mon, Apr 18, 2011 at 11:06 AM, Alexandru C. [email protected]
wrote:

Project page: https://www.cgran.org/wiki/FuncubeDongle

Alex

Great job, Alex! Thanks!

Tom

Hi Alex,

Thanks for the fantastic job on gr-FCD, it works beautifully on Ubuntu
11.04
x64.

Now I am trying to get it to work on my Mac but have an issue with
‘make’.
Does the following error instantly ring any bells for you?

ms-MacBook-Pro:gr-fcd m$ make
make all-recursive
Making all in config
make all-am
make[3]: Nothing to be done for `all-am’.
Making all in lib
make all-am
/bin/sh …/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I…
-I/Users/m/mycode/gnuradio/csete/gr-fcd/lib
-I/usr/local/include/gnuradio
-I/usr/local/include/gnuradio/swig
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-D_THREAD_SAFE -I/opt/local/include -I/usr/local/include/gnuradio
-I/usr/local/include -I/opt/local/include/libusb-1.0 -g -O2 -MT
hid-libusb.lo -MD -MP -MF .deps/hid-libusb.Tpo -c -o hid-libusb.lo
hid-libusb.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I…
-I/Users/m/mycode/gnuradio/csete/gr-fcd/lib
-I/usr/local/include/gnuradio
-I/usr/local/include/gnuradio/swig
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-D_THREAD_SAFE -I/opt/local/include -I/usr/local/include/gnuradio
-I/usr/local/include -I/opt/local/include/libusb-1.0 -g -O2 -MT
hid-libusb.lo -MD -MP -MF .deps/hid-libusb.Tpo -c hid-libusb.c
-fno-common
-DPIC -o .libs/hid-libusb.o
hid-libusb.c:98: error: expected specifier-qualifier-list before
pthread_barrier_t
hid-libusb.c: In function new_hid_device:
hid-libusb.c:123: error: hid_device has no member named shutdown_thread
hid-libusb.c:124: error: hid_device has no member named transfer
hid-libusb.c:125: error: hid_device has no member named input_reports
hid-libusb.c:129: error: hid_device has no member named barrier
hid-libusb.c: In function free_hid_device:
hid-libusb.c:137: error: hid_device has no member named barrier
hid-libusb.c: In function get_usb_string:
hid-libusb.c:361: warning: assignment makes pointer from integer without
a
cast
hid-libusb.c: In function read_callback:
hid-libusb.c:610: error: hid_device has no member named input_reports
hid-libusb.c:612: error: hid_device has no member named input_reports
hid-libusb.c:617: error: hid_device has no member named input_reports
hid-libusb.c:635: error: hid_device has no member named shutdown_thread
hid-libusb.c:639: error: hid_device has no member named shutdown_thread
hid-libusb.c: In function read_thread:
hid-libusb.c:662: error: hid_device has no member named transfer
hid-libusb.c:663: error: hid_device has no member named transfer
hid-libusb.c:674: error: hid_device has no member named transfer
hid-libusb.c:677: error: hid_device has no member named barrier
hid-libusb.c:680: error: hid_device has no member named shutdown_thread
hid-libusb.c:695: error: hid_device has no member named transfer
hid-libusb.c: In function hid_open_path:
hid-libusb.c:822: error: hid_device has no member named barrier
hid-libusb.c: In function return_data:
hid-libusb.c:903: error: hid_device has no member named input_reports
hid-libusb.c:907: error: hid_device has no member named input_reports
hid-libusb.c: In function hid_read:
hid-libusb.c:928: error: hid_device has no member named input_reports
hid-libusb.c:934: error: hid_device has no member named shutdown_thread
hid-libusb.c: In function hid_close:
hid-libusb.c:1030: error: hid_device has no member named shutdown_thread
hid-libusb.c:1031: error: hid_device has no member named transfer
hid-libusb.c:1037: error: hid_device has no member named transfer
hid-libusb.c:1038: error: hid_device has no member named transfer
hid-libusb.c:1048: error: hid_device has no member named input_reports
make[3]: *** [hid-libusb.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
ms-MacBook-Pro:gr-fcd m$

Cheers,

Mike
M0MIK

On 21/07/2011 9:12 AM, Mike J. wrote:

Making all in config
hid-libusb.lo -MD -MP -MF .deps/hid-libusb.Tpo -c -o hid-libusb.lo
pthread_barrier_t
without a cast
hid-libusb.c:663: error: hid_device has no member named transfer
hid-libusb.c: In function hid_read:
make[3]: *** [hid-libusb.lo] Error 1

My guess is that the libusb on MacOS is quite different than what the
gr-fcd source code is expecting. I’m not sure which
API for libusb that gr-fcd uses, but clearly, it’s not one that’s
compatible with the MacOS libusb.

On Thu, Jul 21, 2011 at 3:12 PM, Mike J. [email protected]
wrote:

Hi Alex,

Thanks for the fantastic job on gr-FCD, it works beautifully on Ubuntu 11.04
x64.

Now I am trying to get it to work on my Mac but have an issue with ‘make’.
Does the following error instantly ring any bells for you?

Hi Mike,

I only made it work on Linux, but only because lack of time and I
didn’t have GNU Radio on Mac or windows. The control code is the same
as in qthid and should therefore work on all platforms.

On linux gr-fcd uses libusb-1.0 but on Mac and Windows it is supposed
to use native IO libs.

To make it work on Mac, the lib/Makefile.am has to be updated to
compile hidmac.c instead of hid-libusb.c
The same on windows: should compile hidwin.c instead of hid-libusb.c
(note that all three use the same interface hidapi.h)

Also, the libusb dependency can be removed on Mac and windows. On the
other hand one needs to link to the corresponding native IO libs on
Mac and windows, see qthid.pro lines 48-50:

Alex

Hi Alex,

Thanks for that, by changing to ‘hidmac.c’ it now compiles fine.

Unfortunately, I am now getting a segmentation fault wen I run your grc
NBFM
receiver :frowning:

I’ll have a deeper look when I get time.

Cheers,

Mike
M0MIK