Help with USRP and USB permissions

Hey all,

I’ve seen two different methods for setting up USB permissions
correctly, and I can’t seem to get either to work. The first way is
udev, the other method is hotplug.

So I tried udev first, and created /etc/udev/rules.d/60-usrp.rules:

USRP without loaded firmware (FX2)

BUS==“usb”, SYSFS{idVendor}==“fffe”, SYSFS{idProduct}==“0002”,
SYSFS{bcdDevice}==“0002”, GROUP=“usrp”, RUN+="/usr/local/bin/usrper
load_standard_bits"
BUS==“usb”, SYSFS{idVendor}==“fffe”, SYSFS{idProduct}==“0002”,
SYSFS{bcdDevice}==“0004”, GROUP=“usrp”, RUN+="/usr/local/bin/usrper
load_standard_bits"

USRP with loaded firmware

BUS==“usb”, SYSFS{idVendor}==“fffe”, SYSFS{idProduct}==“0002”,
SYSFS{bcdDevice}==“0102”, GROUP=“usrp”
BUS==“usb”, SYSFS{idVendor}==“fffe”, SYSFS{idProduct}==“0002”,
SYSFS{bcdDevice}==“0104”, GROUP=“usrp”

So then I reboot, plugin my device, and it seems to set permissions
correctly:

[email protected] ~/ $ ls -l /dev | grep usrp
crw-rw---- 1 root usrp 442, 5 Feb 12 11:47 usbdev1.6_ep00

So now I try to run an example:
./usrp_wfm_rcv.py
usrp_open_interface:usb_claim_interface: failed interface 0
could not claim interface 0: Operation not permitted
open_nth_cmd_interface: open_cmd_interface failed

I am in the group, and I have logged out and back in since (completely
rebooted for udev…):
usrp:x:1004:gnychis


So the other method was with hotplug, and i made /etc/hotplug/usb/usrp:
#!/bin/sh
chown root:usb “$DEVICE”
chmod ug+rw “$DEVICE”

and usrp.usermap:
usrp 0x0003 0xfffe 0x0002 0 0 0 0 0 0 0
0

I am in fact using the same vendor and product id:
cyprus SDR # lsusb
Bus 001 Device 006: ID fffe:0002

So I rebooted, and i was in the “usb” group, but again… still get the
same error.


Any ideas? :slight_smile:

Thanks!
George

On Mon, Feb 12, 2007 at 11:59:07AM -0500, George N. wrote:

load_standard_bits"
BUS==“usb”, SYSFS{idVendor}==“fffe”, SYSFS{idProduct}==“0002”,
SYSFS{bcdDevice}==“0004”, GROUP=“usrp”, RUN+="/usr/local/bin/usrper
load_standard_bits"

The suggestion in the wiki is known to work.

This is the relevant part from http://gnuradio.org/trac/wiki/UdevConfig:

rule to grant read/write access on USRP to group named usrp.

to use, install this file in /etc/udev/rules.d as 10-usrp.rules

ACTION==“add”, BUS==“usb”, SYSFS{idVendor}==“fffe”,
SYSFS{idProduct}==“0002”, GROUP:=“usrp”, MODE:=“0660”

Eric

flawless victory

but now i have another problem, that i some how created using those two
methods below… I searched the mailing list and google for this but
couldn’t find a solution.

[email protected] ~/school/SDR/gnuradio/gnuradio-examples/python/usrp $
./usrp_wfm_rcv.py
write_internal_ram failed: error sending control message: Protocol error
usrp: failed to load firmware /usr/share/usrp/rev2/std.ihx.

In dmesg:
usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd python rqt 64 rq 160 len 3
ret -71

I did not change any kernel settings… only things i changed are what i
listed as trying to get the permission thing to work.

We have two USRP’s and two desktops, the board worked on the other
desktop, therefore its not the board … and i tried the other board on
my desktop and it doesn’t work… so its gotta be my comp.

Additionally, I tried make uninstall and rebuilt everything… no change

any ideas?

Thanks!
George

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