[pvrusb2] debugcmd permission denied

Svein Lindal svein.lindal at gmail.com
Wed Sep 5 12:28:12 CDT 2007


Hi again. I decided to reinstall everything and try from scratch, just
to be sure that I get the steps right.

Turns out my wintv-pvr usb2 works out of the box with the kernel
drivers and firmware, with kind of choppy image though. (which could
mean I should get the firmware from the cdrom, right????)

Trying to extract firmware using fwextract.pl (version from the link)
does not work.

When I try to run the manual extraction I still get stuck at this point

$ echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd
bash: /sys/class/pvrusb2/sn-8674305/debugmd: Permission denied

$ sudo 'echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd'
sudo: echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd:
command not found

$ sudo su
root at w2jb:/home/svein# echo "cpufw fetch" >
/sys/class/pvrusb2/sn-8674305/debugcmd
bash: /sys/class/pvrusb2/sn-8674305/debugcmd: Permission denied

There is no file named debugcmd in that directory if there is supposed to be?

This is the contents of the folder:
/sys/class/pvrusb2/sn-8674305$ ls -l
total 0
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_audio_bitrate
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_audio_crc
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_audio_emphasis
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_audio_layer
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_audio_mode
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_balance
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_bass
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_brightness
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_channel
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_contrast
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_debug_subsys_mask
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_debug_subsys_stream_mask
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_freq_table_channel
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_freq_table_value
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_frequency
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_hue
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_input
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_mpeg_audio_mode
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_mpeg_audio_mode_extension
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_mute
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_resolution_hor
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_resolution_ver
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_saturation
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_signal_present
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_srate
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_streaming_enabled
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_stream_type
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_treble
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_usb_speed
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_aspect
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_b_frames
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_bitrate
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_bitrate_mode
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_bitrate_peak
drwxr-xr-x 2 root root    0 2007-09-05 13:13
ctl_video_chroma_median_filter_bottom
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_chroma_median_filter_top
drwxr-xr-x 2 root root    0 2007-09-05 13:13
ctl_video_chroma_spatial_filter_type
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_gop_closure
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_gop_size
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_luma_median_filter_bottom
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_luma_median_filter_top
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_luma_spatial_filter_type
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_median_filter_type
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_pulldown
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_spatial_filter
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_spatial_filter_mode
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_standard
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_standard_mask_active
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_standard_mask_available
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_temporal_decimation
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_temporal_filter
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_video_temporal_filter_mode
drwxr-xr-x 2 root root    0 2007-09-05 13:13 ctl_volume
lrwxrwxrwx 1 root root    0 2007-09-05 13:13 device ->
../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1
lrwxrwxrwx 1 root root    0 2007-09-05 13:14 subsystem -> ../../../class/pvrusb2
--w------- 1 root root 4096 2007-09-05 13:14 uevent
-r--r--r-- 1 root root 4096 2007-09-05 13:18 unit_number
-r--r--r-- 1 root root 4096 2007-09-05 13:18 v4l_minor_number



Also, the usbsnoop and decode_log provides 4 files, 2 sets of the ones
I want I guess?:
  12559 2007-09-05 12:05 firmware_file-0
262144 2007-09-05 12:05 firmware_file-1
 12559 2007-09-05 12:05 firmware_file-2
262144 2007-09-05 12:05 firmware_file-3

- Svein

>Hi Mike, thank you for your input.
>
>> I just got a wintv pvr usb2 from Amazon.com the model nr:
>>
>> 24022 LF rev E1A3 NTSC/NTSC-J
>>
>> is not on the list of previously registered devices, and running the
>> fwextract.pl script did not yield any result. So I am trying to the
>> firmware extraction procedures that are described here:
>> http://www.isely.net/pvrusb2/firmware.html#FX2
>
>Hmm, I released an updated fwextract.pl a short while ago; it is more
>recent than what is in the standalone driver tarball.  Have you tried
>that?  It is here:
>
>
>http://www.isely.net/downloads/fwextract.pl


>
> the usb sniffer procedure seems to have worked, so now I am trying to
> capture the FX2 firmware. However, when I am running the debugcmd I
> get the following error:
>
> $ sudo echo "cpufw done" >/sys/class/pvrusb2/sn-8674305/debugcmd
> bash: /sys/class/pvrusb2/sn-8674305/debugcmd: Permission denied

You need to be running as root in order for that to work.  I see you did
sudo there however it didn't do what you think.  The 'sudo echo "cpufw
done" part was run as root but the output redirection - which is the
critical part - probably was picked up by your normal shell and that's
not root.  Try surrounding the entire thing (i.e. everything after
"sudo") in quotes.


>
> I am no expert, so I'm not sure what I am doing wrong. I think I am
> running the standalone version of the driver. At least I have
> downloaded the software and done a make. How can I be sure which
> version is currently running?

To see what version you are running, look at your dmesg output shortly
after the driver is loaded.  Look for a message of a form similar to
this:

Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner : test (from www.isely.net)

That's a test build from my dev area (thus the word "test").  You'll see
something else there depending on the driver type.


>
> I am running Ubuntu Feisty, i saw a previous post where people had
> managed to make it work out of the box. At the moment I actually get a
> tv-picture, but the image is pretty screwed up.
>

You are getting an image?  Then the firmware has to have been loaded.
If you hadn't extracted the firmware yet then how is that possible?
Did you get the firmware in there some other way and not realize it?

  -Mike

On 8/24/07, Svein Lindal <svein.lindal at gmail.com> wrote:
> Hi,
>
> I just got a wintv pvr usb2 from Amazon.com the model nr:
>
> 24022 LF rev E1A3 NTSC/NTSC-J
>
> is not on the list of previously registered devices, and running the
> fwextract.pl script did not yield any result. So I am trying to the
> firmware extraction procedures that are described here:
> http://www.isely.net/pvrusb2/firmware.html#FX2
>
> the usb sniffer procedure seems to have worked, so now I am trying to
> capture the FX2 firmware. However, when I am running the debugcmd I
> get the following error:
>
> $ sudo echo "cpufw done" >/sys/class/pvrusb2/sn-8674305/debugcmd
> bash: /sys/class/pvrusb2/sn-8674305/debugcmd: Permission denied
>
> I am no expert, so I'm not sure what I am doing wrong. I think I am
> running the standalone version of the driver. At least I have
> downloaded the software and done a make. How can I be sure which
> version is currently running?
>
> I am running Ubuntu Feisty, i saw a previous post where people had
> managed to make it work out of the box. At the moment I actually get a
> tv-picture, but the image is pretty screwed up.
>
> Thanks in advance for any help,
>
> Svein
>


More information about the pvrusb2 mailing list