U2_flash_tool : Can not find the command

Hello,

I have finished all the install setup of GNUradio (in Ubuntu 9.04 by
using
DebianPackages)and test for dial_tone example which seems operating
well.
One problem is that the SD card delivered is broken as mentioned on
website
that I have to use another SD card and write firmware by myself.

Thus I have downloaded the txrx.bin and u2_rev3.bin files from
http://gnuradio.org/releases/usrp2-bin/trunk/ try to run the
u2_flash_tool
to write the firmware and FPGA code.

However, after running the command sudo u2_flash_tool --dev=/dev/sdb -t
s/w
usrp2/firmware/txrx.bin -w (SD card mounted as /dev/sdb in my machine).

The terminal shows: bash: u2_flash_tool :command not found

The previous advices from Johnathan is that

((((The command is correct, but you’ll need to run it from the directory
that u2_flash_tool is in, and reference it with ./u2_flash_tool. We
don’t install this script on the path.

(from usrp2/firmware directory):

$ sudo ./u2_flash_tool --dev=/dev/sdb -t s/w txrx.bin -w

$ sudo ./u2_flash_tool --dev=/dev/sdb -t fpga u2_rev3.bin -w

For the above to work, you’ll need to put the full path to wherever you
downloaded the .bin files.

-Johnathan)))))

But can any one tell me that where is the full directory name of
“usrp2/firmware”? Because I can not find this directory in my computer.

I only find the directory as website address:
http://gnuradio.org/redmine/repositories/changes/gnuradio/usrp2/firmware/u2_flash_tool

Since I am the beginner user of Linux system, I do not know how to enter
this website address in terminal. So I just download u2_flash_tool file
to
my computer fold and go to this fold directory to run the command
u2_flash_tool again. But I still get the same error: bash:
u2_flash_tool
:command not found

Thanks in advance,

Andy

View this message in context:
http://old.nabble.com/u2_flash_tool-%3A---Can-not-find-the-command-tp27760919p27760919.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Tue, Mar 2, 2010 at 12:43, Andy_Long [email protected]
wrote:

Since I am the beginner user of Linux system, I do not know how to enter
this website address in terminal. So I just download u2_flash_tool file to
my computer fold and go to this fold directory to run the command
u2_flash_tool again. But I still get the same error: bash: u2_flash_tool
:command not found

You’re doing all the right things so far. Once you’ve copied the file
to a directory, you need to make it executable:

$ chmod +x u2_flash_tool

Then, to run it:

$ ./u2_flash_tool

(Of course, add all the command options and paths to the .bin files as
before.)

Johnathan

Johnathan, Thank you for your advice.

I have run this command successful. But the usrp2 is still not working
properly. The problem is that only one LED light (F) is on after
inserting
the 2Gb SD card (normal SD card produced by sandisk).

There are two previous advices for the same problem given Eric is:

{1} http://old.nabble.com/Write-bin-to-SD-card-td21680697.html#a21720767
((((((Yabo Li wrote:

Hi Eric,

Thanks very much for answering my questions. I tried a different SD card
(SanDisk), and now only one LED is on (LED F). Do you know what does
this mean?

One LED means that the FPGA was programmed, but not the firmware.
Either you didn’t put the firmware on the card, or the card is bad.

Why don’t you just use the SD card which came with the USRP? It is
known to work.

Matt)))))))))))

Because the SD card sent with USRP2 was bad that this method is not
suitable
to me. I also used another SD card by getting the same results and did
not
see the error information when I wrote the firmware.

Another solution is that

{2}http://www.mail-archive.com/[email protected]/msg15300.html
(((((((((Remove all daughterboards and cables except the power supply.
Does
it do the same thing, or do you get two leds?

I still only get one LED.

Also, if the SD card slot is stiff and/or
sticking, make sure that when you push the card in that it clicks and
slides
back a bit.

Yep, the SD card slot makes the clicking sound when I push the card in
and
the card seems to be in there properly.

If that still doesn’t work, please call the office so we can
discuss it further.

Will do. Thanks!
))))))))

I have followed this steps, but still one f LED is on. However, another
USRP2 shows the same results that I think the platform should be ok.

The code I used to write the firmware and FPGA was listed as below.
After
each step, I used u2_flash_tool + v to check if it works fine. There is
no
any error shown on the terminal.

[email protected]:~$ cd /home/shi/Desktop/
[email protected]:~/Desktop$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 14318528 3388676 10202512 25% /
tmpfs 995828 0 995828 0% /lib/init/rw
varrun 995828 92 995736 1% /var/run
varlock 995828 0 995828 0% /var/lock
udev 995828 192 995636 1% /dev
tmpfs 995828 460 995368 1% /dev/shm
lrm 995828 2392 993436 1%
/lib/modules/2.6.28-11-generic/volatile
/dev/mmcblk0p1 1925464 4 1925460 1% /media/disk-1
[email protected]:~/Desktop$ sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t
s/w
txrx.bin -w
[sudo] password for shi:
[email protected]:~/Desktop$ sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t
s/w
txrx.bin -v
[email protected]:~/Desktop$ sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t
fpga
u2_rev3.bin -w
[email protected]:~/Desktop$ sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t
fpga
u2_rev3.bin -v
[email protected]:~/Desktop$ find_usrps
No USRP2 found.
[email protected]:~/Desktop$

Another strange thing is that after inserting the SD card into the
USRP2, it
can not recognized by Ubuntu 9.04 anymore. Thus every time I have to
format
it in windows before I am using u2_flash_tool to rewrite the firmware
and
FPGA again. (I have tried to format it as FAT,FAT32,NFTS which makes no
difference. Because I guess the u2_flash_tool will remove the file
system
created by windows).

I am wandering if I did anything wrong when I am using the u2_flash_tool
to
burn the firmware? Or maybe I have to try to use another brand SD card
rather than Sandisk? Or Do I need to do something more with SD card
before
using u2_flash_tool?

Thank you.

Andy


View this message in context:
http://old.nabble.com/u2_flash_tool-%3A---Can-not-find-the-command-tp27760919p27770237.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Wed, Mar 3, 2010 at 08:14, Andy_Long [email protected]
wrote:

I have run this command successful. But the usrp2 is still not working
properly. The problem is that only one LED light (F) is on after inserting
the 2Gb SD card (normal SD card produced by sandisk).

This usually means the firmware was not loaded correctly, as Eric
mentioned.

Another strange thing is that after inserting the SD card into the USRP2, it
can not recognized by Ubuntu 9.04 anymore. Thus every time I have to format
it in windows before I am using u2_flash_tool to rewrite the firmware and
FPGA again. (I have tried to format it as FAT,FAT32,NFTS which makes no
difference. Because I guess the u2_flash_tool will remove the file system
created by windows).

The SD card does not use a filesystem; there is no need to format it.
In fact, when you write it with u2_flash_tool, you are overwriting any
pre-existing filesystem metadata like partition tables, etc. That is
why Ubuntu doesn’t “recognize” it afterwards.

When you insert the SD card into a reader, the OS will see a new
block device come online, like /dev/sdb or /dev/sdf or some other
device name depending on what other block devices you have in the
machine. A properly programmed SD card (for the USRP2) will not have
a recognized partition table, so your kernel will not try to mount it
into the VFS.

Also, after programming the card, you must insert it into the USRP2
and power cycle the USRP2 before trying ‘find_usrps’.

I am wandering if I did anything wrong when I am using the u2_flash_tool to
burn the firmware? Or maybe I have to try to use another brand SD card
rather than Sandisk? Or Do I need to do something more with SD card before
using u2_flash_tool?

It’s possible you need to use another brand card, as these seem to be
notoriously flaky. But your u2_flash_tool commands appeared correct.
One thing to try would be to remove the SD card from the reader after
the write command, then insert it back in before the verify command.
This will ensure you are not simply verifying the firmare/FPGA images
against the disk cache.

I know you seem to be having a lot of difficulty, but I can assure you
that I’ve programmed SD cards for the USRP2 dozens or hundreds of
times with stock and custom images, and what exists does work fine if
properly done.

Johnathan

On Wed, Mar 3, 2010 at 18:00, John G. [email protected] wrote:

destroyed by flying debris, dropped from balloons at tens of thousands
of feet, etc).

You’re of course correct–I had missed the SanDisk brand name and my
“these” was referring to SD cards in general I’ve used with the USRP2.
No intent to malign SanDisk.

It’s possible there is a design issue with the SD interface on the
USRP2. I’d consider it pretty unlikely, but not out of the question.

Johnathan

If the USRP2 is notoriously flaky with SanDisk SD cards, there’s
almost certainly something wrong with the USRP2’s implementation of
the SD card interface – not with SanDisk cards. John
_______________________________________________ Discuss-gnuradio
mailing list [email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

I will make an observation that this isn’t the only forum where
inconsistency in compatibility and
performance with SD and SDHC cards has become an issue. The Plug
Computer folks (Sheeva Plug, etc)
are also running into problems with “this card worked, that one
didn’t” type problems.

Food for thought.


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

On Mar 3, 2010, at 9:10 PM, Marcus D. Leech wrote:

performance with SD and SDHC cards has become an issue. The Plug
Computer folks (Sheeva Plug, etc)
are also running into problems with “this card worked, that one
didn’t” type problems.

An interesting view on this issue:

http://www.bunniestudios.com/blog/?p=918

Eric

Or maybe I have to try to use another brand SD card
rather than Sandisk?

It’s possible you need to use another brand card, as these seem to be
notoriously flaky.

SanDisk SD cards are not notoriously flaky. They invented the SD Card
format and are, I believe, the largest maker of Flash devices in the
world. They’re the gold standard for SD cards (and their “Extreme”
line is the gold standard for endurance, surviving in cameras
destroyed by flying debris, dropped from balloons at tens of thousands
of feet, etc).

If the USRP2 is notoriously flaky with SanDisk SD cards, there’s
almost certainly something wrong with the USRP2’s implementation of
the SD card interface – not with SanDisk cards.

John

Hi Johnathan, appreciate for your help.

I have bought another brand (ADATA) 2GB SD card today and did the same
thing
as before since I can not find any Kingston card available in shop.

  1. I downloaded txrx.bin and u2_rev3.bin files from
    http://gnuradio.org/releases/usrp2-bin/trunk/

and u2_flash_tool from
http://gnuradio.org/redmine/repositories/changes/gnuradio/usrp2/firmware/u2_flash_tool

then put them into the same folder.

  1. After that I use “chmond” to make the u2_flash_tool executable

  2. Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w txrx.bin –w

    Take off the SD card from the reader and insert it back

Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w txrx.bin -v

  1. Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w u2_rev3.bin –w

    Take off the SD card from the reader and insert it back

Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w u2_rev3.bin –v

  1. There is no extra information after the verify command.

  2. I put the SD card into the USRP2 and power it.

For sandisk SD card: Only LED (F) is on
For ADATA SD card: All LEDs are off

The same condition is described in here
http://old.nabble.com/Write-bin-to-SD-card-td21680697.html#a21720726

If every step is fine, maybe I guess I am a bit unluck and have to wait
for
the replacement. Can I have another way to check if the firmware in SD
card
is correct rather than the verify command?

Andy


View this message in context:
http://old.nabble.com/u2_flash_tool-%3A---Can-not-find-the-command-tp27760919p27783446.html
Sent from the GnuRadio mailing list archive at Nabble.com.

I used the SD card with the laptop built-in reader. Actucally it is a
bit
difficult to buy a mmc card in shop now. :slight_smile: I will try to use the other
SD
reader outside the laptop to see the difference. thank you.

Andy

Johnathan C.-2 wrote:

based on the device name that gets created when you insert the card
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://old.nabble.com/u2_flash_tool-%3A---Can-not-find-the-command-tp27760919p27785252.html
Sent from the GnuRadio mailing list archive at Nabble.com.

  1. Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w txrx.bin �Cw

I’m a litttle concerned that you have an MMC card and not an SD card,
based on the device name that gets created when you insert the card
into your read/writer. Using SD cards, I’ve only ever seen Ubuntu
generate devices of type ‘/dev/sdX’. But since I’ve never actually
used an MMC card, I don’t know if this is unrelated to your problem or
not.

My built-in laptop card reader also produced device names like that. It
never worked for me with writing the usrp2 images. Also, it would
unmount/crash itself if i tried reading/writing large files to a sd card
with a file system. Just sayin…

Anyway, based on my experience, I recommend using a sd card reader
device that mounts the thing as a /dev/sdX device. Ettus research
usually ships one of these readers with the usrp2s.

-Josh

On Thu, Mar 4, 2010 at 08:51, Andy_Long [email protected]
wrote:

I have bought another brand (ADATA) 2GB SD card today and did the same thing
as before since I can not find any Kingston card available in shop.

  1. Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w txrx.bin ¨Cw

I’m a litttle concerned that you have an MMC card and not an SD card,
based on the device name that gets created when you insert the card
into your read/writer. Using SD cards, I’ve only ever seen Ubuntu
generate devices of type ‘/dev/sdX’. But since I’ve never actually
used an MMC card, I don’t know if this is unrelated to your problem or
not.

Johnathan

On 03/04/2010 11:24 AM, Josh B. wrote:

My built-in laptop card reader also produced device names like that. It
never worked for me with writing the usrp2 images. Also, it would
unmount/crash itself if i tried reading/writing large files to a sd card
with a file system. Just sayin…

Anyway, based on my experience, I recommend using a sd card reader
device that mounts the thing as a /dev/sdX device. Ettus research
usually ships one of these readers with the usrp2s.

Correction – We don’t ship one of the readers unless you purchase it
separately.

Matt

  1. Using sudo ./u2_flash_tool --dev=/dev/mmcblk0p1 -t s/w txrx.bin ¨Cw

I’m a litttle concerned that you have an MMC card and not an SD card,
based on the device name that gets created when you insert the card
into your read/writer. Using SD cards, I’ve only ever seen Ubuntu
generate devices of type ‘/dev/sdX’.

No need to worry about this. The “mmc” driver handles both MMC and SD
cards (their protocols are almost identical). The “sd” driver
actually stands for “SCSI disk”; but in recent kernels, SATA and USB
storage media also show up as “sd” devices.

So if you access your SD card via a USB adapter, it becomes an “sd”
device. If you access your SD card via a builtin non-USB SD
interface, it becomes an “mmcblk” device.

Ah! The issue is probably that he’s accessing “mmcblk0p1”, that is,
the first partition. I thought the USRP2 used unpartitioned cards,
i.e. he should write to “mmcblk0” (which will overwrite the partition
label and eliminate those p1 devices on subsequent accesses anyway).

John

Hi, Johnathan, John, Matt and Josh

Thank you all for the help! The problem was solved!:slight_smile:

When I am using the SD card via a USB adapter, it shows the name
“dev/sd1”.
By using this name, it gives me the same results as before.

However, the USRP works well by using the name “mmcblk0” . :slight_smile:

Another thing is that actually the terminal shows the name “mmcblk1”
when I
inserted SD cards as soon as I took them from the package without any
extra
operation for partition.

regards,
Andy


View this message in context:
http://old.nabble.com/u2_flash_tool-%3A---Can-not-find-the-command-tp27760919p27791386.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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