LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how to install USB TVBox UTV382 driver? (https://www.linuxquestions.org/questions/slackware-14/how-to-install-usb-tvbox-utv382-driver-4175622800/)

72rcfj789w93 01-31-2018 11:13 AM

how to install USB TVBox UTV382 driver?
 
hello,

I am using slackware 14.2 32bit kernel 4.4.111-smp. I have a Gadmei USB TVBox UTV382 but don't know how to make it work. Based on what I've read from this https://linuxtv.org/wiki/index.php/G..._0x1f71:0x3301) I have to download the source code from https://git.kernel.org/pub/scm/linux...edia/usb/usbtv and then modify it and make&install it manually.

However after doing some re-checks the modules seems already compiled using unmodified/original source code in /lib/modules/4.4.111/source/drivers/media/usb/usbtv/ and installed in /lib/modules/4.4.111/kernel/drivers/media/usb/usbtv/usbtv.ko.

If that's true what should I do to modify the source code (usbtv-core.c), recompile, and reinstall it?
is it correct if I just modify the /lib/modules/4.4.111/source/drivers/media/usb/usbtv/usbtv-core.c file as per instruction from https://linuxtv.org/wiki/index.php/G..._0x1f71:0x3301) and then do make&install manually? or is there a better approach?

Thanks.

keefaz 01-31-2018 11:18 AM

What does dmesg say when you insert the usb TVbox?

72rcfj789w93 01-31-2018 11:31 AM

Quote:

Originally Posted by keefaz (Post 5813882)
What does dmesg say when you insert the usb TVbox?

dmesg:
Code:

[10299.169037] usb 1-2: new high-speed USB device number 7 using ehci-pci
[10299.286453] usb 1-2: config 1 interface 0 altsetting 1 bulk endpoint 0x83 has invalid maxpacket 256
[10299.289445] usb 1-2: New USB device found, idVendor=1f71, idProduct=3301
[10299.289450] usb 1-2: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[10299.289454] usb 1-2: Product: USB TV Box
[10299.289457] usb 1-2: Manufacturer: Gadmei
[10299.289460] usb 1-2: SerialNumber: 330000000009

and this is from udevadm monitor:
Code:

KERNEL[10671.340506] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2 (usb)
KERNEL[10671.341063] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0 (usb)
UDEV  [10671.350570] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2 (usb)
UDEV  [10671.357285] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0 (usb)


keefaz 01-31-2018 12:13 PM

Looks good.

Install 2 packages and watch TV on Slackware:
- vlc from Alien Bob
- kaffeine from sbo (Slackbuilds.org)

[edit]
Wait.. I don't see messages from loaded module in dmesg :)
Do you see usbtv module loaded at lsmod output?

Linux TV wiki suggests editing usbtv-core.c with idVendor and idProduct values (0x1f71 and 0x3301) for your card but in probing section of module, I think it is for modprobing the module automatically when inserting the device.

Maybe just an udev rule would work instead

In any case you can load the module by hand if it's not already loaded for testing
Code:

modprobe usbtv

abga 01-31-2018 08:04 PM

Quote:

Originally Posted by 72rcfj789w93 (Post 5813879)
hello,

I am using slackware 14.2 32bit kernel 4.4.111-smp. I have a Gadmei USB TVBox UTV382 but don't know how to make it work. Based on what I've read from this https://linuxtv.org/wiki/index.php/G..._0x1f71:0x3301) I have to download the source code from https://git.kernel.org/pub/scm/linux...edia/usb/usbtv and then modify it and make&install it manually.

You're right, you need to patch the usbtv-core.c module source manually and recompile it. Since the modification is minimal (there are no new functions requiring updated module header files) you can follow the instructions from this post and only recompile the module/module_directory (Answer 4):
https://stackoverflow.com/questions/...-kernel-module

Should you want to go for a whole media_tree compilation, not really necessary but maybe easier as it is fully automated, then follow my posts from this thread:
https://www.linuxquestions.org/quest...5/#post5798915
- please note that I made a mistake regarding the exact path to the kernel source tree and AlienBob corrected me:
/usr/src/linux-EXACT-KERNEL-VERSION

abga 01-31-2018 08:13 PM

Quote:

Originally Posted by 72rcfj789w93 (Post 5813879)
However after doing some re-checks the modules seems already compiled using unmodified/original source code in /lib/modules/4.4.111/source/drivers/media/usb/usbtv/ and installed in /lib/modules/4.4.111/kernel/drivers/media/usb/usbtv/usbtv.ko.

If that's true what should I do to modify the source code (usbtv-core.c), recompile, and reinstall it?
is it correct if I just modify the /lib/modules/4.4.111/source/drivers/media/usb/usbtv/usbtv-core.c file as per instruction from https://linuxtv.org/wiki/index.php/G..._0x1f71:0x3301) and then do make&install manually? or is there a better approach?

Thanks.

Just wanted to add an answer for the second part of your original post, yes, just edit your existing /lib/modules/4.4.111/source/drivers/media/usb/usbtv/usbtv-core.c if the section you need to modify looks like the one described in:
https://linuxtv.org/wiki/index.php/G...0x1f71:0x3301)
Basically you just add the device ID of your USB Tuner, nothing else.

The same you should do if you're using the media_tree aproach - but there you'll need to modify the source file usbtv-core.c that the media build will download.


All times are GMT -5. The time now is 10:54 PM.