Re: USB2 problems with Fedora/USRP

----Messaggio originale----
Da: [email protected]
Data: 15/01/2009 22.37
A: “Discuss GNU Radio List”
[email protected]
Ogg: [Discuss-gnuradio] Re: USB2 problems with Fedora/USRP

Hello

The next
step is to try out some example, e.g. usrp_benchmark_usb.py or
usrp_wfm_rcv.py.
Whatever
the test I try, I can see
that blinking led is switched of for a couple seconds, then it blinks at
lower
rate, and
another led near to it
turns on (don’t remember which is D402 and D403).

On console, i get this kind of error:

usb_control_msg failed: error sending control message: Connection timed
out

usrp: failed to load fpga bitstream

/opt/gnuradio/share/usrp/rev4/std_2rxhb_2tx.rbf

Traceback (most recent call last):
File “.
/usrp_benchmark_usb.
py”, line 106, in ?
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/hamradio/gnuradio/lib/python2.5/site-packages/gnuradio/usrp.

py", line 230, in init

fpga_filename, firmware_filename)

File 

"/usr/local/hamradio/gnuradio/lib/python2.5/site-packages/gnuradio/usrp1.

py", line 940, in sink_s

    return 

_usrp1.sink_s(*args)

RuntimeError: can’t open usrp1

==== Eric B.
wrote

Confirm that your computer
has an EHCI host controller.

=====

Hello

The PC has the EHCI host controller:

[root@iz0cez usb]# lspci


00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2
(rev 03)

Now, I’ve
tried again launching the usrp_benchmark_usb.py and then
[root@iz0cez usb]# cat
/proc/bus/usb/devices

T:
Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.)
Sub=ff Prot=ff MxPS=64
#Cfgs= 1
P: Vendor=fffe ProdID=0002 Rev= 1.04
S: Manufacturer=Free Software Folks
S:
Product=USRP Rev 4
S:
SerialNumber=480f9a8a
C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=ff
(vend.) Sub=ff Prot=ff
Driver=(none)
I:* If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=02(O)
Atr=02(Bulk) MxPS=
512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=86(I) Atr=02
(Bulk) MxPS=
512 Ivl=0ms

It seems that I was wrong: USB2 driver seems to be working well, at least for the first
configuration
steps, because I am successful in configuring the Cypress FX2.
Then it looks like the problem is actually
in the
next step, that is, loading the fpga bitstream
/usr/local/hamradio/gnuradio/share/usrp/rev4/std_2rxhb_2tx.rbf

Hello

After some more investigation and code inspection, it turns out that I
managed to load the FPGA (I guess…) but the
weird thing is that I achieved that by changing the source code in in
/gnuradio/usrp/host/lib/legacy/usrp_prims.cc now
the FPGA load succeeds

// reset FPGA (and on rev1 both AD9862’s, thus killing clock)
usrp_set_fpga_reset (udh,
1); // hold fpga in reset

if (write_cmd (udh, VRQ_FPGA_LOAD, 0, FL_BEGIN, 0, 0) != 0)
goto fail;

while ((n
= fread (buf, 1, sizeof (buf), fp)) > 0){
if (write_cmd (udh, VRQ_FPGA_LOAD, 0, FL_XFER, buf, n) != n)
goto
fail;
}

//IZ0CEZ_DEBUG
fprintf (stderr, “iz0cez_debug: added printout, delay?\n”); //<==
PRINTOUT??

if
(write_cmd (udh, VRQ_FPGA_LOAD, 0, FL_END, 0, 0) != 0)
goto fail;

fclose (fp);

I could verify that by
using usrper:

[root@iz0cez rev4]# usrper load_firmware std.ihx
usrper: found unconfigured usrp; needs firmware.

[root@iz0cez rev4]# usrper load_fpga std_2rxhb_2tx.rbf
iz0cez_debug: added printout, delay?
[root@iz0cez rev4]#

Why?
May this indicate a timing issue in the USB2 connection? How may
investigate (and possibly fix or workaround) USB
timing problems?

Thanks for any help
Alberto

Attiva Tiscali Voce 8 Mega: telefoni e navighi senza limiti a soli €10
AL MESE FINO AL 30 GIUGNO 2009. Dopo paghi €29,90 al mese. Attiva entro
il 22/01/09! http://abbonati.tiscali.it/promo/voce8mega/