Gnuradio on FreeBSD 8.x

I still can’t grok this:

I build UHD from the latest git clone.

Plug in the USRP1 last running on GnuRadio 3.2.2 and dmesg shows:
ugen4.2: at usbus4 (i.e. loaded with old
firmware)

Run uhd_find_devices

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH
D_003.004.000-1424488

UHD Warning:
Could not locate USRP1 firmware.
Please install the images package.
No UHD Devices Found
uhd_find_devices returned status 255

Using the clues in Marcus’ build-gnuradio script, I install the usrp1
images in {install_prefix}/share/uhd/images/

Run uhd_find_devices again

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH
D_003.004.000-1424488


– UHD Device 0

Device Address:
type: usrp1
name:
serial: 00000000

uhd_find_devices returned status 0

I get the same responses after powering the USRP1 down:
ugen4.2: at usbus4 (disconnected)
ugen4.2: <vendor 0xfffe> at usbus4
ugen4.2: <vendor 0xfffe> at usbus4 (disconnected)
ugen4.2: at usbus4

Seems like uhd_find_devices found a USRP1 but rather than tell me the
current status, it tells me it can’t find the firmware. Since the sdcc
stuff was eliminated in GnuRadio 3.5.0 it seems reasonable for the USRP1
firmware to be put somewhere in the install space. Also seems reasonable
for the USRP2/etc but I don’t have those to test.

Should uhd_find_devices just tell me what it found, including the
current load, or is there some reason to install the firmware?

I think there is more than one possible firmware load for the USRP1.
Will the USRP1 be loaded if I build and run GnuRadio without first
running uhd_find_devices?


LRK
gr-user . ovillatx.sytes.net

On Mon, Jan 16, 2012 at 11:58 AM, LRK [email protected]
wrote:

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];

– UHD Device 0
ugen4.2: at usbus4 (disconnected)
for the USRP2/etc but I don’t have those to test.

Should uhd_find_devices just tell me what it found, including the
current load, or is there some reason to install the firmware?

I think there is more than one possible firmware load for the USRP1.
Will the USRP1 be loaded if I build and run GnuRadio without first
running uhd_find_devices?

I don’t understand the problem. As per the documentation, when you
install
UHD from source, you must also install the images from the appropriate
images package.

UHD loads firmware and FPGA images into the USRP1 at runtime, the first
time the USRP1 is initialized after power-up. USRP2 does not; it
contains
an SD card to hold its images. USRP1 requires firmware to be loaded in
order to act like a USRP, so it needs to have the firmware image
installed
someplace UHD can find it. UHD will handle device initialization – you
don’t need to manually run anything before executing a Gnuradio
flowgraph.

If you want, you can manually specify any firmware/FPGA image you like,
by
passing parameters to UHD:

uhd_find_devices
–args=fpga=/home/you/my_fpga_image.bin,fw=/home/you/my_fw_image.bin

–n

On Mon, 16 Jan 2012 13:58:33 -0600, LRK wrote:

I still can’t
grok this:

I build UHD from the latest git clone.

Plug in the
USRP1 last running on GnuRadio 3.2.2 and dmesg shows:
ugen4.2: at
usbus4 (i.e. loaded with old firmware)

Run uhd_find_devices

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH

D_003.004.000-1424488

UHD Warning:
Could not
locate USRP1 firmware.
Please install the images package.
No UHD
Devices Found
uhd_find_devices returned status 255

Using the
clues in Marcus’ build-gnuradio script, I install the usrp1
images in
{install_prefix}/share/uhd/images/

Run uhd_find_devices again

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH

D_003.004.000-1424488


– UHD Device 0


Device Address:

type: usrp1

name:
serial: 00000000

uhd_find_devices returned
status 0

I get the same responses after powering the USRP1 down:

ugen4.2: at usbus4 (disconnected)

ugen4.2: at usbus4
ugen4.2: at
usbus4 (disconnected)
ugen4.2: at usbus4

Seems like
uhd_find_devices found a USRP1 but rather than tell me the
current
status, it tells me it can’t find the firmware. Since the sdcc
stuff
was eliminated in GnuRadio 3.5.0 it seems reasonable for the USRP1

firmware to be put somewhere in the install space. Also seems
reasonable

for the USRP2/etc but I don’t have those to test.

Should uhd_find_devices just tell me what it found, including the

current load, or is there some reason to install the firmware?

I
think there is more than one possible firmware load for the USRP1.

Will the USRP1 be loaded if I build and run GnuRadio without first

running uhd_find_devices?

The USRP1 absolutely requires that the
firmware be loaded every time it powers up, before it knows it’s a USRP.
Prior to that, the FX2 only knows how to load firmware. This has always
been the case, even in “classic land” for the USRP1. So, USRP1 also
maintained firmware images on the filesystem where it expected to find
them.

UHD keeps these at {prefix} (/usr/local on Linux)
uhd/share/images.

The firmware/FPGA images for USRP1 haven’t changed
in a long time, although there are multiple ones, for different
configurations. For example 8-bit with 16Msps requires the “4rx” image
to be loaded.

What happens if you use:

uhd_usrp_probe --args
“type=usrp1”

??

On Mon, 16 Jan 2012 14:49:20 -0600, LRK wrote:

UHD needs to make
certain that the FPGA image is compatible with the parameters supplied,
so I think and Josh can confirm, that it reloads the FPGA imagee very
time, although it doesn’t reload the FX2 firmware every time.

I wrote
build-gnuradio specifically to help deal with the “I just want to look
at signals” issues that people were having (and because it was very
convenient for me). Nothing stopping someone with *BSD experience and
motivation from doing a build-gnuradio variant for *BSD. But most of the
folks involved in Gnu Radio use a Linux variant, so naturally, Linux is
better supported.

Hardware-specific stuff has been slowly being
decoupled from Gnu Radio for a couple of years. UHD has been around for
that long, and is basically a separate package from Gnu Radio proper.
And within UHD, the pre-built firmware/FPGA images are also separate.
Again, build-gnuradio knows where to get them, and where to install
them–for Ubuntu and Fedora.

Unless there’s a horrible bug in
std::ifstream on FreeBSD, then it really did find that .rbf file where
it claims to have found it, and pushed it down to the USRP1.

On Mon,
Jan 16, 2012 at 03:20:54PM -0500, [email protected] [1] wrote:

The
USRP1 absolutely requires that the
firmware be loaded every time it
powers up, before it knows it’s a USRP.
Prior to that, the FX2 only
knows how to load firmware. This has always
been the case, even in
“classic land” for the USRP1. So, USRP1 also
maintained firmware
images on the filesystem where it expected to find
them.

While
this is true, the USRP1 also did not need to be reloaded every time

unless it was power down. Apparently the 3.2.2 load is not the same as

the one for UHD.

UHD keeps these at {prefix} (/usr/local on
Linux)
uhd/share/images.

Sure, after the GnuRadio user finds and
installs them. I want to look
at signals and munge some bits, not
learn installation intracies.

The firmware/FPGA images for USRP1
haven’t changed
in a long time, although there are multiple ones, for
different
configurations. For example 8-bit with 16Msps requires the
“4rx” image
to be loaded.

So why is the old firmware not okay?
Up until sdcc was ‘upgraded’ to
3.0, the USRP1 firmware was built and
installed by gnuradio. The user
did not have to find anything on
websites or specify the file unless
it was other than the default.

What happens if you use:

uhd_usrp_probe --args
“type=usrp1”

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH
D_003.004.000-1424488

– Opening a USRP1
device…
– Loading FPGA image: /usr/home/gr/gr352/usrp1_fpga.rbf…
done
– Using FPGA clock rate of 64.000000MHz…

Interesting that it claims to have found the .rbf file in a place
where

it does not exist. :slight_smile:

Why does uhd_find_devices install one
file and not the other?

Links:

On 01/16/2012 01:17 PM, [email protected] wrote:

On Mon, 16 Jan 2012 14:49:20 -0600, LRK wrote:

UHD needs to make
certain that the FPGA image is compatible with the parameters supplied,
so I think and Josh can confirm, that it reloads the FPGA imagee very
time, although it doesn’t reload the FX2 firmware every time.

It only reloads images when the hash of the file changes:

https://github.com/EttusResearch/UHD-Mirror/blob/master/host/lib/usrp/common/fx2_ctrl.cpp#L138

https://github.com/EttusResearch/UHD-Mirror/blob/master/host/lib/usrp/common/fx2_ctrl.cpp#L216

-Josh

On Mon, Jan 16, 2012 at 04:17:32PM -0500, [email protected] wrote:

I wrote
build-gnuradio specifically to help deal with the “I just want to look
at signals” issues that people were having (and because it was very
convenient for me). Nothing stopping someone with *BSD experience and
motivation from doing a build-gnuradio variant for *BSD. But most of the
folks involved in Gnu Radio use a Linux variant, so naturally, Linux is
better supported.

As I mentioned before, we appreciate your script and I used it to get
GnuRadio running under Ubuntu. I’m afraid to ‘upgrade’ that since it
might break and it is the only 3.5 version I have working.

If I ever get the FreeBSD script working, it will be available. Also
Diane may make a FreeBSD port (will need uhd and gnuradio tarballs at
some fixed location).

Hardware-specific stuff has been slowly being
decoupled from Gnu Radio for a couple of years. UHD has been around for
that long, and is basically a separate package from Gnu Radio proper.
And within UHD, the pre-built firmware/FPGA images are also separate.
Again, build-gnuradio knows where to get them, and where to install
them–for Ubuntu and Fedora.

And josh has fixed some things to improve that but there are still a few
issues I am trying to isolate.

Unless there’s a horrible bug in
std::ifstream on FreeBSD, then it really did find that .rbf file where
it claims to have found it, and pushed it down to the USRP1.

Hard to understand since the file is NOT there. I think the printed line
is probably different from the actual directory used.


LRK
gr-user . ovillatx.sytes.net

On Mon, Jan 16, 2012 at 03:20:54PM -0500, [email protected] wrote:

The USRP1 absolutely requires that the
firmware be loaded every time it powers up, before it knows it’s a USRP.
Prior to that, the FX2 only knows how to load firmware. This has always
been the case, even in “classic land” for the USRP1. So, USRP1 also
maintained firmware images on the filesystem where it expected to find
them.

While this is true, the USRP1 also did not need to be reloaded every
time
unless it was power down. Apparently the 3.2.2 load is not the same as
the one for UHD.

UHD keeps these at {prefix} (/usr/local on Linux)
uhd/share/images.

Sure, after the GnuRadio user finds and installs them. I want to look
at signals and munge some bits, not learn installation intracies.

The firmware/FPGA images for USRP1 haven’t changed
in a long time, although there are multiple ones, for different
configurations. For example 8-bit with 16Msps requires the “4rx” image
to be loaded.

So why is the old firmware not okay? Up until sdcc was ‘upgraded’ to
3.0, the USRP1 firmware was built and installed by gnuradio. The user
did not have to find anything on websites or specify the file unless
it was other than the default.

What happens if you use:

uhd_usrp_probe --args
“type=usrp1”

FreeBSD 8; GNU C++ version 4.2.2 20070831 prerelease [FreeBSD];
Boost_104500; UH
D_003.004.000-1424488

– Opening a USRP1 device…
– Loading FPGA image: /usr/home/gr/gr352/usrp1_fpga.rbf… done
– Using FPGA clock rate of 64.000000MHz…

Interesting that it claims to have found the .rbf file in a place where
it does not exist. :slight_smile:

Why does uhd_find_devices install one file and not the other?


LRK
gr-user . ovillatx.sytes.net

On 01/16/2012 03:49 PM, LRK wrote:

While this is true, the USRP1 also did not need to be reloaded every time
unless it was power down. Apparently the 3.2.2 load is not the same as
the one for UHD.

I can confirm that the relevant .rbf files are the same between what I
just downloaded via “build-gnuradio firmware”, and what was
shipped with Gnu Radio 3.2.2:

Gnu Radio 3.2.2:

MD5SUM FILE

7744fe9a8fa7b3009d16789fb5309ae8 std_2rxhb_2tx.rbf
953d288b23adbfcc92e6408131480331 std_4rx_0tx.rbf

Fetched via build-gnuradio, installed in /usr/local/share/uhd/images
mere moments ago:

MD5SUM FILE

7744fe9a8fa7b3009d16789fb5309ae8 usrp1_fpga.rbf
953d288b23adbfcc92e6408131480331 usrp1_fpga_4rx.rbf

The filenames are different, but the images are the same.

Pretty sure it’s the same story for the .ihx file that is the USRP1
firmware for the on-board FX2, although it may have been recompiled
under a newer SDCC since Gnu Radio 3.2.2, not sure–in which case,
the .IHX files would almost certainly be different.

When the UHD interface for USRP1 was put together, it was decided not to
make any changes to the platform itself, but rather to have
UHD make the existing interface “work” with UHD, and certain UHD
features are “emulated” for USRP1.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

On Mon, Jan 16, 2012 at 06:35:19PM -0500, Marcus D. Leech wrote:

953d288b23adbfcc92e6408131480331 std_4rx_0tx.rbf
The filenames are different, but the images are the same.
Best I can tell, the clone of UHD contains the std_2rxhb_2tx.rbf and
std_4rx_0tx.rbf file (and others). No .ihx file, though.

Pretty sure it’s the same story for the .ihx file that is the USRP1
firmware for the on-board FX2, although it may have been recompiled
under a newer SDCC since Gnu Radio 3.2.2, not sure–in which case,
the .IHX files would almost certainly be different.

I seems to either be different or UHD can not determine that it is the
same. UHD wants to re-load the USRP1 even when I move the USB connector
from an older machine and dmesg shows it to be loaded with the FX2 code.

Might get re-loaded when moved the other direction but the old code is
not as obvious about it.

When the UHD interface for USRP1 was put together, it was decided not to
make any changes to the platform itself, but rather to have
UHD make the existing interface “work” with UHD, and certain UHD
features are “emulated” for USRP1.

No problem. I’m just trying to get it to work with the 3.5.+ stuff so I
can take advantage of new examples. Instead I’m learning Ubuntu, cmake,
UHD, and various install intricacies.


The computer is supposed to work for YOU, not the other way around.
LRK
gr-user . ovillatx.sytes.net

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs