Find the answer to your Linux question:
Results 1 to 8 of 8
Hello! I recently bought the kozumi KTV-01C that is a very cheap pci tv card. When I booted linux (fc 6) it autoloaded the modules bttv, and bt878. But with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    60

    REMOTE CONTROLLER with bt878 kozumi KTV-01C


    Hello!

    I recently bought the kozumi KTV-01C that is a very cheap pci tv card.

    When I booted linux (fc 6) it autoloaded the modules bttv, and bt878.

    But with tvtime, zapping, xawtv, or kdetv I was getting no signal, so I looked up in internet and I found how to configure it correctly, I have to rmmod the modules that are loaded by default and modprobe them with correct parameters.

    modprobe bttv radio=1 pll=1 tuner=38 card=51 (with card=70 it works exactly the same)

    modprobe bt878 verbose=1

    This way I can see tv, some channels don't work so good, but w/e.

    The radio works perfectly with gnomeradio, but, the thing I just have left to configure it great is to make the remote controller to work.

    I've been reading about lirc, but no, I don't know how to configure this. Is this the app I have to use?

    All works perfect in Win Xp, but it's a shame I have to use it every time I want to watch tv.

    Can anybody help?

  2. #2
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    Hi again!

    First one question: Is the receiver of this remote control a separate device or is it on that PCI card?

    Then, I made also a Web search in altavista with "kozumi KTV-01C linux" just out of curiosity and found by chance this:

    http://www.starlinux.net/forum/print...=10835&forum=7

    Maybe that helps with the quirks with some channels. They mention there PAL-NC from Argentina. Aren't you from Argentina? Quien más dice "ché" ?

    But maybe you're now outside of Argentina and don't have any PAL-NC.
    Bus Error: Passengers dumped. Hech gap yo'q.

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    60
    Thank you for helping, che!

    First one question: Is the receiver of this remote control a separate device or is it on that PCI card?
    No, it has a mini plug in for plugging a cable that in the other end has a ir receiver.

    I arranged this so you can see what I mean:

    I'm argentine, yes! I use pal-nc, and it works well. Also the fm radio works very well, but I couldn't make the remote control to work.

    I checked that url you gave me, and I've seen this thread sometime before. It helped me to configure the modules for the card, for seeing tv and the radio, but it says nothing about the remote, that is what I'm trying to fix now.

    Help me please!

  4. #4
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    Well, regarding the search results in altavista, there are so many links not only in Spanish but also from Argentina. No one of those deal with the remote control?

    But anyway, I'm not very familiar with PCI, and the first question is to know if this cable with the IR sensor is recognised properly and if there is a driver for it.

    It could be a third driver or one of those loaded already are supposed to do the job.

    I would launch again "dmesg" before and after plugging and unplugging the cable with the IR sensor.

    Then I would check the proc file system under "/proc/bus/pci", examining it with "ls" and diplaying files with "cat".

    "cat /proc/bus/pci/devices" should list something about this remote control thingy. If not, this would be an indicator that the whole card is treated as one device and that the drivers are all loaded already, and you might have a simple hardware problem of bad connection, broken cable core or the like.

    Maybe the program "lspci" or "/sbin/lspci" gives some hints.

    Also, the list of loaded modules, displayed with "lsmod" could give some hints.

    I assume, some info about devices is now with kernel 2.6 also in the "/sys" file system. At least, the drivers info from USB went from the "/proc" file system to the "/sys" file system since kernel 2.6. Maybe PCI did the same.

    So, it's mainly playing with that cable (plugging in/unplugging) and trying to get some signs of change from the kernel messages.
    Bus Error: Passengers dumped. Hech gap yo'q.

  5. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    60
    hi!

    I did what you said and:

    dmesg doesn't registers changes when I plug or unplug the cable with the ir sensor. But I think this is alright, I mean, the tv works, but if I unplug the coaxial cable, dmesg doesn't detects it either, so, that's what I mean.

    About the websites, well, I think that there are plenty, but just a little are about linux, and no one of the is about configuring the remote control so, you can imagine, maybe I'm the first one doing this (I don't think so)

    I made the cat /proc/bus/pci/devices before and after plugging this cable, but as far as I can determine there are no changes. (I added them so you can see)
    before
    after

    Please helppppp

  6. #6
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    Quote Originally Posted by tauro_kpo
    [...] and no one of the is about configuring the remote control[/B] so, you can imagine, maybe I'm the first one doing this (I don't think so)
    Well, there are two possibilities:

    Everyone who configured the TV stuff has also a working remote control and felt no need to mention it.

    or

    Most people couldn't get the remote control to work, but don't pay much attention to it.

    In the latter case, you have a simple hardware fault or in this modprobe command you posted there is an argument missing, an argument for the remote control.

    Presumably, you copied only those arguments from the modprobe command. Is there any chance to find out where those magic number like 51 and 70 come from?
    A README or help file? Maybe you try other numbers than 1 for the remote command.



    Quote Originally Posted by tauro_kpo
    I made the cat /proc/bus/pci/devices before and after plugging this cable, but as far as I can determine there are no changes. (I added them so you can see)
    before
    after
    Please helppppp
    This is what the "/devices" file looks like? No ASCII text like "kozumi" or such?
    Those three and four digit numbers could be vendor and product IDs ...
    Maybe you see a change before and after the modprobe command.


    The point of all this is to find out if the remote control is treated as a separate device or not.

    If there are no signs of a separate device and the remote control works with Windows XP, then I can only imagine a wrong "remote=" argument.
    Bus Error: Passengers dumped. Hech gap yo'q.

  7. #7
    Just Joined!
    Join Date
    Feb 2007
    Posts
    60
    Hi!! I've been quite busy these days! but now I can get you all au courant about this situation here.

    I tried as you suggested, with all the card numbers that there are possible to use. (enabling the remote=1)

    And, I found different results!!

    Only with 3 it worked, with the others, if I pressed any button, it didn't do anything.

    The numbers are 120, 137 and 144.

    But the problem is that it doesn't work as fine as in windows, the controller doesn't respond good, it is bad configured, or something, let me tell you why.

    If I load the module for card 144 when I press a button in the remote controller it is like I was not releasing it, it is all the time pressed, and if I press another one, it is the same, all the time this, in other words it doesn't do what I'm telling it to do, it does what it wants, keeps the button pressed when I've already released them.

    If I load the module for card 137 the buttons work all the time, I can't choose when, it acts like crazy, and it is completely unusable.

    And finally if I load the module for card 120 the button mapping is a totally mess, but it works good, if I press a button, that button works, but you know the problem? It is all the time re-mapping the buttons!!

    So if number 2 in the controller was for lowing the volume, now it is for changing channel, and next it will be the number 3, this is what happens.

    Anyone can give me a hand on this? :-S such a problem!

    I learned to live with this and I change the channels with the keyboard, but that's because I don't watch tv from far, when I do it is when I'm close to the computer while I'm doing something with it, but if I want to watch a movie, or a program, or simply I want to relax, then I have to change to windows :-S (oh, no!) Can someone help me to not do this?

    Thank youuuuuuuuu!!

  8. #8
    fdr
    fdr is offline
    Just Joined!
    Join Date
    Jun 2007
    Posts
    1
    I have the same card. I recompiled some modules in order to remap the keys.

    Make this test:
    1. Reload ir_common with 'debug=1' and run dmesg.

    /etc/modprobe.d/bttv (in kubuntu feisty):
    Code:
    alias char-major-81 videodev
    alias char-major-81-0 bttv
    options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4
    options ir_common debug=1
    Code:
    $ dmesg
    ...
    input: bttv IR (card=120) as /class/input/input2
    ...
    $ ls -l /dev/input/by-path/
    total 0
    lrwxrwxrwx 1 root root 9 2007-06-04 05:56 pci-0000:00:0a.0--event-ir -> ../event2
    ...
    $ lspci
    00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
    ...
    2. Run 'tail -f /var/log/kern.log' (or /var/log/{debug,syslog,dmesg}...?), and press the keys.

    You should see something like this:
    Code:
    Jun  4 19:24:59 kernel: bttv IR (card=120): key event code=106 down=1
    Jun  4 19:24:59 kernel: bttv IR (card=120): key event code=106 down=0

    If this works...

    1. Download the kernel source and compile the modules.
    Code:
    # cd <linux-source>
    # make modules
    I think it's not necessary to compile all...i don't know how.

    2. Modify some files in order to remap the keys.

    card=120 (0x78 in hex) is defined in <linux-source>/include/media/ir-common.h/drivers/media/video/bt8xx/bttv.h:
    Code:
    #define BTTV_BOARD_CONTVFMI 0x78
    Add a new keymap in <linux-source>/include/media/ir-common.h:
    Code:
    extern IR_KEYTAB_TYPE ir_codes_kozumi[IR_KEYTAB_SIZE];
    and <linux-source>/drivers/media/common/ir-keymaps.c:
    Code:
    /* Kozumi KTV-01C */
    IR_KEYTAB_TYPE ir_codes_kozumi[IR_KEYTAB_SIZE] = {
            [ 0x09 ] = KEY_9,
    };
    EXPORT_SYMBOL_GPL(ir_codes_kozumi);
    Only 0x00 at this time.

    Replace ir_codes_pixelview with ir_codes_kozumi
    in <linux-source>/drivers/media/video/bt8xx/bttv-input.c:
    Code:
            case BTTV_BOARD_CONTVFMI:
                    /*ir_codes         = ir_codes_pixelview;*/
                    ir_codes         = ir_codes_kozumi;
    3. Compile the modified modules and install them (replace 2.6.20-16-generic and /backup/kernel/).

    Code:
    # cd <linux-source>
    # make modules
    # cp /lib/modules/2.6.20-16-generic/kernel/drivers/media/common/ir-common.ko /backup/kernel/
    # cp /lib/modules/2.6.20-16-generic/kernel/drivers/media/video/bt8xx/bttv.ko /backup/kernel/
    # cp /lib/modules/2.6.20-16-generic/kernel/drivers/media/dvb/bt8xx/bt878.ko /backup/kernel/
    # cp <linux-source>/drivers/media/common/ir-common.ko /lib/modules/2.6.20-16-generic/kernel/drivers/media/common/ir-common.ko
    # cp <linux-source>/drivers/media/video/bt8xx/bttv.ko /lib/modules/2.6.20-16-generic/kernel/drivers/media/video/bt8xx/bttv.ko
    # cp <linux-source>/drivers/media/dvb/bt8xx/bt878.ko /lib/modules/2.6.20-16-generic/kernel/drivers/media/dvb/bt8xx/bt878.ko
    4. Reload the modules (rmmod...modprobe), run 'tail -f /var/log/kern.log' and press the keys.

    If you press a defined key (ie 0x09):
    Code:
    Jun  4 20:24:17 kernel: bttv IR (card=120): key event code=10 down=1
    Jun  4 20:24:17 kernel: bttv IR (card=120): key event code=10 down=0
    code=10 means KEY_9, look at <linux-source>/include/linux/input.h

    If you press an undefined key:
    Code:
    Jun  4 20:31:50 kernel: bttv IR (card=120): unknown key: key=0x1b raw=0x1b down=1
    Jun  4 20:31:50 kernel: bttv IR (card=120): unknown key: key=0x1b raw=0x1b down=0
    xev command may help.

    5. Define the rest of the keys and repeat steps 3 to 4.

    This is my keymap, it's like 'ir_codes_pctv_sedna' but i modified some keys to match tvtime keys (ie 'Mode = f = fullscreen').

    Code:
    /* Kozumi KTV-01C */
    IR_KEYTAB_TYPE ir_codes_kozumi[IR_KEYTAB_SIZE] = {
            [ 0x00 ] = KEY_0,
            [ 0x01 ] = KEY_1,
            [ 0x02 ] = KEY_2,
            [ 0x03 ] = KEY_3,
            [ 0x04 ] = KEY_4,
            [ 0x05 ] = KEY_5,
            [ 0x06 ] = KEY_6,
            [ 0x07 ] = KEY_7,
            [ 0x08 ] = KEY_8,
            [ 0x09 ] = KEY_9,
            [ 0x1c ] = KEY_RADIO,          /* FM Radio */
            [ 0x0a ] = KEY_BACKSPACE,      /* Recall */
            [ 0x12 ] = KEY_ESC,            /* POWER */
            [ 0x18 ] = KEY_LEFT,           /* VOL- */
            [ 0x0c ] = KEY_RIGHT,          /* VOL+ */
            [ 0x16 ] = KEY_ENTER,          /* OK */
            [ 0x17 ] = KEY_D,              /* Plus */
            [ 0x10 ] = KEY_F,              /* Mode */
            [ 0x0b ] = KEY_UP,             /* CH+ */
            [ 0x15 ] = KEY_DOWN,           /* CH- */
            [ 0x14 ] = KEY_H,              /* OSD */
            [ 0x13 ] = KEY_MUTE,           /* Mute */
            [ 0x0f ] = KEY_BACKSPACE,      /* Prev */
            [ 0x0e ] = KEY_STOP,           /* Stop */
            [ 0x1f ] = KEY_PLAY,           /* Play */
            [ 0x1e ] = KEY_PAUSE,          /* Pause */
            [ 0x1d ] = KEY_RECORD,         /* Record */
            [ 0x1a ] = KEY_F7,             /* Next */
            [ 0x0f ] = KEY_A,              /*  */
            [ 0x1b ] = KEY_F5,             /* Time Shift */
            [ 0x19 ] = KEY_S,              /* Snapshot */
            [ 0x0f ] = KEY_F6,             /* Prev */
            [ 0x0d ] = KEY_E,              /* Stereo */
            [ 0x11 ] = KEY_I               /* Source */
    };
    EXPORT_SYMBOL_GPL(ir_codes_kozumi);

    I've read something about using lirc with an input device and remap the keys, but i don't know how to do that.

    I've tried to remap the keys with xmodmap, but i don't know how to differentiate the remote control from my 'real' keyboard. Maybe with a separate entry in xorg.conf.
    Code:
    Section "InputDevice"
           Identifier      "Control Remoto"
           Driver          "kbd"
           Option          "CoreKeyboard"
           Option          "Device" "/dev/input/by-path/pci-0000:00:0a.0--event-ir"
           Option          "XkbRules"      "xorg"
    EndSection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •